customize tiny MCE blockqute

If it’s for styling purpose, the fastest solution I could think of is by using Javascript. As far as I know, modifying the output of TinyMCE tag would require editing of WordPress core files, so it’s more practical to append a <span> with Javascript. Something like this would do: <script type=”text/javascript> $(‘.post blockquote’).wrapInner(‘<span />’); </script> … Read more

Qtranslate + Woocommerce (multiple tinymce) [closed]

Do you absolutely have to use qTranslate to do it? If not, read the official documentation for recommended method of translation: http://docs.woothemes.com/document/woocommerce-localization/ Also try any plugin that is made to integrate with WooCommerce such as WPML. Fixing compatibility between two plugins that is not integrated is not really worth the trouble. They are going to … Read more

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

TinyMCE buttons that launch Ajax-generated forms

by using jQuery.ajax(): so, instead of that big form variable: $.ajax({ type: ‘GET’, url: ‘admin-ajax.php’, data: { action: ‘get_my_form’ }, success: function(response){ var table = $(response).find(‘table’); // you don’t seem to use this “table” var $(response).appendTo(‘body’).hide(); // … } }); Now, the php: add_action(‘wp_ajax_get_my_form’, ‘get_my_form’); function get_my_form(){ // build your form here and echo it … Read more

Placing tags on wordpress visual editor using shortcodes

Assuming you don’t have the shortcode written down… function search_shortcode() { $struct=”<div class=”searchbar” ><div class=”searchbar-inner” >search <input type=”text” id=”search” /><span class=”result-count” ></span></div></div>”; return $struct; } add_shortcode(‘search_box’, ‘search_shortcode’); Make sure your editor is in the ‘HTML’ mode, and paste the shortcode as ‘search_box’. Using a shortcode will allow you to reuse this form anywhere you want.

jQuery UI styles conflicting with TinyMCE dialog

It should work just fine if you enqueue your script & stylesheet within functions.php file. This is how I do that (feel free to copy & paste, it should work out of the box): function load_my_admin_js() { wp_register_script(‘jquery-ui’,”https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.min.js”); wp_enqueue_script(‘jquery-ui’); } add_action(‘admin_init’, ‘load_my_admin_js’); function load_my_admin_css() { wp_enqueue_style( ‘jquery-ui’, ‘http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css’); } add_action( ‘admin_print_styles’, ‘load_my_admin_css’); Don’t forget to … Read more

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