Does WP Have a Function To Generate .htaccess RewriteCond?

In short yes… ‘External’ Rewrite Rules If in add_rewrite_rule the rule is isn’t directed to index.php then the rule is treated as an ‘external’ rule (i.e. not to be processed by WordPress’ internal handing of rewrites) and instead written to the .htaccess file. I.e. if: add_rewrite_rule(‘^nutrition/([^/]*)/([^/]*)/?’,’somethingelse.php?p=12&food=$1 &variety=$2′,’top’); is used instead of add_rewrite_rule(‘^nutrition/([^/]*)/([^/]*)/?’,’index.php?p=12&food=$matches[1]&variety=$matches[2]’,’top’); Then the rule … Read more

How can I filter blog name?

The value is from get_option(‘blogname’), so you can filter pre_option_blogname: add_filter( ‘pre_option_blogname’, ‘wpse_78345_blogname’ ); function wpse_78345_blogname() { return ‘Haha!’; } Do not filter option_blogname. This is wrong: you are wasting time with that, because WordPress will parse the option cache for the stored result, and then you don’t even use it.

Change the name of an installed plugin

Here is the plugin directory structure yoursite\wp-content\plugins\ [editing-plugin-folder] open the folder you will find a .php file in there, edit the file using any editor. you can change the name of the plugin in commented area /* Plugin Name: Name according to you Plugin URI: */ save the file refresh your wp-admin dashboard and there … Read more

Best way for plugin to accept POSTs?

One option is to use the add_rewrite_endpoint technique I mention in my comment. Another option is to use the admin_post_{action} hook. For example, you can POST data to your URL with an action GET parameter: http://www.example.com/wp-admin/admin-post.php?action=my_plugin_action Then hook that action via admin_post_nopriv_my_plugin_action to receive that request and process the data: function wpd_my_plugin_action() { status_header(200); // … Read more

Plugin child folder?

You don’t, for the same reason you don’t modify WordPress Core, you extend it or use hooks and filters to modify its behaviour. So when extending or changing plugins you have 2 options: Forking You’ve been creating forks of a plugin so far, but it’s important to change the name when this happens so your … Read more