Plugin Directory

Changeset 484212


Ignore:
Timestamp:
01/04/2012 12:36:57 AM (14 years ago)
Author:
Chaser324
Message:
 
Location:
featured-posts-grid/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • featured-posts-grid/trunk

  • featured-posts-grid/trunk/featured-posts-grid-admin.php

    r477436 r484212  
    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/trunk/featured-posts-grid.php

    r477910 r484212  
    44Plugin URI: http://chasepettit.com
    55Description: A javascript based display of post titles and thumbnails in a grid layout.
    6 Version: 1.6
     6Version: 1.7
    77Author: Chaser324
    88Author URI: http://chasepettit.com
     
    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    // Try resolving possible issue introduced in 1.6
     197    $interval_val = get_option('fpg_scroll_interval');
     198    if (!is_numeric($interval_val))
     199    {
     200        update_option('fpg_scroll_interval', '7000');
     201    }
     202
     203    if (get_option('fpg_enable_static_caching') == '1')
     204    {
     205        ob_start();
     206
     207            include(WP_PLUGIN_DIR.'/featured-posts-grid/js/fpg.js.php');
     208
     209            $file_contents = ob_get_contents();
     210            $file_path = WP_PLUGIN_DIR.'/featured-posts-grid/js/fpg.js';
     211            $ret_val = file_put_contents($file_path, $file_contents);
     212           
     213        ob_end_clean();
     214
     215        ob_start();
     216
     217            include(WP_PLUGIN_DIR.'/featured-posts-grid/css/fpg.css.php');
     218
     219            $file_contents = ob_get_contents();
     220            $file_path = WP_PLUGIN_DIR.'/featured-posts-grid/css/fpg.css';
     221            $ret_val = file_put_contents($file_path, $file_contents);
     222           
     223        ob_end_clean();
     224    }
    213225}
    214226
     
    250262    wp_enqueue_style('fpg-style', WP_PLUGIN_URL.'/featured-posts-grid/css/featured-posts-grid.css');
    251263
    252     if (file_exists(WP_PLUGIN_DIR.'/featured-posts-grid/css/fpg.css'))
     264    if (get_option('fpg_enable_static_caching') == '1' && file_exists(WP_PLUGIN_DIR.'/featured-posts-grid/css/fpg.css'))
    253265    {
    254266        wp_enqueue_style('fpg-style-dynamic', WP_PLUGIN_URL.'/featured-posts-grid/css/fpg.css');
     
    266278        wp_enqueue_script('jquery');
    267279
    268         if(file_exists(WP_PLUGIN_DIR.'/featured-posts-grid/js/fpg.js'))
     280        if(get_option('fpg_enable_static_caching') == '1' && file_exists(WP_PLUGIN_DIR.'/featured-posts-grid/js/fpg.js'))
    269281        {
    270282            wp_enqueue_script('fpg-js-dynamic', WP_PLUGIN_URL.'/featured-posts-grid/js/fpg.js');
     
    408420    {
    409421        $post = $temp_post;
     422        setup_postdata($post);
    410423    }
    411424   
  • featured-posts-grid/trunk/fpg-generate-output.php

    r477436 r484212  
    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/trunk/readme.txt

    r477910 r484212  
    66Tags: posts, grid, featured, featured post, featured posts, recent post, recent posts
    77Requires at least: 2.9.1
    8 Tested up to: 3.2
    9 Stable tag: 1.6
     8Tested up to: 3.3
     9Stable tag: 1.7
    1010
    1111A javascript based display of post titles and thumbnails in a grid layout.
     
    9595== Changelog ==
    9696
     97= 1.7 =
     98* 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.
     100
    97101= 1.6 =
    98102* Corrected issue with activation that was causing new variables to not be initialized to default values.
     
    126130== Upgrade Notice ==
    127131
    128 = 1.6 =
    129 * Corrected issue with activation that was causing new variables to not be initialized to default values.
    130 
    131 
     132= 1.7 =
     133* 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.