/** * Create a secondary admin toolbar in the top right with integrated plugin/users search * * @author mccannex * * Changelog * 2024-08-01 – Fixed issue with crashing admin backend because WP core changed priority on certain hooks *…Continue reading
do_action( ‘qm/debug’, ‘[EventHelpers] Registering’ ); function current_events_filter($data) { // Get current time in GMT $now = new \DateTime(‘now’); $now->setTime(0, 0); $filtered = array_filter($data, function($element) use ($now) { if(isset($element->post_date)) { $post_date = new \DateTime($element->post_date); $post_date->setTime(0, 0); if($post_date >= $now) { return…Continue reading
do_action( ‘qm/debug’, ‘[StudioHelpers] Registering’ ); function corrugated_studios_query($query) { $query->set(‘meta_query’, array( array( ‘key’ => ‘visible’, ‘value’ => 1, ‘compare’ => ‘=’ ) )); $query->set(‘post_type’, ‘corrugated-studio’); $query->set(‘order’, ‘ASC’); $query->set(‘orderby’, ‘title’); } add_action(‘elementor/query/queryCorrugatedStudios’, ‘corrugated_studios_query’); do_action( ‘qm/debug’, ‘[StudioHelpers] Registered’ );Continue reading
add_action( ‘wp_before_admin_bar_render’, function () { global $wp_admin_bar; $wp_admin_bar->remove_menu( ‘wp-logo’ ); }, 0 );Continue reading
/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading
/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading
/** * Add a collection of checkboxes to the donation form. * * This snippet only works in Charitable 1.5 or above. * */ function wpchar_charitable_register_new_checkboxes_field() { if ( ! class_exists(“Charitable_Donation_Field” ) ) { return; }; /** * Define a…Continue reading