Plugin Directory

Changeset 2238751


Ignore:
Timestamp:
02/05/2020 01:36:23 AM (6 years ago)
Author:
chetmac
Message:

ensure rules are flushed on update

Location:
airpress
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • airpress/tags/1.1.60/airpress.php

    r2238695 r2238751  
    117117add_action( 'wp_ajax_airpress_deferred', 'airpress_execute_deferred_queries' );
    118118
     119register_activation_hook( __FILE__, 'airpress_activation' );
     120register_deactivation_hook( __FILE__, 'airpress_deactivation' );
     121
     122if ( ! function_exists("airpress_activation") ){
     123
     124    function airpress_activation(){
     125
     126        flush_rewrite_rules();
     127
     128    }
     129
     130}
     131
     132if ( ! function_exists("airpress_deactivation") ){
     133
     134    function airpress_deactivation(){
     135
     136        flush_rewrite_rules();
     137
     138    }
     139
     140}
     141
     142
    119143function airpress_get_current_record(){
    120144    global $airpress, $post;
  • airpress/tags/1.1.60/lib/chetmac/Airpress.php

    r2238695 r2238751  
    4949
    5050    public function check_for_update(){
     51
    5152        global $airpress_version;
     53
    5254        if ( get_option( 'airpress_version' ) != $airpress_version) {
    5355           
     
    5961            update_option("airpress_version", $airpress_version, false);
    6062
     63            flush_rewrite_rules();
     64
    6165        }
     66
    6267    }
    6368
     
    381386        }
    382387
    383         $output = sprintf($a["wrapper"],$a["default"]);
     388        $output = sprintf($recordTemplate,$a["default"]);
    384389
    385390        if ( ! is_null($values) && ! empty($values) ){
  • airpress/trunk/airpress.php

    r2238695 r2238751  
    117117add_action( 'wp_ajax_airpress_deferred', 'airpress_execute_deferred_queries' );
    118118
     119register_activation_hook( __FILE__, 'airpress_activation' );
     120register_deactivation_hook( __FILE__, 'airpress_deactivation' );
     121
     122if ( ! function_exists("airpress_activation") ){
     123
     124    function airpress_activation(){
     125
     126        flush_rewrite_rules();
     127
     128    }
     129
     130}
     131
     132if ( ! function_exists("airpress_deactivation") ){
     133
     134    function airpress_deactivation(){
     135
     136        flush_rewrite_rules();
     137
     138    }
     139
     140}
     141
     142
    119143function airpress_get_current_record(){
    120144    global $airpress, $post;
  • airpress/trunk/lib/chetmac/Airpress.php

    r2106394 r2238751  
    4949
    5050    public function check_for_update(){
     51
    5152        global $airpress_version;
     53
    5254        if ( get_option( 'airpress_version' ) != $airpress_version) {
    5355           
     
    5961            update_option("airpress_version", $airpress_version, false);
    6062
     63            flush_rewrite_rules();
     64
    6165        }
     66
    6267    }
    6368
     
    381386        }
    382387
    383         $output = sprintf($a["wrapper"],$a["default"]);
     388        $output = sprintf($recordTemplate,$a["default"]);
    384389
    385390        if ( ! is_null($values) && ! empty($values) ){
Note: See TracChangeset for help on using the changeset viewer.