Created
April 27, 2016 12:50
-
-
Save greatislander/6428f1cb4e1a3fadeae7206872b1c038 to your computer and use it in GitHub Desktop.
Extra metadata for Book Information
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 | |
function pb_gs_add_meta_boxes() { | |
x_add_metadata_group( 'google-scholar-metadata', 'metadata', array( | |
'label' => __( 'Google Scholar Metadata', 'pressbooks-google-scholar' ) | |
) ); | |
x_add_metadata_field( 'citation_title', 'metadata', array( | |
'group' => 'google-scholar-metadata', | |
'label' => __( 'Citation Title', 'pressbooks-google-scholar' ) | |
) ); | |
x_add_metadata_field( 'citation_author', 'metadata', array( | |
'group' => 'google-scholar-metadata', | |
'label' => __( 'Citation Author', 'pressbooks-google-scholar' ) | |
) ); | |
x_add_metadata_field( 'citation_publication_date', 'metadata', array( | |
'field_type' => 'datepicker', | |
'group' => 'google-scholar-metadata', | |
'label' => __( 'Citation Publication Date', 'pressbooks-google-scholar' ) | |
) ); | |
} | |
add_action( 'custom_metadata_manager_init_metadata', 'pb_gs_add_meta_boxes' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment