wp_enqueue_style built in styles

I’m a little confused by your question, can you not simply use wp_enqueue_style, which you actually wrote into this threads heading(not sure if you know the function exists or not). wp_enqueue_style works in the same way as the wp_enqueue_script counterpart, but of course as you’d expect, enqueues stylesheets.. Here’s a list of the enqueues i … Read more

Check if on Custom Post Type for TinyMCE buttons

If you followed that tutorial you linked then look at the function that registers the buttons: function mylink_button() { if ( ! current_user_can(‘edit_posts’) && ! current_user_can(‘edit_pages’){ return; } if ( get_user_option(‘rich_editing’) == ‘true’ ) { add_filter( ‘mce_external_plugins’, ‘add_plugin’ ); add_filter( ‘mce_buttons’, ‘register_button’ ); } } and you change it a bit to check for the … Read more

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

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