Translate MCE button text/tooltip in custom plugin

Create js file button.js and add js directory and list-btn.png needed (function() { tinymce.create(“tinymce.plugins.listbuttons_button_plugin”, { //url argument holds the absolute url of our plugin directory init : function(ed, url) { //add new button ed.addButton(“listbuttons”, { title : “Add Related post shortcode”, cmd : “listbuttons_command”, image : “images/list-btn.png” }); ed.addCommand(“listbuttons_command”, function() { var return_text = “[related]”; … Read more

CSS not affecting widget output

The problem was due to an incorrect file path in the movieposterdisplay-scripts file. Whilst the file loaded correctly in the main php file require_once(plugin_dir_path(__FILE__).’/includes/movieposterdisplay- class.php’); as it already assigned the correct plugin folder name. It did not enqueue correctly as the code was wp_enqueue_style(‘mpd-main-style’, plugins_url().’/movieposterdisplay/css/style.css’); and I had previously changed the folder name. Hence I … Read more

Filter Categories widget to allow custom sorting?

Hi @Scott B: From /wp-includes/widgets.php for the WP_Category_Widget class we have the following code (line 438 in WordPress v3.0.4): $cat_args = array(‘orderby’ => ‘name’, ‘show_count’ => $c, ‘hierarchical’ => $h); if ( $d ) { $cat_args[‘show_option_none’] = __(‘Select Category’); wp_dropdown_categories( apply_filters(‘widget_categories_dropdown_args’,$cat_args) ); From that I would surmise the hook ‘widget_categories_dropdown_args’ should allow you to set … Read more

Issue with contextual help overwriting existing content

In order to not delete help from all other screens, you need to always return the contextual help text, otherwise your filter doesn’t return anything for non-page/post screens and so nothing will show up. Move the return to the bottom of the function, outside of your if/else. Also, the original contextual help is being concatenated … Read more