Hello,
I would like to add a 'print' button to the all posts/ custom post type admin area. So the user can filter their posts/ custom posts and then click 'print' to print whatever the filtered results show in the table. How would you go about this?
Thanks :)
UPDATE: I now understand the best way to do this is to use the new 'bulk actions' added in 4.7 . So don't have the 'print' icon itself. I'm looking to know how I can add 'print' to bulk actions.
User161391 answers:
hey pollard
Desing before print window
User161391 comments:
<?php $url = get_edit_post_link( $id, $context ); ?>
<?php if($url == '<?php echo get_site_url();?>/wp-admin/post.php?post=296&action=edit'){ ?>
<img src="<?php echo get_site_url();?>/wp-content/icon/images.png" type="button" value="Print this page" onClick="window.print()">
<?php } ?>
User161391 comments:
Put it Down above code in line no: 48
on this file : /wp-admin/admin-footer.php
Matthew Pollard comments:
This involves editing the wordpress core. So it will just be overwritten and lost once wordpress has been updated.