Plugin Directory

Changeset 1981671


Ignore:
Timestamp:
11/28/2018 01:01:43 AM (7 years ago)
Author:
benhallbenhall
Message:

Fixes around Rewrite Rules

Location:
wpdevhub-troubleshooting-guides/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • wpdevhub-troubleshooting-guides/trunk/classes/class.DSCF_DTG_TroubleshootingGuides_Guide.php

    r1981644 r1981671  
    8888                    'search_items'          => __( 'Search Troubleshooting Guides' ),
    8989                ),
    90                 'description'           => __( 'Dimbal Troubleshooting Guides' ),
     90                'description'           => __( 'WPDevHub Troubleshooting Guides' ),
    9191                'public'                => true,
    9292                'has_archive'           => true,
  • wpdevhub-troubleshooting-guides/trunk/classes/class.DSCF_DTG_TroubleshootingGuides_Main.php

    r1981644 r1981671  
    6464        //DSCF_DTG_Utilities::migrateMetaBoxDataIfNeeded("steps", DSCF_DTG_TroubleshootingGuides_StepMetaBox::KEYNAME);
    6565
     66    }
     67
     68    public static function wpActionActivate(){
     69
     70        // Need to register the Taxonomies BEFORE calling the Flush Rewrite Rules Routine
     71        DSCF_DTG_TroubleshootingGuides_Guide::registerTaxonomies();
     72
     73        parent::wpActionActivate();
    6674    }
    6775
  • wpdevhub-troubleshooting-guides/trunk/classes/core/class.DSCF_DTG_StandardMain.php

    r1981651 r1981671  
    5656    public static function wpActionInit(){
    5757
    58         //flush_rewrite_rules();
    59 
    6058        // Some basic setup validations
    6159
     
    141139        // Flush the rewrite rules on activation
    142140        // https://codex.wordpress.org/Function_Reference/register_post_type
    143         flush_rewrite_rules();
     141        self::flushRewriteRules();
    144142
    145143    }
     
    163161        // Flush the rewrite rules on deactivation
    164162        // https://codex.wordpress.org/Function_Reference/register_post_type
    165         flush_rewrite_rules();
     163        self::flushRewriteRules();
    166164
    167165    }
     
    411409    /*
    412410     * Flush Rewrite rules
     411     * https://codex.wordpress.org/Function_Reference/register_post_type
    413412     */
    414413    public static function flushRewriteRules(){
     414
     415        // Note:: Need to make sure custom post types are registered before flushing rewrite rules (see DTG Example)
     416
     417        // Flush the rules
    415418        flush_rewrite_rules();
    416419    }
  • wpdevhub-troubleshooting-guides/trunk/index.php

    r1981651 r1981671  
    22/*
    33 * Plugin Name:   WPDevHub Troubleshooting Guides
    4  * Version:       2.7
     4 * Version:       2.8
    55 * Plugin URI:    https://www.wpdevhub.com/wordpress-plugins/troubleshooting-guides/
    66 * Description:   Create feature rich troubleshooting guides for your website visitors to follow.
     
    2525// Actions
    2626add_action( 'init', array('DSCF_DTG_TroubleshootingGuides_Main', 'wpActionInit'), 0 );
     27
     28// Activations Hooks
     29register_activation_hook(__FILE__, array('DSCF_DTG_TroubleshootingGuides_Main', 'wpActionActivate'));
  • wpdevhub-troubleshooting-guides/trunk/readme.txt

    r1981651 r1981671  
    55Requires at least: 3.0.1
    66Tested up to: 4.8
    7 Stable tag: 2.7
     7Stable tag: 2.8
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7171* Fix issues with bad URLs
    7272
     73= 2.8.0 =
     74* Fix problems related to flushing rewrite rules
     75
    7376== Upgrade Notice ==
    7477
Note: See TracChangeset for help on using the changeset viewer.