diff --git a/src/php/inc/custom-post-types/example-custom-post-type.php b/src/php/inc/custom-post-types/example-custom-post-type.php index b2649fc..fc1cfd6 100644 --- a/src/php/inc/custom-post-types/example-custom-post-type.php +++ b/src/php/inc/custom-post-types/example-custom-post-type.php @@ -58,6 +58,5 @@ function custom_post_type() { 'capability_type' => 'page', ); register_post_type( 'example', $args ); - } add_action( 'init', 'custom_post_type', 0 ); diff --git a/src/php/inc/helpers/generic.php b/src/php/inc/helpers/generic.php index a9e1234..57b36a8 100644 --- a/src/php/inc/helpers/generic.php +++ b/src/php/inc/helpers/generic.php @@ -137,4 +137,3 @@ function get_featured_image_url( $size = 'full' ) { $thumb_url = $thumb_url_array[0]; return $thumb_url; } - diff --git a/src/php/inc/metaboxes/example.php b/src/php/inc/metaboxes/example.php index 0c88780..efde297 100644 --- a/src/php/inc/metaboxes/example.php +++ b/src/php/inc/metaboxes/example.php @@ -15,20 +15,20 @@ function example_register_meta_boxes( $meta_boxes ) { $prefix = 'spark_example_'; - $meta_boxes[] = [ + $meta_boxes = array( 'title' => 'Example', 'id' => $prefix . 'metaboxes', - 'post_types' => [ 'page' ], // What types of post types e.g. posts, pages, custom_post_type. + 'post_types' => array( 'page' ), // What types of post types e.g. posts, pages, custom_post_type. 'context' => 'side', // Where to display on admin page. https://docs.metabox.io/creating-meta-boxes/#contexts . 'priority' => 'high', - 'fields' => [ - [ + 'fields' => array( + array( 'type' => 'checkbox', 'id' => $prefix . 'checkbox_example', 'name' => 'Checkbox', 'desc' => 'Click Yes or No!', - ], - [ + ), + array( 'type' => 'text', 'id' => $prefix . 'text_example', 'name' => 'Text', @@ -36,22 +36,22 @@ function example_register_meta_boxes( $meta_boxes ) { 'std' => 'Default Value', 'placeholder' => 'Try me out', 'clone' => true, - ], - [ + ), + array( 'type' => 'image_advanced', 'id' => $prefix . 'image_example', 'name' => 'Image Advanced', 'desc' => 'Upload an Image.', 'max_file_uploads' => 1, 'max_status' => true, - ], - [ + ), + array( 'type' => 'wysiwyg', 'id' => $prefix . 'wysiwyg_example', 'name' => 'WYSIWYG', - ], - ], - ]; + ), + ), + ); return $meta_boxes; } diff --git a/src/php/inc/taxonomies/example-custom-taxonomy.php b/src/php/inc/taxonomies/example-custom-taxonomy.php index 038d271..9733367 100644 --- a/src/php/inc/taxonomies/example-custom-taxonomy.php +++ b/src/php/inc/taxonomies/example-custom-taxonomy.php @@ -25,6 +25,5 @@ function register_custom_taxonomy() { 'show_tagcloud' => true, ); register_taxonomy( 'example_custom_tax', array( 'example' ), $args ); - } add_action( 'init', 'register_custom_taxonomy', 0 ); diff --git a/src/php/inc/theme-setup.php b/src/php/inc/theme-setup.php index b80c202..3176fc8 100644 --- a/src/php/inc/theme-setup.php +++ b/src/php/inc/theme-setup.php @@ -111,6 +111,5 @@ function custom_hide_editor() { add_filter( 'use_block_editor_for_post', '__return_false' ); remove_post_type_support( 'page', 'editor' ); } - } add_action( 'admin_init', 'custom_hide_editor' );