WordPress Built In Dialog Box For My Plugin

This can be done using a front-end developer’s skills. What i achieved through the customization is as follows. Through the following code: <?php add_thickbox(); ?> <div id=”my-content-id” style=”display:none;”> <link rel=”stylesheet” href=”https://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css”> <script src=”https://code.jquery.com/jquery-1.10.2.js”></script> <script src=”https://code.jquery.com/ui/1.11.4/jquery-ui.js”></script> <script> $(function() { $( “#tabs” ).tabs(); }); </script> <div id=”tabs” style=””> <ul> <li><a href=”#tabs-1″>Insert Edit/link</a></li> <li><a href=”#tabs-2″>My Second Tab</a></li> </ul> … Read more

WordPress 3.5 Media Manager – add a button

This block of code will add a button right next to the “Insert into post” one. When clicked, it will send selected images to WP editor, each wrapped inside your template HTML: var wpMediaFramePost = wp.media.view.MediaFrame.Post; wp.media.view.MediaFrame.Post = wpMediaFramePost.extend( { mainInsertToolbar: function( view ) { “use strict”; wpMediaFramePost.prototype.mainInsertToolbar.call(this, view); var controller = this; this.selectionStatusToolbar( view … Read more

trigger(‘change’) not working

To use a custom control, you need a field with special attributes to be linked to the “publish” button. if you don’t want to display this field, you can generate a hidden field like that : class WP_Test_2_Customize_Control extends WP_Customize_Control { public function render_content() { ?> <input id=”<?php echo htmlspecialchars(“_customize-input-{$this->id}”);?>” type=”hidden” <?php $this->input_attrs();?> <?php if … Read more

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