function form($instance) { $defaults = array('title' => '', 'profile_id' => '', 'stream' => 'true', 'connections' => 'show', 'width' => '300', 'height' => '550', 'header' => 'small', 'cover_photo' => 'show', 'locale' => 'en_US'); $instance = wp_parse_args((array) $instance, $defaults); ?> <p class="flb_field"> <label for="title">Title:</label> <br> <input id="<?php echo $this->get_field_id('title'); ?> " name="<?php echo $this->get_field_name('title'); ?> " type="text" value="<?php echo $instance['title']; ?> " class="widefat"> </p> <p class="flb_field"> <label for="<?php echo $this->get_field_id('profile_id'); ?> ">Page ID:</label> <br> <input id="<?php echo $this->get_field_id('profile_id'); ?> " name="<?php echo $this->get_field_name('profile_id'); ?> " type="text" value="<?php echo $instance['profile_id']; ?> " class="widefat"> </p> <p class="flb_field"> <label for="<?php echo $this->get_field_id('width'); ?> ">Like box Width:</label> <br> <input id="<?php echo $this->get_field_id('width'); ?> " name="<?php echo $this->get_field_name('width'); ?> " type="text" value="<?php echo $instance['width']; ?> " class="" size="3"> <small>(px)</small> </p> <p class="flb_field"> <label for="<?php echo $this->get_field_id('height'); ?> ">Like box Height:</label> <br> <input id="<?php echo $this->get_field_id('height'); ?> " name="<?php echo $this->get_field_name('height'); ?> " type="text" value="<?php echo $instance['height']; ?> " class="" size="3"> <small>(px)</small> </p> <label for="this_is_a_bad">Facebook Like box Animation: <span style="color:rgba(10, 154, 62, 1);;font-weight:bold;">Pro feature!</span></label> <br> <?php like_box_setting::generete_animation_select('this_is_a_bad', 'none'); ?> <br> <br> <label for="<?php echo $this->get_field_id('show_border'); ?> ">Show Facebook Like box border: <span style="color:rgba(10, 154, 62, 1);;font-weight:bold;">Pro feature!</span></label> <br> <select id="show_like_box_border" name="show_like_box_border_name" onMouseDown="alert('If you want to use this feature upgrade to Like box Pro')"> <option selected="selected" value="show">Show</option> <option value="hide">Hide</option> </select> <br> <br> <label for="border_color">Facebook Like box Border Color: <span style="color:rgba(10, 154, 62, 1);;font-weight:bold;">Pro feature!</span></label> <br> <div class="disabled_for_pro" onclick="alert('If you want to use this feature upgrade to Like box Pro')"> <div class="wp-picker-container"><a tabindex="0" class="wp-color-result" title="Select Color" data-current="Current Color" style="background-color: rgb(255, 255, 255);"></a></div> </div> <p class="flb_field"> <label for="<?php echo $this->get_field_id('stream'); ?> ">Show Facebook latest posts: <span style="color:rgba(10, 154, 62, 1);;font-weight:bold;">Pro feature!</span></label> <br> <select onMouseDown="alert('If you want to use this feature upgrade to Like box Pro')" id="like_box_latest_post" name="like_box_latest_post_name"> <option value="show">Show</option> <option selected="selected" value="hide">Hide</option> </select> </p> <p class="flb_field"> <label for="<?php echo $this->get_field_id('connections'); ?> ">Show/Hide Friends Faces:</label> <br> <select id="<?php echo $this->get_field_id('connections'); ?> " name="<?php echo $this->get_field_name('connections'); ?> "> <option <?php selected($instance['connections'], 'show'); ?> value="show">Show</option> <option <?php selected($instance['connections'], 'hide'); ?> value="hide">Hide</option> </select> </p> <p class="flb_field"> <label for="<?php echo $this->get_field_id('header'); ?> ">Select Like box Header size:</label> <br> <select id="<?php echo $this->get_field_id('header'); ?> " name="<?php echo $this->get_field_name('header'); ?> "> <option <?php selected($instance['header'], 'small'); ?> value="small">Small</option> <option <?php selected($instance['header'], 'big'); ?> value="big">Big</option> </select> </p> <p class="flb_field"> <label for="<?php echo $this->get_field_id('header'); ?> ">Like box cover photo:</label> <br> <select id="<?php echo $this->get_field_id('cover_photo'); ?> " name="<?php echo $this->get_field_name('cover_photo'); ?> "> <option <?php selected($instance['cover_photo'], 'show'); ?> value="show">Show</option> <option <?php selected($instance['cover_photo'], 'hide'); ?> value="hide">Hide</option> </select> </p> <p class="flb_field"> <label for="<?php echo $this->get_field_id('locale'); ?> ">Like box language:</label> <br> <input id="<?php echo $this->get_field_id('locale'); ?> " name="<?php echo $this->get_field_name('locale'); ?> " type="text" value="<?php echo $instance['locale']; ?> " class="" size="4"> <small>(en_US, de_DE...)</small> </p> <a href="http://wpdevart.com/wordpress-facebook-like-box-plugin/" target="_blank" style="color: rgba(10, 154, 62, 1);; font-weight: bold; font-size: 18px; text-decoration: none;">Upgrade to Pro Version</a><br> <br> <br> <input type="hidden" id="flb-submit" name="flb-submit" value="1"> <script> var pro_text='If you want to use this feature upgrade to Like box Pro'; jQuery(".color_my_likbox").ready(function(e) { jQuery(".color_my_likbox").each(function(index, element) { if(!jQuery(this).hasClass('wp-color-picker') && jQuery(this).attr('name').indexOf('__i__')==-1){ jQuery(this).wpColorPicker()}; }); }); </script> <?php }
public function like_box_window_insert_content() { ?> <style> #miain_like_box_window_manager > tbody > tr:nth-child(odd) { background-color: rgba(176, 176, 176, 0.07); } #miain_like_box_window_manager>tfoot>tr>td{ border-top:1px solid #ccc; } #TB_window{ overflow-y: auto; } #TB_ajaxContent{ width:95% !important; } .wp-picker-holder{ position: absolute; z-index: 100000; } .desription_class{ float: right; cursor: default; color: #0074a2; font-size: 18px; font-weight: bold; border: 1px solid #000000; border-radius: 200px; height: 20px; padding-left: 6px; padding-right: 6px; margin-left: 15px; } .pro_feature { font-size: 13px; font-weight: bold; color: rgba(10, 154, 62, 1); } .input_placholder_small{ width: 85%;} .input_placholder_small::-webkit-input-placeholder { font-size:11px; } .input_placholder_small::-moz-placeholder {font-size:11px; } /* firefox 19+ */ .input_placholder_small:-ms-input-placeholder { font-size:11px; } /* ie */ .input_placholder_smallinput:-moz-placeholder { font-size:11px; } </style> <script>var pro_text='"If you want to use this feature upgrade to Like box Pro"'</script> <table id="miain_like_box_window_manager" class="wp-list-table widefat fixed posts section_parametrs_table"> <tbody> <tr> <td> Page ID <span class="desription_class" title="Type here your Facebook like box page url(without https://www.facebook.com/, if your Facebook page url is https://www.facebook.com/uefacom then type here just uefacom).">?</span> </td> <td> <input id="like_box_profile_id" type="text" value="" class="widefat"> </td> </tr> <tr> <td> Like box Animation <span class="pro_feature"> (pro)</span><span class="desription_class" title="Choose Facebook like box Animation type.">?</span> </td> <td> <?php like_box_setting::generete_animation_select('animation_efect', 'none'); ?> </td> </tr> <tr> <td> Show/Hide Like box border <span class="pro_feature"> (pro)</span><span title="Show/Hide Facebook like box border." class="desription_class">?</span> </td> <td> <select onMouseDown="alert(pro_text); return false;" id="like_box_show_border"> <option selected="selected" value="show">Show</option> <option value="hide">Hide</option> </select> </td> </tr> <tr> <td> Like box Border color <span class="pro_feature"> (pro)</span><span title="Type the Border Color of your Facebook Like box." class="desription_class">?</span> </td> <td> <div onClick="alert(pro_text); return false;" class="disabled_picker"> <div class="wp-picker-container"><a tabindex="0" class="wp-color-result" title="Select Color" data-current="Current Color" style="background-color: rgb(255, 255, 255);"></a></div> </div> </td> </tr> <tr> <td> Show/Hide Page Posts <span class="pro_feature"> (pro)</span><span class="desription_class" title="Show/Hide the Page Posts from your Facebook Like box.">?</span> </td> <td> <select onMouseDown="alert(pro_text); return false;" id="like_box_stream"> <option value="show">Show</option> <option selected="selected" value="hide">Hide</option> </select> </td> </tr> <tr> <td> Show/Hide Friends Faces <span title="Select to Show/Hide Friends Faces" class="desription_class">?</span> </td> <td> <select id="like_box_connections"> <option selected="selected" value="show">Show</option> <option value="hide">Hide</option> </select> </td> </tr> <tr id="like_box_static_width"> <td> Like box Width <span title="Type Facebook Like box width" class="desription_class">?</span> </td> <td> <input placeholder="The pixel width of the embed (Min. 180 to Max. 500)" id="like_box_width" type="text" value="300" class="input_placholder_small" ><small>(px)</small> </td> </tr> <tr> <td> Like box Height <span title="Type Facebook Like box height." class="desription_class">?</span> </td> <td> <input placeholder="The pixel height of the embed (Min. 70)" id="like_box_height" type="text" value="550" class="input_placholder_small" ><small>(px)</small> </td> </tr> <tr> <td> Select Like box Header size<span title="Select Like box Header size" class="desription_class">?</span> </td> <td> <select id="like_box_header_size"> <option selected="selected" value="small">Small</option> <option value="big">Big</option> </select> </td> </tr> <tr> <td> Like box cover photo<span title="Select to show/hide Like box cover photo" class="desription_class">?</span> </td> <td> <select id="like_box_cover_photo"> <option selected="selected" value="show">Show</option> <option value="hide">Hide</option> </select> </td> </tr> <tr> <td> Like box language <span title="Type the Facebook Like box language code." class="desription_class">?</span> </td> <td> <input id="like_box_locale" type="text" value="en_US" class="" size="4"><small>(en_US, de_DE...)</small> </td> </tr> </tbody> <tfoot> <tr> <td colspan="2"> <div style="display:inline-block; float:left;" class="mceActionPanel"><input type="button" id="cancel" name="cancel" value="Insert Like Box" class="button button-primary" onClick="insert_like_box();"/></div> <span style="float:right"><a href="http://wpdevart.com/wordpress-facebook-like-box-plugin/" target="_blank" style="color: rgba(10, 154, 62, 1);; font-weight: bold; font-size: 18px; text-decoration: none;">Upgrade to Pro Version</a><br></span> </td> </tr> </tfoot> </table> <script type="text/javascript"> jQuery('#TB_window').css('max-height',(jQuery('#miain_like_box_window_manager').height()+66)+'px'); jQuery('#TB_ajaxContent').css('max-height',(jQuery('#miain_like_box_window_manager').height()+16)+'px'); jQuery('#miain_like_box_window_manager').ready(function(e) { jQuery(".color_my_likbox").wpColorPicker(); }); function insert_like_box() { if(jQuery('#like_box_profile_id').val()!=''){ var tagtext; var generete_atributes = 'profile_id="'+jQuery('#like_box_profile_id').val()+'" connections="'+jQuery('#like_box_connections').val()+'" width="'+jQuery('#like_box_width').val()+'" height="'+jQuery('#like_box_height').val()+'" header="'+jQuery('#like_box_header_size').val()+'" cover_photo="'+jQuery('#like_box_cover_photo').val()+'" locale="'+jQuery('#like_box_locale').val()+'"' tagtext = '[wpdevart_like_box '+generete_atributes+']'; window.send_to_editor(tagtext); tb_remove() } else{ alert('Page id field is required') } } </script> </body> </html> <?php die; }
function form($instance) { $defaults = array('title' => '', 'profile_id' => '', 'connections' => '6', 'width' => '300', 'height' => '550', 'header' => false, 'locale' => 'en_US'); $instance = wp_parse_args((array) $instance, $defaults); ?> <p class="flb_field"> <label for="title">Title:</label> <br> <input id="<?php echo $this->get_field_id('title'); ?> " name="<?php echo $this->get_field_name('title'); ?> " type="text" value="<?php echo $instance['title']; ?> " class="widefat"> </p> <p class="flb_field"> <label for="<?php echo $this->get_field_id('profile_id'); ?> ">Page ID:</label> <br> <input id="<?php echo $this->get_field_id('profile_id'); ?> " name="<?php echo $this->get_field_name('profile_id'); ?> " type="text" value="<?php echo $instance['profile_id']; ?> " class="widefat"> </p> <label>Facebook Like box Theme <span style="color:rgba(10, 154, 62, 1);;font-weight:bold;">Pro feature!</span></label> <br> <select onclick="alert('If you want to use this feature upgrade to Like box Pro')"> <option selected="selected" value="light">Light</option> <option value="dark">Dark</option> </select> <br> <br> <label>Facebook Like box Animation<span style="color:rgba(10, 154, 62, 1);;font-weight:bold;">Pro feature!</span></label> <br> <?php like_box_setting::generete_animation_select('gagggoo', 'none'); ?> <br> <br> <label>Facebook Like box background color <span style="color:rgba(10, 154, 62, 1);;font-weight:bold;">Pro feature!</span></label> <br> <div class="disabled_for_pro" onclick="alert('If you want to use this feature upgrade to Like box Pro')"> <div class="wp-picker-container"><a tabindex="0" class="wp-color-result" title="Select Color" data-current="Current Color" style="background-color: rgb(255, 255, 255);"></a></div> </div> <br> <label>Facebook Like box Border Color<span style="color:rgba(10, 154, 62, 1);;font-weight:bold;">Pro feature!</span></label> <br> <div class="disabled_for_pro" onclick="alert('If you want to use this feature upgrade to Like box Pro')"> <div class="wp-picker-container"><a tabindex="0" class="wp-color-result" title="Select Color" data-current="Current Color" style="background-color: rgb(255, 255, 255);"></a></div> </div> <br> <label>Show Facebook Like box border <span style="color:rgba(10, 154, 62, 1);;font-weight:bold;">Pro feature!</span></label> <br> <input onMouseDown="alert('If you want to use this feature upgrade to Like box Pro')" name="<?php echo $this->get_field_name('show_border'); ?> " type="radio" value="yes" checked='checked'>Yes <input onMouseDown="alert('If you want to use this feature upgrade to Like box Pro')" name="<?php echo $this->get_field_name('show_border'); ?> " type="radio" value="no">No <br> <p class="flb_field"> <label >Show Facebook latest posts: <span style="color:rgba(10, 154, 62, 1);;font-weight:bold;">Pro feature!</span></label> <input onMouseDown="alert('If you want to use this feature upgrade to Like box Pro')" type="checkbox" value="1" > </p> <p class="flb_field"> <label for="<?php echo $this->get_field_id('connections'); ?> ">Number of connections:</label> <br> <input id="<?php echo $this->get_field_id('connections'); ?> " name="<?php echo $this->get_field_name('connections'); ?> " type="text" value="<?php echo $instance['connections']; ?> " class="" size="3"> <small>(Max. 100)</small> </p> <p class="flb_field"> <label for="<?php echo $this->get_field_id('width'); ?> ">Like box Width:</label> <br> <input id="<?php echo $this->get_field_id('width'); ?> " name="<?php echo $this->get_field_name('width'); ?> " type="text" value="<?php echo $instance['width']; ?> " class="" size="3"> <small>(px)</small> </p> <p class="flb_field"> <label for="<?php echo $this->get_field_id('height'); ?> ">Like box Height:</label> <br> <input id="<?php echo $this->get_field_id('height'); ?> " name="<?php echo $this->get_field_name('height'); ?> " type="text" value="<?php echo $instance['height']; ?> " class="" size="3"> <small>(px)</small> </p> <p class="flb_field"> <label for="<?php echo $this->get_field_id('header'); ?> ">Facebook Like box header:</label> <input id="<?php echo $this->get_field_id('header'); ?> " name="<?php echo $this->get_field_name('header'); ?> " type="checkbox" value="1" class="" size="" <?php checked($instance['header'], 1); ?> > <small>Show/Hide</small> </p> <p class="flb_field"> <label for="<?php echo $this->get_field_id('locale'); ?> ">Like box language:</label> <br> <input id="<?php echo $this->get_field_id('locale'); ?> " name="<?php echo $this->get_field_name('locale'); ?> " type="text" value="<?php echo $instance['locale']; ?> " class="" size="4"> <small>(en_US, de_DE...)</small> </p> <a href="http://wpdevart.com/wordpress-facebook-like-box-plugin/" target="_blank" style="color: rgba(10, 154, 62, 1);; font-weight: bold; font-size: 18px; text-decoration: none;">Upgrade to Pro Version</a><br> <br> <input type="hidden" id="flb-submit" name="flb-submit" value="1"> <script> var pro_text='If you want to use this feature upgrade to Like box Pro'; jQuery(".color_my_likbox").ready(function(e) { jQuery(".color_my_likbox").each(function(index, element) { if(!jQuery(this).hasClass('wp-color-picker') && jQuery(this).attr('name').indexOf('__i__')==-1){console.log(this); jQuery(this).wpColorPicker()}; }); }); </script> <?php }