Changeset 1826201
- Timestamp:
- 02/21/2018 01:22:51 PM (8 years ago)
- Location:
- embedalbum-pro/trunk
- Files:
-
- 2 edited
-
embedalbum_pro.php (modified) (12 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
embedalbum-pro/trunk/embedalbum_pro.php
r1741511 r1826201 6 6 Author: EmbedSocial 7 7 Author URI: http://www.embedsocial.com 8 Version: 1.0.1 28 Version: 1.0.14 9 9 */ 10 10 defined( 'ABSPATH' ) or die; … … 53 53 } 54 54 55 public function hook_embed_socialfeed_js() { 56 wp_register_script('EmbedSocialSocialFeedScript', $this->urlEmbedScripts.'sf.js'); 57 wp_enqueue_script('EmbedSocialSocialFeedScript', $this->urlEmbedScripts.'sf.js'); 58 } 59 55 60 public function hook_embed_reviews_js() { 56 61 wp_register_script('EmbedSocialReviewsScript', $this->urlEmbedScripts.'ri.js'); … … 68 73 } 69 74 75 public function hook_embed_story_js() { 76 wp_register_script('EmbedSocialStoriesScript', $this->urlEmbedScripts.'st.js'); 77 wp_enqueue_script('EmbedSocialStoriesScript', $this->urlEmbedScripts.'st.js'); 78 } 79 70 80 public function embedsocial_fb_album_shortcode( $atts ) 71 81 { … … 86 96 public function embedsocial_fb_gallery_shortcode( $atts ) 87 97 { 88 add_action('wp_footer', array($this, "hook_embed_gallery_js"));98 add_action('wp_footer', array($this, "hook_embed_gallery_js")); 89 99 90 100 $shortcodeId = (shortcode_atts(array( … … 102 112 public function embedsocial_instagram_album_shortcode( $atts ) 103 113 { 104 add_action('wp_footer', array($this, "hook_embed_instagram_js"));114 add_action('wp_footer', array($this, "hook_embed_instagram_js")); 105 115 106 116 $shortcodeId = (shortcode_atts(array( … … 118 128 public function embedsocial_twitter_album_shortcode( $atts ) 119 129 { 120 add_action('wp_footer', array($this, "hook_embed_twitter_js"));130 add_action('wp_footer', array($this, "hook_embed_twitter_js")); 121 131 122 132 $shortcodeId = (shortcode_atts(array( … … 134 144 public function embedsocial_google_album_shortcode( $atts ) 135 145 { 136 add_action('wp_footer', array($this, "hook_embed_google_album_js"));146 add_action('wp_footer', array($this, "hook_embed_google_album_js")); 137 147 138 148 $shortcodeId = (shortcode_atts(array( … … 150 160 public function embedsocial_feed_shortcode( $atts ) 151 161 { 152 $shortcodeId = (shortcode_atts(array( 153 'id' => '' 154 ), $atts)); 155 156 $out = ""; 157 if ($shortcodeId['id']) { 158 $shortcodeId['id'] = sanitize_text_field($shortcodeId['id']); 159 $out .= "<script src='https://embedsocial.com/js/iframe.js'></script><iframe style='border: 0; width: 100%; height: 100%;' scrolling=no src='https://embedsocial.com/facebook_album/pro_embed_posts/{$shortcodeId['id']}'></iframe><script>iFrameResize();</script>"; 162 add_action('wp_footer', array($this, "hook_embed_socialfeed_js")); 163 164 $shortcodeId = (shortcode_atts(array( 165 'id' => '' 166 ), $atts)); 167 168 $out = ""; 169 if ($shortcodeId['id']) { 170 $shortcodeId['id'] = sanitize_text_field($shortcodeId['id']); 171 $out .= "<div class='embedsocial-socialfeed' data-ref='{$shortcodeId['id']}'></div>"; 160 172 } 161 173 return $out; … … 164 176 public function embedsocial_reviews_album_shortcode( $atts ) 165 177 { 166 add_action('wp_footer', array($this, "hook_embed_reviews_js"));178 add_action('wp_footer', array($this, "hook_embed_reviews_js")); 167 179 168 180 $shortcodeId = (shortcode_atts(array( … … 180 192 public function embedsocial_google_reviews_album_shortcode( $atts ) 181 193 { 182 add_action('wp_footer', array($this, "hook_embed_google_reviews_js"));194 add_action('wp_footer', array($this, "hook_embed_google_reviews_js")); 183 195 184 196 $shortcodeId = (shortcode_atts(array( … … 196 208 public function embedsocial_custom_reviews_album_shortcode( $atts ) 197 209 { 198 add_action('wp_footer', array($this, "hook_embed_custom_reviews_js"));210 add_action('wp_footer', array($this, "hook_embed_custom_reviews_js")); 199 211 200 212 $shortcodeId = (shortcode_atts(array( … … 209 221 return $out; 210 222 } 223 224 public function embedsocial_stories_shortcode( $atts ) 225 { 226 add_action('wp_footer', array($this, "hook_embed_story_js")); 227 228 $shortcodeId = (shortcode_atts(array( 229 'id' => '' 230 ), $atts)); 231 232 $out = ""; 233 if ($shortcodeId['id']) { 234 $shortcodeId['id'] = sanitize_text_field($shortcodeId['id']); 235 $out .= "<div class='embedsocial-stories' data-ref='{$shortcodeId['id']}'></div>"; 236 } 237 return $out; 238 } 211 239 } 212 240 213 241 $plugin = new EmbedSocialPlugin(); 214 242 215 add_shortcode('embedsocial_album', array($plugin,'embedsocial_fb_album_shortcode')); 216 add_shortcode('embedsocial_gallery', array($plugin,'embedsocial_fb_gallery_shortcode')); 217 add_shortcode('embedsocial_instagram', array($plugin,'embedsocial_instagram_album_shortcode')); 218 add_shortcode('embedsocial_twitter', array($plugin,'embedsocial_twitter_album_shortcode')); 219 add_shortcode('embedsocial_google_album', array($plugin,'embedsocial_google_album_shortcode')); 220 add_shortcode('embedsocial_feed', array($plugin,'embedsocial_feed_shortcode')); 221 add_shortcode('embedsocial_reviews', array($plugin,'embedsocial_reviews_album_shortcode')); 222 add_shortcode('embedsocial_google_reviews', array($plugin,'embedsocial_google_reviews_album_shortcode')); 223 add_shortcode('embedsocial_custom_reviews', array($plugin,'embedsocial_custom_reviews_album_shortcode')); 243 add_shortcode('embedsocial_album', array($plugin, 'embedsocial_fb_album_shortcode')); 244 add_shortcode('embedsocial_gallery', array($plugin, 'embedsocial_fb_gallery_shortcode')); 245 add_shortcode('embedsocial_instagram', array($plugin, 'embedsocial_instagram_album_shortcode')); 246 add_shortcode('embedsocial_twitter', array($plugin, 'embedsocial_twitter_album_shortcode')); 247 add_shortcode('embedsocial_google_album', array($plugin, 'embedsocial_google_album_shortcode')); 248 add_shortcode('embedsocial_feed', array($plugin, 'embedsocial_feed_shortcode')); 249 add_shortcode('embedsocial_reviews', array($plugin, 'embedsocial_reviews_album_shortcode')); 250 add_shortcode('embedsocial_google_reviews', array($plugin, 'embedsocial_google_reviews_album_shortcode')); 251 add_shortcode('embedsocial_custom_reviews', array($plugin, 'embedsocial_custom_reviews_album_shortcode')); 252 add_shortcode('embedsocial_stories', array($plugin, 'embedsocial_stories_shortcode')); 224 253 ?> -
embedalbum-pro/trunk/readme.txt
r1741511 r1826201 5 5 6 6 Requires at least: 4.7 7 Tested up to: 4. 78 Stable tag: 1.0.1 27 Tested up to: 4.9 8 Stable tag: 1.0.14 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset
for help on using the changeset viewer.