List of plugin updates in admin bar

Here’s the code that extracts update plugin information with get_plugin_updates and wrestles some info from the returned objects, which sadly do not contain changelog information. A node is created in the admin bar for every available update. I suppose I could expand this to a plugin that also lists core, theme and translation updates if … Read more

Give editors access to particular plugin – turn “admin.php” into “edit.php”

As I mentioned, it’s not the best practice to edit the plugin’s source codes because this will be overwritten if you were to get the latest update from the author. Nonetheless, to allow the Business Opening Hours plugin to show for your Editors open /business-opening-hours/bizo-hours.php and tweak the following lines. At the time of this … Read more

How can I enqueue a style only when a particular widget is active?

You need to modify this a little bit. class Organiser extends WP_Widget { … function __construct() { add_action( ‘wp_enqueue_scripts’, array(‘Organiser’, ‘register_plugin_styles’) ); … } public function widget( $args, $instance ) { wp_enqueue_style( ‘organiserStyle’ ); include(dirname(__FILE__).”/organiserWidget.php”); } static function register_plugin_styles() { wp_register_style( ‘organiserStyle’, plugins_url( ‘organiser/css/organiserStyle.css’ ) ); // wp_register_style( ‘organiserStyle’, plugin_dir_url( __FILE__ ) . ‘css/organiserStyle.css’ ); … Read more