Add a select a class dropdown in tinymce

To achieve the dropdown styles we have to use the filter hook tiny_mce_before_init. This filter grants developers access to the TinyMCE settings array. The following example adds custom style options to an existing Style dropdown. add_filter( ‘tiny_mce_before_init’, ‘my_mce_before_init’ ); function my_mce_before_init( $settings ) { $style_formats = array( array( ‘title’ => ‘1/5 Block’, ‘block’ => ‘div’, … Read more

Close TinyMCE plugin window on click away

You asked the question a long ago but I was looking for something similar and found a solution. Enqueue an admin side script on post edit screens(where we have tinyMCE). Then use the code below: (function($) { ‘use strict’; $(document).ready(function() { $(document).on( ‘click’, ‘#mce-modal-block’, function() { tinyMCE.activeEditor.windowManager.close(); }); }); })(jQuery); This way you can close … Read more

TinyMCE Plugin Parameter

The first few you listed are not WordPress specific, and information about them can be found as follows: inlinepopups tabfocus paste media fullscreen As for the WordPress specific plugins, their source code is here (trac). There are no comments, but here’s my take based on a very cursory read through: wordpress: seems to setup the … Read more

How can I find the ‘public absolute’ path of a file?

Assuming your resource is included in your Plugin: plugins_url() is the URL to \wp-content\plugins\ (Codex ref) So if you have a .js file in \wp-content\plugins\plugin-slug\file.js: <?php echo plugins_url() . ‘\plugin-slug\file.js’; ?> BUT WAIT!! If your purpose is actually to load a javascript file, you actually want to enqueue that file, using wp_enqueue_script(), hooked into the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)