Changeset 1980968
- Timestamp:
- 11/27/2018 01:55:10 AM (7 years ago)
- Location:
- addfunc-slides
- Files:
-
- 22 added
- 2 edited
-
tags/2.5 (added)
-
tags/2.5/addfunc-slides.php (added)
-
tags/2.5/css (added)
-
tags/2.5/css/addfunc-slides.css (added)
-
tags/2.5/css/arrow-left.svg (added)
-
tags/2.5/css/arrow-right.svg (added)
-
tags/2.5/css/fonts (added)
-
tags/2.5/css/fonts/aFIcons.ttf (added)
-
tags/2.5/css/fonts/aFIcons.woff (added)
-
tags/2.5/css/fullscreen.svg (added)
-
tags/2.5/css/mce-icons.css (added)
-
tags/2.5/css/pause-play.svg (added)
-
tags/2.5/css/tab.svg (added)
-
tags/2.5/index.php (added)
-
tags/2.5/js (added)
-
tags/2.5/js/aFWPLnk.js (added)
-
tags/2.5/js/addfunc-slides-admin.js (added)
-
tags/2.5/js/addfunc-slides-mce.js (added)
-
tags/2.5/js/addfunc-slides-uploader.js (added)
-
tags/2.5/js/addfunc-slides.js (added)
-
tags/2.5/js/multiple-conditional-scripts.php (added)
-
tags/2.5/readme.txt (added)
-
trunk/addfunc-slides.php (modified) (7 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
addfunc-slides/trunk/addfunc-slides.php
r1951145 r1980968 4 4 Plugin URI: 5 5 Description: An intuitively manageable Slide content type with shortcode & widget interfaces for easy slideshow insertion. Includes standard slideshow options, while still providing fully CSS-styleable output. 6 Version: 2. 46 Version: 2.5 7 7 Author: AddFunc 8 8 Author URI: http://addfunc.com/ … … 181 181 */ 182 182 183 add_filter('the_posts','aFSJSCSS_if_Sc'); 184 function aFSJSCSS_if_Sc($posts){ 185 if(empty($posts))return $posts; 186 $shortcode_found = 0; 187 foreach($posts as $post){ 188 if(stripos($post->post_content,'[slides')=== false){ 189 $shortcode_found = false; 190 } 191 else{ 192 $shortcode_found = true; 193 } 194 } 195 if($shortcode_found){ 196 aFSJSCSS(); 197 aFSScFn(); 198 } 199 return $posts; 200 } 183 // $aFSInit = ""; 184 $aFSOpts = ""; 185 // add_filter('the_posts','aFSJSCSS_if_Sc'); 186 // function aFSJSCSS_if_Sc($posts){ 187 // $shortcode_found = 0; 188 // if(empty($posts)){ 189 // $shortcode_found = true; 190 // } 191 // else{ 192 // foreach($posts as $post){ 193 // if(stripos($post->post_content,'[slides')=== false){ 194 // $shortcode_found = false; 195 // } 196 // else{ 197 // $shortcode_found = true; 198 // } 199 // } 200 // } 201 // if($shortcode_found){ 202 // global $aFSInit; 203 // $aFSInit = true; 204 // aFSJSCSS(); 205 // } 206 // return $posts; 207 // } 201 208 function aFSJSCSS(){ 209 // global $aFSInit; 210 // $aFSInit = true; 202 211 $aFSOptions = get_option('aFSOpts'); 203 212 if (!get_option('aFSDefaultCSS')){ … … 207 216 wp_enqueue_script('aFslides'); 208 217 } 209 $aFSInit = ""; 210 $aFSOpts = ""; 211 218 add_action('wp_enqueue_scripts','aFSJSCSS'); 212 219 213 220 … … 217 224 */ 218 225 219 function aFSScFn(){220 if (!function_exists('aFSSc')) {226 // function aFSScFn(){ 227 // if (!function_exists('aFSSc')) { 221 228 function aFSSc($atts){ 222 229 $aFSMrgd = shortcode_atts(array( … … 386 393 return ob_get_clean(); 387 394 } 388 }395 // } 389 396 add_shortcode('slides','aFSSc'); 390 global $aFSInit; 391 $aFSInit = true; 392 } 397 // } 393 398 394 399 … … 562 567 "}; 563 568 aFSlides('.".$aFSInst."',".$aFSInst.");"; 564 global $aFSInit;565 $aFSInit = true;569 // global $aFSInit; 570 // $aFSInit = true; 566 571 } 567 572 # Back-end widget form … … 762 767 763 768 function aFSInit(){ 764 global $aFSInit;765 if($aFSInit){ ?>766 <?php 769 // global $aFSInit; 770 // if($aFSInit){ 771 echo "\n"; 767 772 echo "<script type='text/javascript'>"; 768 773 global $aFSOpts; 769 774 echo $aFSOpts."\n"; 770 775 echo "</script>\n"; 771 }776 // } 772 777 } 773 778 add_action('wp_footer','aFSInit'); -
addfunc-slides/trunk/readme.txt
r1951145 r1980968 7 7 Requires at least: 3.0.1 8 8 Tested up to: 4.9.8 9 Stable tag: 2. 49 Stable tag: 2.5 10 10 License: GPLv2 or later 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 87 87 88 88 == Change Log == 89 90 = 2.5 = 91 26 Nov 2018 92 93 * Removes conditionals for CSS and JS inclusion — now included always. 94 - The shortcode was failing in too many cases because of this feature. 95 - The shortcode now works in cases it didn't before. 96 - While the now unavoidable added resources are a compromise, it was decided this would make the plugin useful to a wider audience. 97 - We apologize for any inconvenience this decision may have caused. 98 - A new solution for this issue will be in consideration in the future. 89 99 90 100 = 2.4 =
Note: See TracChangeset
for help on using the changeset viewer.