Created
September 25, 2021 10:35
-
-
Save dgwyer/b34f37f6c3437648d468692157c96950 to your computer and use it in GitHub Desktop.
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 | |
/** | |
* Plugin Name: Post Meta Registration Test | |
* Version: 0.1.0 | |
* Text Domain: post-meta-registration-test | |
*/ | |
function register_post_meta_1() { | |
register_post_meta( 'post', 'test_post_data1', array( | |
'show_in_rest' => true, | |
'single' => true, | |
'type' => 'string', | |
) ); | |
} | |
add_action( 'init', 'register_post_meta_1' ); | |
function register_post_meta_2() { | |
register_meta( | |
'post', | |
'test_post_data2', array( | |
'type' => 'string', | |
'single' => true, | |
'show_in_rest' => true, | |
) ); | |
} | |
add_action( 'init', 'register_post_meta_2' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment