Changeset 3021420
- Timestamp:
- 01/13/2024 08:10:24 PM (2 years ago)
- Location:
- facebook-pagelike-widget
- Files:
-
- 28 added
- 3 deleted
- 5 edited
-
tags/6.2 (added)
-
tags/6.2/FacebookLocales.json (added)
-
tags/6.2/assets (added)
-
tags/6.2/assets/css (added)
-
tags/6.2/assets/css/add-review.css (added)
-
tags/6.2/assets/js (added)
-
tags/6.2/assets/js/custom.js (added)
-
tags/6.2/facebook_widget.php (added)
-
tags/6.2/facebook_widget.po (added)
-
tags/6.2/fb.js (added)
-
tags/6.2/fb_class.php (added)
-
tags/6.2/fb_sc.js (added)
-
tags/6.2/includes (added)
-
tags/6.2/includes/add-review.php (added)
-
tags/6.2/loader.gif (added)
-
tags/6.2/readme.txt (added)
-
tags/6.2/screenshot-1.png (added)
-
tags/6.2/screenshot-2.png (added)
-
tags/6.2/screenshot-3.png (added)
-
tags/6.2/short_code.php (added)
-
trunk/admin (added)
-
trunk/admin/assets (added)
-
trunk/admin/assets/css (added)
-
trunk/admin/assets/css/add-review.css (added)
-
trunk/admin/assets/js (added)
-
trunk/admin/assets/js/custom.js (added)
-
trunk/admin/includes (added)
-
trunk/admin/includes/add-review.php (added)
-
trunk/assets (deleted)
-
trunk/facebook_widget.php (modified) (3 diffs)
-
trunk/fb.js (modified) (1 diff)
-
trunk/fb_class.php (modified) (5 diffs)
-
trunk/fb_sc.js (deleted)
-
trunk/includes (deleted)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/short_code.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
facebook-pagelike-widget/trunk/facebook_widget.php
r2863723 r3021420 2 2 /** 3 3 * @package Widget for Social Page Feeds 4 * @version 6. 24 * @version 6.3 5 5 */ 6 6 /* … … 9 9 Description: This widget adds a Simple Facebook Page Like Widget into your WordPress website sidebar within few minutes. 10 10 Author: Milap Patel 11 Version: 6. 211 Version: 6.3 12 12 Author URI: https://patelmilap.wordpress.com/ 13 13 Text Domain: facebook-pagelike-widget … … 51 51 require FB_WIDGET_PLUGIN_BASE_URL . '/fb_class.php'; 52 52 require FB_WIDGET_PLUGIN_BASE_URL . '/short_code.php'; 53 include FB_WIDGET_PLUGIN_BASE_URL . '/ includes/add-review.php';53 include FB_WIDGET_PLUGIN_BASE_URL . '/admin/includes/add-review.php'; 54 54 55 55 } -
facebook-pagelike-widget/trunk/fb.js
r2324530 r3021420 2 2 jQuery('.fb_loader').hide(); 3 3 }); 4 jQuery(document).ready(function() {5 appid = milapfbwidgetvars.app_id;6 select_lng = milapfbwidgetvars.select_lng;7 if (select_lng == '') {8 select_lng = 'en_US';9 }10 (function(d, s, id) {11 var js, fjs = d.getElementsByTagName(s)[0];12 if (d.getElementById(id))13 return;14 js = d.createElement(s);15 js.id = id;16 js.src = "//connect.facebook.net/" + select_lng + "/sdk.js#xfbml=1&version=v2.5&appId=" + appid;17 fjs.parentNode.insertBefore(js, fjs);18 }(document, 'script', 'facebook-jssdk'));19 }); -
facebook-pagelike-widget/trunk/fb_class.php
r2899469 r3021420 24 24 function widget( $args , $instance ) { 25 25 26 global $ app_id, $select_lng;26 global $select_lng; 27 27 extract( $args ); 28 28 29 29 $title = apply_filters( 'widget_title' , $instance['title'] ); 30 $app_id = $instance['app_id'];31 30 $fb_url = $instance['fb_url']; 32 31 $width = $instance['width']; … … 48 47 if ( $title ) echo $before_title . $title . $after_title; 49 48 50 wp_register_script( ' milapfbwidgetscript' , FB_WIDGET_PLUGIN_URL . 'fb.js', array( 'jquery' ), '1.0' );51 wp_enqueue_script( ' milapfbwidgetscript' );52 53 $local_variables = array( 'app_id' => $app_id, 'select_lng' => $select_lng);54 wp_ localize_script( 'milapfbwidgetscript', 'milapfbwidgetvars', $local_variables);49 wp_register_script( 'scfbwidgetscript' , FB_WIDGET_PLUGIN_URL . 'fb.js', array( 'jquery' ), '1.0' ); 50 wp_enqueue_script( 'scfbwidgetscript' ); 51 52 wp_register_script( 'scfbexternalscript', 'https://connect.facebook.net/'.$select_lng.'/sdk.js#xfbml=1&version=v18.0', "", '2.0', true ); 53 wp_enqueue_script( 'scfbexternalscript' ); 55 54 56 55 echo '<div class="fb_loader" style="text-align: center !important;"><img src="' . plugins_url() . '/facebook-pagelike-widget/loader.gif" alt="Facebook Pagelike Widget" /></div>'; 57 56 echo '<div id="fb-root"></div> 58 <div class="fb-page" data-href="' . $fb_url . ' " data-width="' . $width . '" data-height="' . $height . '" data-small-header="' . $data_small_header . '" data-adapt-container-width="' . $data_adapt_container_width . '" data-hide-cover="' . $data_hide_cover . '" data-show-facepile="' . $data_show_facepile . '" style="' . $custom_css . '" hide_cta="false" data-tabs="'. $data_tabs .'" data-lazy="'.$data_lazy.'"></div>';57 <div class="fb-page" data-href="' . $fb_url . '" data-width="' . $width . '" data-height="' . $height . '" data-small-header="' . $data_small_header . '" data-adapt-container-width="' . $data_adapt_container_width . '" data-hide-cover="' . $data_hide_cover . '" data-show-facepile="' . $data_show_facepile . '" style="' . $custom_css . '" hide_cta="false" data-tabs="'. $data_tabs .'" data-lazy="'.$data_lazy.'"></div>'; 59 58 echo $after_widget; ?> 60 59 <!-- A WordPress plugin developed by Milap Patel --> … … 73 72 74 73 $instance['title'] = strip_tags( $new_instance['title'] ); 75 $instance['app_id'] = strip_tags( $new_instance['app_id'] );76 74 $instance['fb_url'] = strip_tags( $new_instance['fb_url'] ); 77 75 $instance['width'] = strip_tags( $new_instance['width'] ); … … 96 94 * Set Default Value for widget form 97 95 */ 98 $defaults = array( 'title' => 'Like Us On Facebook', ' app_id' => '503595753002055', 'fb_url' => 'https://www.facebook.com/programming.info', 'width' => '300', 'height' => '500', 'data_small_header' => 'false', 'select_lng' => 'en_US', 'data_adapt_container_width' => 'on', 'data_hide_cover' => 'false', 'data_show_facepile' => 'on', 'custom_css' => '', 'data_tabs' => 'timeline', 'data_lazy'=> 'false');96 $defaults = array( 'title' => 'Like Us On Facebook', 'fb_url' => 'https://www.facebook.com/WordPress', 'width' => '300', 'height' => '500', 'data_small_header' => 'false', 'select_lng' => 'en_US', 'data_adapt_container_width' => 'on', 'data_hide_cover' => 'false', 'data_show_facepile' => 'on', 'custom_css' => '', 'data_tabs' => 'timeline', 'data_lazy'=> 'false'); 99 97 100 98 $instance = wp_parse_args( ( array ) $instance, $defaults ); 101 99 $title = esc_attr( $instance['title'] ); 102 $app_id = isset( $instance['app_id'] ) ? esc_attr( $instance['app_id'] ) : "503595753002055"; 103 $fb_url = isset( $instance['fb_url'] ) ? esc_attr( $instance['fb_url'] ) : "http://www.facebook.com/wordpress"; 100 $fb_url = isset( $instance['fb_url'] ) ? esc_attr( $instance['fb_url'] ) : "http://www.facebook.com/WordPress"; 104 101 $width = esc_attr( $instance['width'] ); 105 102 $height = esc_attr( $instance['height'] ); … … 111 108 <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'facebook-pagelike-widget' ); ?></label> 112 109 <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>" /> 113 </p>114 <p>115 <label for="<?php echo $this->get_field_id( 'app_id' ); ?>"><?php _e( 'Facebook Application Id:', 'facebook-pagelike-widget' ); ?></label>116 <input class="widefat" id="<?php echo $this->get_field_id( 'app_id' ); ?>" name="<?php echo $this->get_field_name( 'app_id' ); ?>" type="text" value="<?php echo $app_id ?>" />117 110 </p> 118 111 <p> -
facebook-pagelike-widget/trunk/readme.txt
r2899469 r3021420 4 4 Donate link: https://www.paypal.me/MilapPatel 5 5 Requires at least: 3.0.1 6 Tested up to: 6. 26 Tested up to: 6.4.2 7 7 Stable tag: trunk 8 8 License: GPLv2 or later … … 108 108 == Changelog == 109 109 110 = Version 6.3 = 111 * Major code updates. 112 * Removed application id from code and configuration. 113 * Optimized code. 114 * Added support up to WordPress version 6.4.2. 115 * Added support up to PHP version 8.1.12. 116 110 117 = Version 6.2 = 111 118 * Removed deprecated data-show-posts parameter. -
facebook-pagelike-widget/trunk/short_code.php
r2863723 r3021420 1 1 <?php 2 function fb_plugin_shortcode($atts , $content = null) {2 function fb_plugin_shortcode($atts) { 3 3 4 $atts = shortcode_atts(array(' title' => 'Like Us On Facebook', 'app_id' => '503595753002055', 'fb_url' => 'http://facebook.com/WordPress', 'width' => '400', 'height' => '500', 'data_small_header' => 'false', 'select_lng' => 'en_US', 'data_small_header' => 'false', 'data_adapt_container_width' => 'true', 'data_hide_cover' => 'false', 'data_show_facepile' => 'true', 'custom_css' => '', 'data_tabs' => 'timeline', 'data_lazy'=> 'false'), $atts, 'fb_widget');4 $atts = shortcode_atts(array('fb_url' => 'http://facebook.com/WordPress', 'width' => '400', 'height' => '500', 'data_small_header' => 'false', 'data_small_header' => 'false', 'data_adapt_container_width' => 'true', 'data_hide_cover' => 'false', 'data_show_facepile' => 'true', 'custom_css' => '', 'data_tabs' => 'timeline', 'data_lazy'=> 'false'), $atts, 'fb_widget'); 5 5 6 wp_register_script('milapfbwidgetscriptsc', FB_WIDGET_PLUGIN_URL . 'fb_sc.js', array('jquery')); 7 wp_enqueue_script('milapfbwidgetscriptsc'); 8 9 $local_variables = array('app_id' => esc_html($atts['app_id']), 'select_lng' => esc_html($atts['select_lng'])); 10 11 wp_localize_script('milapfbwidgetscriptsc', 'milapfbwidgetvarssc', $local_variables); 12 13 $feeds = '<div class="fb_loader" style="text-align: center !important;"><img src="' . plugins_url() . '/facebook-pagelike-widget/loader.gif" /></div><div id="fb-root"></div><div style="display:inherit;" class="fb-page" data-href="' . esc_html($atts['fb_url']) . '" data-width="' . esc_html($atts['width']) . '" data-height="' . esc_html($atts['height']) . '" data-small-header="' . esc_html($atts['data_small_header']) . '" data-adapt-container-width="' . esc_html($atts['data_adapt_container_width']) . '" data-hide-cover="' . esc_html($atts['data_hide_cover']) . '" data-show-facepile="' . esc_html($atts['data_show_facepile']) . '" style="' . esc_html($atts['custom_css']) . '" data-tabs="'. esc_html($atts['data_tabs']) .'" data-lazy="'.esc_html($atts['data_lazy']).'"></div>'; 6 $feeds = '<iframe src="https://www.facebook.com/plugins/page.php?href='.esc_html($atts['fb_url']).'&tabs='.esc_html($atts['data_tabs']).'&width='.esc_html($atts['width']).'&height='.esc_html($atts['height']).'&small_header='.esc_html($atts['data_small_header']).'&adapt_container_width='.esc_html($atts['data_adapt_container_width']).'&hide_cover='.esc_html($atts['data_hide_cover']).'&show_facepile='.esc_html($atts['data_show_facepile']).'&data_lazy='.esc_html($atts['data_lazy']).'" width="'.esc_html($atts['width']).'" height="'.esc_html($atts['height']).'" style="' . esc_html($atts['custom_css']) . '" scrolling="no" frameborder="0" allowfullscreen="true" allow="autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"></iframe>'; 14 7 15 8 return $feeds; 16 9 } 10 17 11 add_shortcode('fb_widget', 'fb_plugin_shortcode'); 12 13 18 14 ?>
Note: See TracChangeset
for help on using the changeset viewer.