0

is there any way how to safely get content of the publish box? enter image description here

For example via some hook or filter? I wasn't able to find anything.

I need to place in in some different place.

  • You can get the content by post id, check This thread – Felix Dec 10 '15 at 21:22
  • It's not what I want. I edited the question so it's more clear what I try to do. – Jakub Kohout Dec 10 '15 at 23:34
  • Where do you want to move the submit metabox? – birgire Dec 11 '15 at 11:39
0
add_action( 'post_submitbox_misc_actions', 'show_current_filter' );
add_action( 'post_submitbox_start', 'show_current_filter' );

function show_current_filter()
{
    $post = get_post();

    print '<pre>' .  $post->ID . ' : ' . current_filter() . '</pre>';
}
| improve this answer | |
  • ok but how this helps me getting the content of the whole publish box? – Jakub Kohout Dec 11 '15 at 19:23
  • What do you need to do? If you want the contents can't you just target it with jQuery? – jgraup Dec 11 '15 at 20:10
  • You wanted a hook and the above will give you a hook to add something. If you just need a publish button then make a mata box and write you're own publish button. Describing your end goal could net you a much more fruitful answer. – jgraup Dec 11 '15 at 20:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.