Anyway to edit the titlebar of WordPress Widgets in the Admin area?

I believe you are looking for $params = apply_filters( ‘dynamic_sidebar_params’, $params ); (look here: https://github.com/WordPress/WordPress/blob/master/wp-includes/widgets.php#L706). Now this filter will evaluate both in front end and back end. so to answer your question, you could wrap your filter in a if( is_admin() ){ // Do icons } check. Better yet, you could define this at registration … Read more

admin_post hook not called

Modify your form to include: <form action=”<?php echo admin_url(‘admin-post.php’); ?>” method=”post”> <input type=”hidden” name=”action” value=”volunteer”> … </form> and add an action to run your function: add_action( ‘admin_post_volunteer’, ‘send_contact_to_civicrm’ ); add_action( ‘admin_post_nopriv_volunteer’, ‘send_contact_to_civicrm’ ); function send_contact_to_civicrm() { // stuff here }

Enqueue style inside shortcode but its loaded at the bottom of page (before footer scripts)

Why it is added in the footer: This is the expected behaviour. Since you have enqueued the style within your Shortcode hook function, by the time it executes, WordPress is already done generating the <head> section of your page, since WordPress will only execute your shortcode function once it has found the shortcode in your … Read more

How to access certain WP functions inside custom class, in theme folder

You’re actually calling the add_meta_box() function before it’s defined, when you run this directly: \ci\wp\Metaboxes::addMetabox( ‘front_page_slide_settings’, ‘Slide settings’, ‘page’, ‘normal’, ‘high’ ); You don’t mention where you run it, but it’s too early or you run it in the front-end, where add_meta_box() is not defined. The add_meta_box() function is defined within this file: /** WordPress … Read more

Passing arguments into ‘init’ function

The one thing you are missing is the use of use (http://php.net/manual/en/functions.anonymous.php example #3) You code will look something like //define post type name $pt_name=”post”; //remove default wysiwyg editor add_action(‘init’, function() use ($pt_name) { $post_type = $pt_name; remove_post_type_support( $post_type, ‘editor’); }, 100); This will let PHP know what is the currect scope to use when … Read more

How do I hook a sidebar via add_action?

Explanation There’s the global array $wp_filters. This array stores some sub arrays. One for each priority. Each sub array then contains an array for each callback added. And the keys for those sub-sub arrays are the attached functions. Example If you do the following, somewhere in your code (preferable after the init hook): echo ‘<pre>’; … Read more

Hook into admin post list page

From your screenshot and explanation I guess I understand what you’re trying to accomplish. Concept Point is, that the question is more a X-Y Problem. What I’d recommend is changing the idea and use as much of what is available per default: The Quick Edit box. Quick Edit The default hook to extend quick edit … Read more