Plugin Directory

Changeset 483690


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

1.7 Updates

Location:
featured-posts-grid/branches/dev
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • featured-posts-grid/branches/dev/featured-posts-grid-admin.php

    r477430 r483690  
    143143    $fpg_scroll_interval = get_option('fpg_scroll_interval');
    144144    $fpg_rollover = get_option('fpg_rollover');
     145
     146    $fpg_enable_static_caching = get_option('fpg_enable_static_caching');
    145147?>
    146148
     
    201203                                <?php if($fpg_date_display == 1){ $checked = "checked=\"checked\""; }else{ $checked = ""; } ?>
    202204                                <input type="checkbox" name="fpg_date_display" value="true" <?php echo $checked; ?>><?php _e(" Post Date"); ?>
     205                                <br />
     206
     207                            </fieldset>
     208                        </td>
     209                    </tr>
     210
     211                    <tr valign="top">
     212                        <th scope="row">Performance Options</th>
     213                        <td>
     214                            <fieldset>
     215                                <legend class="hidden">Performance</legend>
     216
     217                                <?php if($fpg_enable_static_caching == 1){ $checked = "checked=\"checked\""; }else{ $checked = ""; } ?>
     218                                <input type="checkbox" name="fpg_enable_static_caching" value="true" <?php echo $checked; ?>><?php _e(" Cache CSS and JS files (Experimental. Disable if plugin does not function correctly."); ?>
    203219                                <br />
    204220
  • featured-posts-grid/branches/dev/featured-posts-grid.php

    r479885 r483690  
    177177    'fpg_autoscroll' => '0',
    178178    'fpg_scroll_interval' => '7000',
    179     'fpg_rollover' => '0'
     179    'fpg_rollover' => '0',
     180
     181    'fpg_enable_static_caching' => '0'
    180182);
    181183
     
    192194    }
    193195
    194     ob_start();
    195 
    196         include(WP_PLUGIN_DIR.'/featured-posts-grid/js/fpg.js.php');
    197 
    198         $file_contents = ob_get_contents();
    199         $file_path = WP_PLUGIN_DIR.'/featured-posts-grid/js/fpg.js';
    200         $ret_val = file_put_contents($file_path, $file_contents);
    201        
    202     ob_end_clean();
    203 
    204     ob_start();
    205 
    206         include(WP_PLUGIN_DIR.'/featured-posts-grid/css/fpg.css.php');
    207 
    208         $file_contents = ob_get_contents();
    209         $file_path = WP_PLUGIN_DIR.'/featured-posts-grid/css/fpg.css';
    210         $ret_val = file_put_contents($file_path, $file_contents);
    211        
    212     ob_end_clean();
     196    if (get_option('fpg_enable_static_caching') == '1')
     197    {
     198        ob_start();
     199
     200            include(WP_PLUGIN_DIR.'/featured-posts-grid/js/fpg.js.php');
     201
     202            $file_contents = ob_get_contents();
     203            $file_path = WP_PLUGIN_DIR.'/featured-posts-grid/js/fpg.js';
     204            $ret_val = file_put_contents($file_path, $file_contents);
     205           
     206        ob_end_clean();
     207
     208        ob_start();
     209
     210            include(WP_PLUGIN_DIR.'/featured-posts-grid/css/fpg.css.php');
     211
     212            $file_contents = ob_get_contents();
     213            $file_path = WP_PLUGIN_DIR.'/featured-posts-grid/css/fpg.css';
     214            $ret_val = file_put_contents($file_path, $file_contents);
     215           
     216        ob_end_clean();
     217    }
    213218}
    214219
     
    250255    wp_enqueue_style('fpg-style', WP_PLUGIN_URL.'/featured-posts-grid/css/featured-posts-grid.css');
    251256
    252     if (file_exists(WP_PLUGIN_DIR.'/featured-posts-grid/css/fpg.css'))
     257    if (get_option('fpg_enable_static_caching') == '1' && file_exists(WP_PLUGIN_DIR.'/featured-posts-grid/css/fpg.css'))
    253258    {
    254259        wp_enqueue_style('fpg-style-dynamic', WP_PLUGIN_URL.'/featured-posts-grid/css/fpg.css');
     
    266271        wp_enqueue_script('jquery');
    267272
    268         if(file_exists(WP_PLUGIN_DIR.'/featured-posts-grid/js/fpg.js'))
     273        if(get_option('fpg_enable_static_caching') == '1' && file_exists(WP_PLUGIN_DIR.'/featured-posts-grid/js/fpg.js'))
    269274        {
    270275            wp_enqueue_script('fpg-js-dynamic', WP_PLUGIN_URL.'/featured-posts-grid/js/fpg.js');
  • featured-posts-grid/branches/dev/fpg-generate-output.php

    r477430 r483690  
    141141            'fpg_images_width_fit',
    142142            'fpg_autoscroll',
    143             'fpg_rollover'
     143            'fpg_rollover',
     144            'fpg_enable_static_caching'
    144145        );
    145146
     
    157158            <?php
    158159           
    159             fpg_generate_js();
    160             fpg_generate_css();
     160            if (get_option('fpg_enable_static_caching') == '1')
     161            {
     162                fpg_generate_js();
     163                fpg_generate_css();
     164            }
    161165        }
    162166        else
  • featured-posts-grid/branches/dev/readme.txt

    r479887 r483690  
    9797= 1.7 =
    9898* Corrected issue with plugin appearing on post/page templates.
     99* Made caching to static CSS and JS files optional. Some users have reported issues with this feature.
    99100
    100101= 1.6 =
     
    131132= 1.7 =
    132133* Corrected issue with plugin appearing on post/page templates.
     134* 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.