Plugin Directory

Changeset 483689


Ignore:
Timestamp:
01/03/2012 01:09:43 AM (14 years ago)
Author:
Chaser324
Message:

1.25 Updates

Location:
featured-posts-scroll/branches/varsize
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • featured-posts-scroll/branches/varsize/featured-posts-scroll-admin.php

    r476975 r483689  
    129129    $post_image_height_stretch = get_option('fps_image_height_stretch');
    130130    $post_image_width_stretch = get_option('fps_image_width_stretch');
     131
     132    $fps_enable_static_caching = get_option('fps_enable_static_caching');
    131133?>
    132134
     
    192194                        </td>
    193195                    </tr>
     196
     197
     198                    <tr valign="top">
     199                        <th scope="row">Performance Options</th>
     200                        <td>
     201                            <fieldset>
     202                                <legend class="hidden">Performance</legend>
     203
     204                                <?php if($fps_enable_static_caching == 1){ $checked = "checked=\"checked\""; }else{ $checked = ""; } ?>
     205                                <input type="checkbox" name="fps_enable_static_caching" value="true" <?php echo $checked; ?>><?php _e(" Cache CSS and JS files (Experimental. Disable if plugin does not function correctly."); ?>
     206                                <br />
     207
     208                            </fieldset>
     209                        </td>
     210                    </tr>
     211
    194212
    195213                    <tr valign="top">
  • featured-posts-scroll/branches/varsize/featured-posts-scroll.php

    r479884 r483689  
    138138    'fps_image_width_noscale' => '0',
    139139    'fps_image_height_stretch' => '1',
    140     'fps_image_width_stretch' => '1'
     140    'fps_image_width_stretch' => '1',
     141
     142    'fps_enable_static_caching' => '0'
    141143);
    142144
     
    153155    }
    154156
    155     // Attempt to generate static JS file.
    156     ob_start();
    157 
    158         include(WP_PLUGIN_DIR.'/featured-posts-scroll/js/fps.js.php');
    159 
    160         $file_contents = ob_get_contents();
    161         $file_path = WP_PLUGIN_DIR.'/featured-posts-scroll/js/fps.js';
    162         $ret_val = file_put_contents($file_path, $file_contents);
    163    
    164     ob_end_clean();
    165 
    166     // Attempt to generate static CSS file.
    167     ob_start();
    168 
    169         include(WP_PLUGIN_DIR.'/featured-posts-scroll/css/fps.css.php');
    170 
    171         $file_contents = ob_get_contents();
    172         $file_path = WP_PLUGIN_DIR.'/featured-posts-scroll/css/fps.css';
    173         $ret_val = file_put_contents($file_path, $file_contents);
    174    
    175     ob_end_clean();
     157    if (get_option('fps_enable_static_caching') == '1')
     158    {
     159        // Attempt to generate static JS file.
     160        ob_start();
     161
     162            include(WP_PLUGIN_DIR.'/featured-posts-scroll/js/fps.js.php');
     163
     164            $file_contents = ob_get_contents();
     165            $file_path = WP_PLUGIN_DIR.'/featured-posts-scroll/js/fps.js';
     166            $ret_val = file_put_contents($file_path, $file_contents);
     167       
     168        ob_end_clean();
     169
     170        // Attempt to generate static CSS file.
     171        ob_start();
     172
     173            include(WP_PLUGIN_DIR.'/featured-posts-scroll/css/fps.css.php');
     174
     175            $file_contents = ob_get_contents();
     176            $file_path = WP_PLUGIN_DIR.'/featured-posts-scroll/css/fps.css';
     177            $ret_val = file_put_contents($file_path, $file_contents);
     178       
     179        ob_end_clean();
     180    }
    176181}
    177182
     
    213218    wp_enqueue_style('fps-style', WP_PLUGIN_URL.'/featured-posts-scroll/css/featuredposts.css');
    214219   
    215     if (file_exists(WP_PLUGIN_DIR.'/featured-posts-scroll/css/fps.css'))
     220    if (get_option('fps_enable_static_caching') == '1' && file_exists(WP_PLUGIN_DIR.'/featured-posts-scroll/css/fps.css'))
    216221    {
    217222        wp_enqueue_style('fps-style-dynamic', WP_PLUGIN_URL.'/featured-posts-scroll/css/fps.css');
     
    229234        wp_enqueue_script('jquery');
    230235
    231         if(file_exists(WP_PLUGIN_DIR.'/featured-posts-scroll/js/fps.js'))
     236        if(get_option('fps_enable_static_caching') == '1' && file_exists(WP_PLUGIN_DIR.'/featured-posts-scroll/js/fps.js'))
    232237        {
    233238            wp_enqueue_script('fps-js-dynamic', WP_PLUGIN_URL.'/featured-posts-scroll/js/fps.js');
  • featured-posts-scroll/branches/varsize/fps-generate-output.php

    r476975 r483689  
    125125            'fps_image_width_noscale',
    126126            'fps_image_height_stretch',
    127             'fps_image_width_stretch'
     127            'fps_image_width_stretch',
     128            'fps_enable_static_caching'
    128129
    129130        );
     
    143144            <?php
    144145
    145             fps_generate_js();
    146             fps_generate_css();
     146            if (get_option('fps_enable_static_caching') == '1')
     147            {
     148                fps_generate_js();
     149                fps_generate_css();
     150            }
    147151        }
    148152        else
  • featured-posts-scroll/branches/varsize/readme.txt

    r479888 r483689  
    8181For any configuration, the image should be split into four evenly sized quadrants. The top row is left/right arrows as they normally appear and the bottom row are the arrows as they appear when hovered over. The left column should be arrows pointing left, and the right column should be arrows pointing right.
    8282
     83= I'm getting an error: "Call to undefined function has_post_thumbnail()", and I can't add a "Featured Image" to my posts. =
     84This issue is typically caused by templates that don't enable post thumbnails. If your template's functions.php file does not contain this, you must add it:
     85 
     86<code>add_theme_support( 'post-thumbnails' );</code>
     87
    8388= I have the "Display Excerpts" option selected, but I'm not seeing anything =
    8489The plugin will currently only display manually entered excerpts. Automatically generated excerpts will not be displayed.
     
    99104= 1.25 =
    100105* Corrected issue with plugin appearing on post/page templates.
     106* Made caching to static CSS and JS files optional. Some users have reported issues with this feature.
    101107
    102108= 1.24 =
     
    198204= 1.25 =
    199205* Corrected issue with plugin appearing on post/page templates.
     206* Made caching to static CSS and JS files optional. Some users have reported issues with this feature.
Note: See TracChangeset for help on using the changeset viewer.