Advertisements

postbox_classes

Definition:
function postbox_classes( $id, $page ) {}

Returns the list of classes to be used by a metabox

Parameters

  • unknown_type $id
  • unknown_type $page

Defined filters

  • postbox_classes_{$page}_{$id}
    apply_filters( "postbox_classes_{$page}_{$id}", $classes )

Source code

function postbox_classes( $id, $page ) {

	if ( isset( $_GET['edit'] ) && $_GET['edit'] == $id ) {

		$classes = array( '' );

	} elseif ( $closed = get_user_option('closedpostboxes_'.$page ) ) {

		if ( !is_array( $closed ) ) {

			$classes = array( '' );

		} else {

			$classes = in_array( $id, $closed ) ? array( 'closed' ) : array( '' );

		}

	} else {

		$classes = array( '' );

	}



	$classes = apply_filters( "postbox_classes_{$page}_{$id}", $classes );

2547

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: