php – Adding Mod Rewrite Rules Programmatically in WordPress Plugin-ThrowExceptions

Exception or error: The following sample plugin adds the custom mod rewrite rules to .htaccess when the user changes the permalink settings. /* Plugin Name: Sample Mod Rewrite */ add_action(‘generate_rewrite_rules’, array(new custom_mod_rewrite, “generate_rewrite_rules”)); class custom_mod_rewrite { function __construct() { $this->wp_rewrite = & $GLOBALS[“wp_rewrite”]; } function generate_rewrite_rules() { $non_wp_rules = array( ‘simple-redirect/?$plugin_name’ => ‘http://google.com’, ‘one-more-redirect/?$plugin_name’ => …

php – WordPress site release management strategy-ThrowExceptions

Exception or error: I’m updating an existing wordpress site making significant modifications the the theme and site structure, as well as making updates to plugins which in turn store their data into mysql database. As far as I’m aware there are 2 (3?) possible strategies here: ‘Dump-and-load’ MySQL database from DEV to LIVE and replace …

php – WordPress ajax function in child class-ThrowExceptions

Exception or error: If i have this classes class something { public function __construct() { add_action(‘wp_ajax_ajax_func’, array( $this, ‘ajax_func’ ) ); } public function ajax_func() { } } class stchild extends something { public function __construct() { } public function ajax_func() { echo “Test child1”; } } How to call only ajax_func function in stchild …