Using a function to change favorites listing

I recently needed to change the default output also. Here’s how I used this filter to add the post content to the output. /** * Customize the Favorites Listing HTML */ add_filter( ‘favorites/list/listing/html’, ‘custom_favorites_listing_html’, 10, 4 ); function custom_favorites_listing_html($html, $markup_template, $post_id, $list_options) { $html=” <li class=”favorite”> <div class=”favorite-image”> ” . get_the_post_thumbnail( $post_id, ‘our-products’ ) . … Read more

Display update notification messages like ‘What’s New’

You can hook into in_plugin_update_message-{$file}. For the above plugin, the according code looks as follows: add_action(‘admin_menu’, array($this,’admin_menu’), 11); function admin_menu() { global $pagenow; if( $pagenow == ‘plugins.php’ ) { $hook = apply_filters(‘acf/get_info’, ‘hook’); add_action( ‘in_plugin_update_message-‘ . $hook, array($this, ‘in_plugin_update_message’), 10, 2 ); } } function in_plugin_update_message( $plugin_data, $r ) { $version = apply_filters(‘acf/get_info’, ‘version’); $readme … Read more