Ticket #17850: register-meta-test.php
File register-meta-test.php, 345 bytes (added by , 13 years ago) |
---|
Line | |
---|---|
1 | <?php |
2 | |
3 | function _meta_sanitize_cb ( $meta_value, $meta_key, $meta_type ) { |
4 | return $meta_value; |
5 | } |
6 | |
7 | function _meta_yes_you_can( $can, $key, $post_id, $user_id, $cap, $caps ) { |
8 | return true; |
9 | } |
10 | |
11 | function test_register_meta() { |
12 | register_meta( 'post', '_foo', '_meta_sanitize_cb', '_meta_yes_you_can'); |
13 | } |
14 | add_action( 'init', 'test_register_meta' ); |