true ) ) as $type ) { if ( post_type_supports( $type, 'bizznis-layouts' ) ) { add_meta_box( 'bizznis_inpost_layout_box', __( 'Layout Settings', 'bizznis' ), 'bizznis_inpost_layout_box', $type, 'normal', 'core' ); } } } /** * Callback for in-post layout meta box. * * @since 1.0.0 */ function bizznis_inpost_layout_box() { wp_nonce_field( 'bizznis_inpost_layout_save', 'bizznis_inpost_layout_nonce' ); $layout = bizznis_get_custom_field( '_bizznis_layout' ); ?>

/>

'bizznis_layout[_bizznis_layout]', 'selected' => $layout, 'type' => 'site' ) ); ?>


'', '_bizznis_custom_body_class' => '', '_bizznis_post_class' => '', ) ); $data = array_map( 'bizznis_sanitize_html_classes', $data ); bizznis_save_custom_fields( $data, 'bizznis_inpost_layout_save', 'bizznis_inpost_layout_nonce', $post, $post_id ); } /** * Register a new meta box to the post or page edit screen, so that * the user can set SEO options on a per-post or per-page basis. * * @since 1.0.0 */ // Disabled SEO options: add_action( 'admin_menu', 'bizznis_add_inpost_seo_box' ); function bizznis_add_inpost_seo_box() { foreach ( (array) get_post_types( array( 'public' => true ) ) as $type ) { if ( post_type_supports( $type, 'bizznis-seo' ) ) { add_meta_box( 'bizznis_inpost_seo_box', __( 'SEO Settings', 'bizznis' ), 'bizznis_inpost_seo_box', $type, 'normal', 'core' ); } } } /** * Callback for in-post SEO meta box. * * @since 1.0.0 */ function bizznis_inpost_seo_box() { wp_nonce_field( 'bizznis_inpost_seo_save', 'bizznis_inpost_seo_nonce' ); ?>




'', '_bizznis_description' => '', '_bizznis_canonical_uri' => '', 'redirect' => '', '_bizznis_noindex' => 0, '_bizznis_nofollow' => 0, '_bizznis_noarchive' => 0, ) ); # Sanitize the title, description, and tags foreach ( (array) $data as $key => $value ) { if ( in_array( $key, array( '_bizznis_title', '_bizznis_description' ) ) ) { $data[ $key ] = strip_tags( $value ); } } bizznis_save_custom_fields( $data, 'bizznis_inpost_seo_save', 'bizznis_inpost_seo_nonce', $post, $post_id ); } /** * Register a new meta box to the post or page edit screen, so that the user can * apply scripts on a per-post or per-page basis. * * @since 1.0.0 */ add_action( 'admin_menu', 'bizznis_add_inpost_scripts_box' ); function bizznis_add_inpost_scripts_box() { # If user doesn't have unfiltered html capability, don't show this box if ( ! current_user_can( 'unfiltered_html' ) ) { return; } foreach ( (array) get_post_types( array( 'public' => true ) ) as $type ) { if ( post_type_supports( $type, 'bizznis-scripts' ) ) { add_meta_box( 'bizznis_inpost_scripts_box', __( 'Scripts', 'bizznis' ), 'bizznis_inpost_scripts_box', $type, 'normal', 'low' ); } } } /** * Callback for in-post Scripts meta box. * * @since 1.0.0 */ function bizznis_inpost_scripts_box() { wp_nonce_field( 'bizznis_inpost_scripts_save', 'bizznis_inpost_scripts_nonce' ); ?>

'', ) ); bizznis_save_custom_fields( $data, 'bizznis_inpost_scripts_save', 'bizznis_inpost_scripts_nonce', $post, $post_id ); }