Blog

25
Oct

Create your own bulk actions

Posted by | | UncategorizedWordpress

Including version 4.6 it was quite difficult to add custom bulk actions to the WordPress admin pages. In version 4.7 a hook is added that simplifies the task a lot: add_action('bulk_actions-{screen_id}', 'my_bulk_action'); Defining the hook As an example we’ll use the post page, the variables are named accordingly. add_filter( 'bulk_actions-edit-post', 'register_my_bulk_actions' ); Definig the hook function register_my_bulk_actions($bulk_actions) { $bulk_actions['my_bulk_action'] = __( 'My Bulk Action', 'domain'); $bulk_actions['my_other_bulk_action'] = __( 'My Other Bulk Action', 'domain'); return $bulk_actions; } You can define more than one bulk action in this function because it merely […]

Read More
24
Oct

Prismatic Syntax Highlighting

Posted by | | Links

Launching my 20th WordPress plugin! Prismatic makes it easy to display beautiful syntax-highlighted code using either Prism.js or Highlight.js. Also includes a “plain flavor” option for escaping code without syntax highlighting. Prismatic is fast, flexible, and 100% free! 馃檪 Direct link to article | View post at DigWP.com Source: WordPress Feed

Read More
17
Oct

WordPress Post Navigation Redux (New Tags!)

Posted by | | DesignnavigationPHPtagstemplate

For years WordPress post navigation has been possible thanks to a flexible set of five functions, including posts_nav_link(), next_post_link() and next_posts_link(). These navigational functions continue to work great in many WordPress themes, but there are newer, even more flexible functions available to theme developers. Introduced in WordPress 4, these new navigation functions can make it easier than ever to display nav links for your WordPress-powered posts. In this DigWP article, we dig into each of these new navigational tags and check out some examples and techniques to enhance your theme-building […]

Read More