Customizer field value into functions.php variable

Sure, every setting in the Customizer is saved either as a theme mod (by default) or option (if you set the ‘type’ to ‘option’ in $wp_customize->add_setting()). You can access the user-defined value using get_theme_mod() (or get_option()). In your example, the value you are looking for can be retrieved with: $downloads_tab_text = get_theme_mod( ‘product-downloads-tab’ );

How to speed up admin-ajax.php in wordpress

Here’s the answer you’re searching for: Ajax takes 10x as long as it should/could Unfortunately, the solution there involves very detailed knowledge of what parts to load / what not to load and why stuff would break. Reading through github issues / comments, it seems this doesn’t work with HTTPS. Otherwise, you really can’t speed … Read more

Checking is user author of number of posts?

I guess count_user_posts is what you’re looking for 😉 This is how you use it: $user_post_count = count_user_posts( $userid , $post_type ); And it returns the number of published posts the user has written in this post type. PS. And if you want some more advanced count, get_posts_by_author_sql can come quite handy.

How to use thumbnails in gallery?

There is a project going on about the image sizes. You can follow it right here. Right now, you can try using shortcode_atts_gallery filter. Take a look at these codes to get a hint: /* Register shortcode_atts_gallery filter callback */ add_filter( ‘shortcode_atts_gallery’, ‘meks_gallery_atts’, 10, 3 ); /* Change attributes of wp gallery to modify image … Read more

wp_enqueue_script add integrity parameter

You will have to generate your own tag after the script is enqueued. Below, it’s looking for the fontawesome handle (the one you’re using to enqueue the script) before returning the custom tag. add_filter( ‘script_loader_tag’, ‘my_scripts_modifier’, 10, 3 ); function my_scripts_modifier( $tag, $handle, $src ) { if ( ‘fontawesome’ === $handle ) { return ‘<script … Read more