Created
January 8, 2016 21:48
-
-
Save rfmeier/b6e4e105f4d800907009 to your computer and use it in GitHub Desktop.
Register custom meta boxes for the 'testimony' archive settings
This file contains hidden or 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 | |
| /** | |
| * Register custom meta boxes for the 'testimony' archive settings. | |
| */ | |
| add_action( 'genesis_cpt_archives_settings_metaboxes' , 'cpt_as_testimony_archive_metaboxes' ); | |
| /** | |
| * Callback for Genesis 'genesis_cpt_archives_settings_metaboxes' action. | |
| * | |
| * Register custom meta boxes for the 'testimony' archive settings. | |
| * | |
| * @uses add_meta_box() | |
| * @see https://codex.wordpress.org/Function_Reference/add_meta_box | |
| * | |
| * @global $_genesis_admin_cpt_archives_testimony Genesis_Admin_CPT_Archive_Settings object for the 'testimony' post type. | |
| * | |
| * @since 0.0.1 | |
| * | |
| * @param string $pagehook The current page hook. | |
| * @return void | |
| */ | |
| function cpt_as_testimony_archive_metaboxes( $pagehook ) { | |
| global $_genesis_admin_cpt_archives_testimony; | |
| //* ensure we are on the correct archive settings page. | |
| if ( $pagehook !== $_genesis_admin_cpt_archives_testimony->pagehook ) { | |
| return; | |
| } | |
| add_meta_box( | |
| 'cpt_as_testimony_posts_per_page_metabox', | |
| __( 'Testimony Extras', 'genesis-custom-post-type-archive-sample' ), | |
| 'cpt_as_display_archive_settings_posts_per_page_box', | |
| $pagehook, | |
| 'main' | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment