Plugin Directory

Changeset 1980968


Ignore:
Timestamp:
11/27/2018 01:55:10 AM (7 years ago)
Author:
joerhoney
Message:

Uploading 2.5

Location:
addfunc-slides
Files:
22 added
2 edited

Legend:

Unmodified
Added
Removed
  • addfunc-slides/trunk/addfunc-slides.php

    r1951145 r1980968  
    44    Plugin URI:
    55    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.4
     6    Version: 2.5
    77    Author: AddFunc
    88    Author URI: http://addfunc.com/
     
    181181*/
    182182
    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// }
    201208function aFSJSCSS(){
     209  // global $aFSInit;
     210  // $aFSInit = true;
    202211  $aFSOptions = get_option('aFSOpts');
    203212  if (!get_option('aFSDefaultCSS')){
     
    207216  wp_enqueue_script('aFslides');
    208217}
    209 $aFSInit = "";
    210 $aFSOpts = "";
    211 
     218add_action('wp_enqueue_scripts','aFSJSCSS');
    212219
    213220
     
    217224*/
    218225
    219 function aFSScFn(){
    220   if (!function_exists('aFSSc')) {
     226// function aFSScFn(){
     227  // if (!function_exists('aFSSc')) {
    221228    function aFSSc($atts){
    222229      $aFSMrgd = shortcode_atts(array(
     
    386393      return ob_get_clean();
    387394    }
    388   }
     395  // }
    389396  add_shortcode('slides','aFSSc');
    390   global $aFSInit;
    391   $aFSInit = true;
    392 }
     397// }
    393398
    394399
     
    562567    "};
    563568    aFSlides('.".$aFSInst."',".$aFSInst.");";
    564     global $aFSInit;
    565     $aFSInit = true;
     569    // global $aFSInit;
     570    // $aFSInit = true;
    566571  }
    567572#   Back-end widget form
     
    762767
    763768function aFSInit(){
    764   global $aFSInit;
    765   if($aFSInit){ ?>
    766 <?php
     769  // global $aFSInit;
     770  // if($aFSInit){
     771    echo "\n";
    767772    echo "<script type='text/javascript'>";
    768773    global $aFSOpts;
    769774    echo $aFSOpts."\n";
    770775    echo "</script>\n";
    771   }
     776  // }
    772777}
    773778add_action('wp_footer','aFSInit');
  • addfunc-slides/trunk/readme.txt

    r1951145 r1980968  
    77Requires at least: 3.0.1
    88Tested up to: 4.9.8
    9 Stable tag: 2.4
     9Stable tag: 2.5
    1010License: GPLv2 or later
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8787
    8888== Change Log ==
     89
     90= 2.5 =
     9126 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.
    8999
    90100= 2.4 =
Note: See TracChangeset for help on using the changeset viewer.