custom user tables supported in SharDB plugin?

Ok, looking into this, I found a little bug in the tables function (beginning on line 1088) in the db.php script file that comes with SharDB. It was this bit of code that was the problem (starting on line 1114 of db.php): if ( isset( $tables[‘users’] ) ) { if( defined( ‘CUSTOM_USER_TABLE’ ) ) $pre_tables[‘users’] … Read more

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