includes/class-custom-sidebars.php
public static function get_sidebar( $post_id = null ) {

		if ( empty( $post_id ) ) {
			$post_id = get_post()->ID;
		}

		$sidebar = get_post_meta( $post_id, '_custom_sidebar_id', true );

		if ( $sidebar == false && isset( self::$default_sidebar_id ) ) {
			$sidebar = self::$default_sidebar_id;
		}

		return $sidebar;

	}
public static function get_sidebar( $post_id = null ) {

		if ( empty( $post_id ) ) {
			$post_id = get_post()->ID;
		}

		$sidebar = get_post_meta( $post_id, '_custom_sidebar_id', true );

		if ( $sidebar == false && isset( self::$default_sidebar_id ) ) {
			$sidebar = self::$default_sidebar_id;
		}

		return $sidebar;

	}
public static function get_sidebar ( $ post_id = null ) { if ( empty ( $ post_id ) ) { $ post_id = get_post ( ) -> ID ; } $ sidebar = get_post_meta ( $ post_id , '_custom_sidebar_id' , true ) ; if ( $ sidebar == false && isset ( self :: $ default_sidebar_id ) ) { $ sidebar = self :: $ default_sidebar_id ; } return $ sidebar ; }
Get the sidebar_id assigned to a specific post
Get the sidebar_id assigned to a specific post