true, ], 'objects' ); unset( $cpts['attachment'] ); $cpts = apply_filters( 'rocket_metabox_options_post_types', $cpts ); foreach ( $cpts as $cpt => $cpt_object ) { $label = $cpt_object->labels->singular_name; add_meta_box( 'rocket_post_exclude', sprintf( __( 'WP Rocket Options', 'rocket' ), $label ), 'rocket_display_cache_options_meta_boxes', $cpt, 'side', 'core' ); } } } /** * Displays some checkbox to de/activate some cache options * * @since 3.15 deprecated * @since 2.5 */ function rocket_display_cache_options_meta_boxes() { if ( current_user_can( 'rocket_manage_options' ) ) { global $post, $pagenow; wp_nonce_field( 'rocket_box_option', '_rocketnonce', false, true ); ?>
ID ) ); if ( isset( $rejected_uris[ $path ] ) ) { $reject_current_uri = true; } } ?> >

$label ) { $disabled = disabled( ! get_rocket_option( $field ), true, false ); // translators: %s is the name of the option. $title = $disabled ? ' title="' . esc_attr( sprintf( __( 'Activate first the %s option.', 'rocket' ), $label ) ) . '"' : ''; $class = $disabled ? ' class="rkt-disabled"' : ''; $checked = ! $disabled ? checked( ! get_post_meta( $post->ID, '_rocket_exclude_' . $field, true ), true, false ) : ''; ?> >

', '' ); ?>