Hot answers tagged

4

It is a core WP function, but only after WordPress version 5.5.0. If you're using an older version of WordPress, it won't exist yet. Do this: add_action('admin_init', function() { if ( ! function_exists( 'wp_get_environment_type' ) ) { return; } $environment = wp_get_environment_type(); //... Or, better still, make sure your WordPress installation is up ...


2

Naren, The actual set-up for the classic/TinyMCE editor is relatively straightforward, I have updated your wordpress_register_fields() function with the necessary lines. For wp_editor() to work you need to get the content if there's any saved, id the field and then provide settings arguments. (https://developer.wordpress.org/reference/functions/wp_editor/) ...


1

9 years and a pandemic later, I found my way to do use the filter of @mrwweb and create a nicely working Bootstrap (4) collapse with the Wordpress widgets: Because the dynamic_sidebar_params do contain unique params (such as ID) you can use this to add a custom collapse ID to each widget created. See: https://developer.wordpress.org/reference/hooks/...


1

as @TomJNowell told me in the comment, it was because of heavy font files. so I decided to use just woff2 format and removed other formats.


1

It still displays the script because you are using the wrong hook (and it doesn't exist) — wp_dequeue_scripts, and secondly, if the script is indeed enqueued via wp_enqueue_script(), then the generated id (used in the <script> tag) is in the form of <script handle>-js (i.e. suffixed with a -js) where <script handle> is the first parameter ...


Only top voted, non community-wiki answers of a minimum length are eligible