Changeset 5627
- Timestamp:
- 07/07/2017 07:34:23 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-plugin.php
r4128 r5627 16 16 */ 17 17 private static $instance; 18 19 /** 20 * @var int Plugin DB revision, increments when changes are made to rewrite rules. 21 */ 22 private static $db_version = 5627; 18 23 19 24 /** … … 51 56 $this->plugins = new Plugin_Directory_Compat; 52 57 } 58 59 add_action( 'bbp_add_rewrite_rules', array( $this, 'maybe_flush_rewrite_rules' ) ); 53 60 } 61 62 /** 63 * Check the plugin version to see if rewrite rules should be flushed. 64 */ 65 public function maybe_flush_rewrite_rules() { 66 $db_version_option_name = 'wporg_support_forums_plugin_db_version'; 67 68 if ( get_option( $db_version_option_name ) != self::$db_version ) { 69 flush_rewrite_rules(); 70 update_option( $db_version_option_name, self::$db_version ); 71 } 72 } 73 54 74 }
Note: See TracChangeset
for help on using the changeset viewer.