Adding a Media Button to the WordPress Content Editor

According to what you have posted, the action “wp_enqueue_media” is missing for the function “include_media_button_js_file”. In this case, the JavaScript file “media_button.js” would never be loaded. By the way, the function “wp.media” opens the media dialog for uploading or selecting images. However, you cannot enter any text in this dialog. Maybe the following example will … Read more

How to add custom HTML tags in the visual mode via keyboard only?

if you are using classic TinyMCE editor then perhaps you can modify it add custom styles. Following code may help you create visual buttons for adding inline styles. // Add Formats Dropdown Menu To MCE if ( ! function_exists( ‘mk_style_select’ ) ) { function mk_style_select( $buttons ) { array_push( $buttons, ‘styleselect’ ); return $buttons; } … Read more

qTranslate 2.5.28 and WordPress 3.3.1 issues [closed]

In /wp-content/plugins/qtranslate/qtranslate_wphacks.php, line 89, change this: // do some crazy js to alter the admin view $content .=”<script type=\”text/javascript\”>\n// <![CDATA[\n”; $content .=”function qtrans_editorInit1() {\n”; // include needed js functions $content .= $q_config[‘js’][‘qtrans_is_array’]; $content .= $q_config[‘js’][‘qtrans_xsplit’]; $content .= $q_config[‘js’][‘qtrans_split’]; $content .= $q_config[‘js’][‘qtrans_integrate’]; $content .= $q_config[‘js’][‘qtrans_use’]; $content .= $q_config[‘js’][‘qtrans_switch’]; $content .= $q_config[‘js’][‘qtrans_assign’]; $content .= $q_config[‘js’][‘qtrans_save’]; $content .= … Read more

Commenting out in HTML editor breaks template

My last comment reminded me about shortcodes, and lead me to this answer: function htmlcomment_shortcode( $atts, $content = null ) { return ‘<!– ‘ . $content . ‘ –>’; } add_shortcode( ‘htmlcomment’, ‘htmlcomment_shortcode’ ); Add that to functions.php or your plugin, and then use it in your content like this: normal text [htmlcomment]commented out text[/htmlcomment]

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