Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'some_image_preview', 'get_preview_image', 10, 1 );
- function image_preview_add_meta_box() {
- add_meta_box(
- 'image_preview-image-preview',
- __( 'Image Preview', 'image_preview' ),
- 'image_preview_html',
- 'post',
- 'normal',
- 'high'
- );
- }
- add_action( 'add_meta_boxes', 'image_preview_add_meta_box' );
- function image_preview_html( $post ) {
- wp_nonce_field( '_image_preview_nonce', 'image_preview_nonce' );
- do_action( 'some_image_preview', $post );
- }
- function get_preview_image( $post ) {
- echo 'This is cool!';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement