Skip to content

Commit

Permalink
chore: update php to match new linting rules
Browse files Browse the repository at this point in the history
  • Loading branch information
theogainey committed Sep 14, 2023
1 parent 1bb5697 commit b4e1b58
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 17 deletions.
1 change: 0 additions & 1 deletion src/php/inc/custom-post-types/example-custom-post-type.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,5 @@ function custom_post_type() {
'capability_type' => 'page',
);
register_post_type( 'example', $args );

}
add_action( 'init', 'custom_post_type', 0 );
1 change: 0 additions & 1 deletion src/php/inc/helpers/generic.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,3 @@ function get_featured_image_url( $size = 'full' ) {
$thumb_url = $thumb_url_array[0];
return $thumb_url;
}

26 changes: 13 additions & 13 deletions src/php/inc/metaboxes/example.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,43 +15,43 @@
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',
'desc' => 'Put Text Here',
'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;
}
Expand Down
1 change: 0 additions & 1 deletion src/php/inc/taxonomies/example-custom-taxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
1 change: 0 additions & 1 deletion src/php/inc/theme-setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );

0 comments on commit b4e1b58

Please sign in to comment.