TRUE, '_builtin' => FALSE );
foreach ( get_post_types( $args ) as $post_type ) {
$post_type_object = get_post_type_object( $post_type );
?>
label; ?>
' . "\n";
$col ++;
}
?>
| label ?> |
' . esc_attr_e( 'Deactivate for', 'adminimize' )
. '
' . esc_attr( $role_name ) . '';
} ?>
|
' . "\n";
} ?>
$key ) {
if ( post_type_supports( $post_type, $post_type_support ) && 'excerpt' === $post_type_support ) {
$post_type_support = 'postexcerpt';
}
if ( 'page-attributes' === $post_type_support ) {
$post_type_support = 'pageparentdiv';
}
if ( 'custom-fields' === $post_type_support ) {
$post_type_support = 'postcustom';
}
$metaboxes[] = '#' . $post_type_support
. ', #' . $post_type_support
. 'div, th.column-' . $post_type_support
. ', td.' . $post_type_support; // td for raw in edit screen
}
}
if ( function_exists( 'current_theme_supports' )
&& current_theme_supports(
'post-thumbnails', $post_type
)
) {
$metaboxes[] = '#postimagediv';
}
if ( function_exists( 'sticky_add_meta_box' ) ) {
$metaboxes[] = '#poststickystatusdiv';
}
// quick edit areas, id and class
$quickedit_areas = array(
'div.row-actions, div.row-actions .inline',
'fieldset.inline-edit-col-left',
'fieldset.inline-edit-col-left label',
'fieldset.inline-edit-col-left label.inline-edit-author',
'fieldset.inline-edit-col-left .inline-edit-group',
'fieldset.inline-edit-col-center',
'fieldset.inline-edit-col-center .inline-edit-categories-label',
'fieldset.inline-edit-col-center .category-checklist',
'fieldset.inline-edit-col-right',
'fieldset.inline-edit-col-right .inline-edit-tags',
'fieldset.inline-edit-col-right .inline-edit-group',
'tr.inline-edit-save p.inline-edit-save',
);
$metaboxes = array_merge( $metaboxes, $quickedit_areas );
$metaboxes_names = array(
esc_attr__( 'Help' ),
esc_attr__( 'Screen Options' ),
esc_attr__( 'Add New' ),
esc_attr__( 'Permalink', 'adminimize' ),
esc_attr__( 'Tags', 'adminimize' ),
esc_attr__( 'Format', 'adminimize' ),
esc_attr__( 'Categories', 'adminimize' ),
esc_attr__( 'Add New Category', 'adminimize' ),
esc_attr__( 'Password Protect This Post', 'adminimize' ),
esc_attr__( 'Related, Shortcuts', 'adminimize' ),
esc_attr__( 'Messages', 'adminimize' ),
esc_attr__( 'h2: Advanced Options', 'adminimize' ),
esc_attr__( 'Media Buttons (all)', 'adminimize' ),
esc_attr__( 'Word count', 'adminimize' ),
esc_attr__( 'Post Slug', 'adminimize' ),
esc_attr__( 'Publish Actions', 'adminimize' ),
esc_attr__( 'Discussion' ),
esc_attr__( 'HTML Editor Button' ),
);
if ( ! empty( $GLOBALS[ '_wp_post_type_features' ][ $post_type ] ) ) {
foreach ( $GLOBALS[ '_wp_post_type_features' ][ $post_type ] as $post_type_support => $key ) {
if ( post_type_supports( $post_type, $post_type_support ) ) {
$metaboxes_names[] = ucfirst( $post_type_support );
}
}
}
if ( function_exists( 'current_theme_supports' )
&& current_theme_supports(
'post-thumbnails', 'post'
)
) {
$metaboxes_names[] = esc_attr__( 'Post Thumbnail', 'adminimize' );
}
if ( function_exists( 'sticky_add_meta_box' ) ) {
$metaboxes_names[] = 'Post Sticky Status';
}
// quick edit names
$quickedit_names = array(
'' . esc_attr__( 'Quick Edit Link', 'adminimize' ) . '',
esc_attr__( 'QE', 'adminimize' ) . ' ' . esc_attr__( 'Inline Edit Left', 'adminimize' ),
' ' . esc_attr__( 'QE', 'adminimize' ) . ' ⇒' . ' ' . esc_attr__( 'All Labels', 'adminimize' ),
' ' . esc_attr__( 'QE', 'adminimize' ) . ' ⇒' . ' ' . esc_attr__( 'Author' ),
' ' . esc_attr__( 'QE', 'adminimize' ) . ' ⇒' . ' ' . esc_attr__( 'Password and Private', 'adminimize' ),
esc_attr__( 'QE', 'adminimize' ) . ' ' . esc_attr__( 'Inline Edit Center', 'adminimize' ),
' ' . esc_attr__( 'QE', 'adminimize' ) . ' ⇒' . ' ' . esc_attr__( 'Categories Title', 'adminimize' ),
' ' . esc_attr__( 'QE', 'adminimize' ) . ' ⇒' . ' ' . esc_attr__( 'Categories List', 'adminimize' ),
esc_attr__( 'QE', 'adminimize' ) . ' ' . esc_attr__( 'Inline Edit Right', 'adminimize' ),
' ' . esc_attr__( 'QE', 'adminimize' ) . ' ⇒' . ' ' . esc_attr__( 'Tags' ),
' ' . esc_attr__( 'QE', 'adminimize' ) . ' ⇒' . ' ' . esc_attr__( 'Status, Sticky', 'adminimize' ),
esc_attr__( 'QE', 'adminimize' ) . ' ' . esc_attr__( 'Cancel/Save Button', 'adminimize' ),
);
$metaboxes_names = array_merge( $metaboxes_names, $quickedit_names );
// add own post options
$_mw_adminimize_own_values_[ $post_type ] = _mw_adminimize_get_option_value(
'_mw_adminimize_own_values_' . $post_type
);
$_mw_adminimize_own_values_[ $post_type ] = preg_split(
"/\r\n/", $_mw_adminimize_own_values_[ $post_type ]
);
foreach ( (array) $_mw_adminimize_own_values_[ $post_type ] as $key => $_mw_adminimize_own_value_[ $post_type ] ) {
$_mw_adminimize_own_value_[ $post_type ] = trim( $_mw_adminimize_own_value_[ $post_type ] );
$metaboxes[] = $_mw_adminimize_own_value_[ $post_type ];
}
$_mw_adminimize_own_options_[ $post_type ] = _mw_adminimize_get_option_value(
'_mw_adminimize_own_options_' . $post_type
);
$_mw_adminimize_own_options_[ $post_type ] = preg_split(
"/\r\n/", $_mw_adminimize_own_options_[ $post_type ]
);
foreach ( (array) $_mw_adminimize_own_options_[ $post_type ] as $key => $_mw_adminimize_own_option_[ $post_type ] ) {
$_mw_adminimize_own_option_[ $post_type ] = trim( $_mw_adminimize_own_option_[ $post_type ] );
$metaboxes_names[] = $_mw_adminimize_own_option_[ $post_type ];
}
$x = 0;
foreach ( $metaboxes as $index => $metabox ) {
if ( '' !== $metabox ) {
$checked_user_role_ = array();
foreach ( (array) $user_roles as $role ) {
$disabled_metaboxes_[ $post_type . '_' . $role ] = _mw_adminimize_get_option_value(
'mw_adminimize_disabled_metaboxes_' . $post_type . '_' . $role . '_items'
);
$checked_user_role_[ $post_type . '_' . $role ] = (
isset( $disabled_metaboxes_[ $post_type . '_' . $role ] )
&& in_array(
$metabox, $disabled_metaboxes_[ $post_type . '_' . $role ], TRUE
)
) ? ' checked="checked"' : '';
}
echo '' . "\n";
echo '| ' . $metaboxes_names[ $index ] .
' (' . $metabox . ') | ' . "\n";
foreach ( $user_roles as $role_slug ) {
echo '';
echo '';
echo ' | ' . "\n";
}
echo '
' . "\n";
$x ++;
}
}
?>
label
);
echo ' ';
esc_attr_e( 'Option name', 'adminimize' ); ?>
|
';
esc_attr_e( 'Selector, ID or class', 'adminimize' ); ?> |
|
|
|
|