jerbrqvrdv
New Member
Example Code: \[code\]function flush_rewrite_rules(){ global $wp_rewrite; $wp_rewrite->flush_rules();}function activate(){ global $wp_rewrite; createRewriteRules( $wp_rewrite ); flush_rewrite_rules();}function createRewriteRules( $rewrite ){ global $wp_rewrite; $new_rules = array( 'option/(.+)' => 'index.php?option=' . $wp_rewrite->preg_index(1) ); $wp_rewrite->rules = $new_rules + $wp_rewrite->rules; // ERROR HERE............ return $wp_rewrite;}add_action( 'generate_rewrite_rules', createRewriteRules );register_activation_hook( file, activate );\[/code\]Sometimes gives Fatal error: Unsupported operand types, but activates the plugin and doesn't stop it from working... What am I doing wrong here?