classes/PodsInit.php
public function core() {

		if ( empty( self::$version ) ) {
			return;
		}

		// Session start
		pods_session_start();

		add_shortcode( 'pods', 'pods_shortcode' );
		add_shortcode( 'pods-form', 'pods_shortcode_form' );

		$security_settings = array(
			'pods_disable_file_browser'     => 0,
			'pods_files_require_login'      => 1,
			'pods_files_require_login_cap'  => '',
			'pods_disable_file_upload'      => 0,
			'pods_upload_require_login'     => 1,
			'pods_upload_require_login_cap' => '',
		);

		foreach ( $security_settings as $security_setting => $setting ) {
			$setting = get_option( $security_setting );
			if ( ! empty( $setting ) ) {
				$security_settings[ $security_setting ] = $setting;
			}
		}

		foreach ( $security_settings as $security_setting => $setting ) {
			if ( 0 === (int) $setting ) {
				$setting = false;
			} elseif ( 1 === (int) $setting ) {
				$setting = true;
			}

			if ( in_array(
				$security_setting, array(
					'pods_files_require_login',
					'pods_upload_require_login',
				), true
			) ) {
				if ( 0 < strlen( $security_settings[ $security_setting . '_cap' ] ) ) {
					$setting = $security_settings[ $security_setting . '_cap' ];
				}
			} elseif ( in_array(
				$security_setting, array(
					'pods_files_require_login_cap',
					'pods_upload_require_login_cap',
				), true
			) ) {
				continue;
			}

			if ( ! defined( strtoupper( $security_setting ) ) ) {
				define( strtoupper( $security_setting ), $setting );
			}
		}//end foreach

		$this->register_pods();

		$avatar = PodsForm::field_loader( 'avatar' );

		if ( method_exists( $avatar, 'get_avatar' ) ) {
			add_filter( 'get_avatar', array( $avatar, 'get_avatar' ), 10, 4 );
		}
	}
public function core() {

		if ( empty( self::$version ) ) {
			return;
		}

		// Session start
		pods_session_start();

		add_shortcode( 'pods', 'pods_shortcode' );
		add_shortcode( 'pods-form', 'pods_shortcode_form' );

		$security_settings = array(
			'pods_disable_file_browser'     => 0,
			'pods_files_require_login'      => 1,
			'pods_files_require_login_cap'  => '',
			'pods_disable_file_upload'      => 0,
			'pods_upload_require_login'     => 1,
			'pods_upload_require_login_cap' => '',
		);

		foreach ( $security_settings as $security_setting => $setting ) {
			$setting = get_option( $security_setting );
			if ( ! empty( $setting ) ) {
				$security_settings[ $security_setting ] = $setting;
			}
		}

		foreach ( $security_settings as $security_setting => $setting ) {
			if ( 0 === (int) $setting ) {
				$setting = false;
			} elseif ( 1 === (int) $setting ) {
				$setting = true;
			}

			if ( in_array(
				$security_setting, array(
					'pods_files_require_login',
					'pods_upload_require_login',
				), true
			) ) {
				if ( 0 < strlen( $security_settings[ $security_setting . '_cap' ] ) ) {
					$setting = $security_settings[ $security_setting . '_cap' ];
				}
			} elseif ( in_array(
				$security_setting, array(
					'pods_files_require_login_cap',
					'pods_upload_require_login_cap',
				), true
			) ) {
				continue;
			}

			if ( ! defined( strtoupper( $security_setting ) ) ) {
				define( strtoupper( $security_setting ), $setting );
			}
		}//end foreach

		$this->register_pods();

		$avatar = PodsForm::field_loader( 'avatar' );

		if ( method_exists( $avatar, 'get_avatar' ) ) {
			add_filter( 'get_avatar', array( $avatar, 'get_avatar' ), 10, 4 );
		}
	}
public function core ( ) { if ( empty ( self :: $ version ) ) { return ; } // Session start pods_session_start ( ) ; add_shortcode ( 'pods' , 'pods_shortcode' ) ; add_shortcode ( 'pods-form' , 'pods_shortcode_form' ) ; $ security_settings = array ( 'pods_disable_file_browser' => 0 , 'pods_files_require_login' => 1 , 'pods_files_require_login_cap' => '' , 'pods_disable_file_upload' => 0 , 'pods_upload_require_login' => 1 , 'pods_upload_require_login_cap' => '' , ) ; foreach ( $ security_settings as $ security_setting => $ setting ) { $ setting = get_option ( $ security_setting ) ; if ( ! empty ( $ setting ) ) { $ security_settings [ $ security_setting ] = $ setting ; } } foreach ( $ security_settings as $ security_setting => $ setting ) { if ( 0 === ( int ) $ setting ) { $ setting = false ; } elseif ( 1 === ( int ) $ setting ) { $ setting = true ; } if ( in_array ( $ security_setting , array ( 'pods_files_require_login' , 'pods_upload_require_login' , ) , true ) ) { if ( 0 < strlen ( $ security_settings [ $ security_setting . '_cap' ] ) ) { $ setting = $ security_settings [ $ security_setting . '_cap' ] ; } } elseif ( in_array ( $ security_setting , array ( 'pods_files_require_login_cap' , 'pods_upload_require_login_cap' , ) , true ) ) { continue ; } if ( ! defined ( strtoupper ( $ security_setting ) ) ) { define ( strtoupper ( $ security_setting ) , $ setting ) ; } } //end foreach $ this -> register_pods ( ) ; $ avatar = PodsForm :: field_loader ( 'avatar' ) ; if ( method_exists ( $ avatar , 'get_avatar' ) ) { add_filter ( 'get_avatar' , array ( $ avatar , 'get_avatar' ) , 10 , 4 ) ; } }
Set up the Pods core
Set up the Pods core