Last active
August 29, 2015 14:23
-
-
Save davisshaver/4a836562441f5a6907f2 to your computer and use it in GitHub Desktop.
Snippet for adding a basic Publishing Checklist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'publishing_checklist_init', function() { | |
$args = array( | |
'label' => esc_html__( 'Featured Image', 'demo_publishing_checklist' ), | |
'callback' => function ( $post_id, $id ) { | |
return has_post_thumbnail( $post_id ); | |
}, | |
'explanation' => esc_html__( 'A featured image is required.', 'demo_publishing_checklist' ), | |
'post_type' => array( 'post' ), | |
); | |
Publishing_Checklist()->register_task( 'demo-featured-image', $args ); | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment