Plugin Directory

Changeset 619017


Ignore:
Timestamp:
10/30/2012 02:16:58 PM (12 years ago)
Author:
ajayver
Message:

Added redirection rules flush on widget installation and widget settings update

Location:
cat-tag-filter-widget
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cat-tag-filter-widget/tags/0.9/cat-tag-filter.php

    r619000 r619017  
    235235  }
    236236
     237  static function install() {
     238        //Ensure the $wp_rewrite global is loaded
     239        global $wp_rewrite;
     240        //Call flush_rules() as a method of the $wp_rewrite object
     241        $wp_rewrite->flush_rules();
     242     }
    237243
    238244  /** @see WP_Widget::widget */
     
    287293    $instance['category_tax'] = $new_instance['category_tax'];
    288294    $instance['tag_tax'] = $new_instance['tag_tax'];
     295    global $wp_rewrite;
     296    //Call flush_rules() as a method of the $wp_rewrite object
     297    $wp_rewrite->flush_rules();
    289298    return $instance;
    290299  }
     
    467476add_action( 'generate_rewrite_rules', 'add_rewrite_rules' );
    468477
    469 
     478register_activation_hook( 'cat-tag-filter-widget/cat-tag-filter.php', array('cat_tag_filter', 'install') );
    470479
    471480?>
  • cat-tag-filter-widget/tags/0.9/readme.txt

    r619000 r619017  
    7474== Changelog ==
    7575
    76 = 0.9 =
    77 * Added permalink support.
    78 
    7976= 0.8.4 =
    8077* Added an option to switch off corresponding tags mode.
  • cat-tag-filter-widget/trunk/cat-tag-filter.php

    r619000 r619017  
    235235  }
    236236
     237  static function install() {
     238        //Ensure the $wp_rewrite global is loaded
     239        global $wp_rewrite;
     240        //Call flush_rules() as a method of the $wp_rewrite object
     241        $wp_rewrite->flush_rules();
     242     }
    237243
    238244  /** @see WP_Widget::widget */
     
    287293    $instance['category_tax'] = $new_instance['category_tax'];
    288294    $instance['tag_tax'] = $new_instance['tag_tax'];
     295    global $wp_rewrite;
     296    //Call flush_rules() as a method of the $wp_rewrite object
     297    $wp_rewrite->flush_rules();
    289298    return $instance;
    290299  }
     
    467476add_action( 'generate_rewrite_rules', 'add_rewrite_rules' );
    468477
    469 
     478register_activation_hook( 'cat-tag-filter-widget/cat-tag-filter.php', array('cat_tag_filter', 'install') );
    470479
    471480?>
  • cat-tag-filter-widget/trunk/readme.txt

    r619000 r619017  
    7474== Changelog ==
    7575
    76 = 0.9 =
    77 * Added permalink support.
    78 
    7976= 0.8.4 =
    8077* Added an option to switch off corresponding tags mode.
Note: See TracChangeset for help on using the changeset viewer.