How can I conditionally add the filter option_home?

Assuming that if wp_sitemaps_enabled has a filter and it has that because we wanted to set it to false, otherwise it defaults to true for public sites. So I would just use and check whether it is filtered or not: add_filter( ‘wp_sitemaps_enabled’, ‘__return_false’ ); if (has_filter( ‘wp_sitemaps_enabled’) === true) { add_filter(‘option_home’, ‘any_callback_function’); } else { … Read more

Using the REST API filter, including two meta_queries breaks the response for one custom post type

Oddly, the cause of the problem seems to be the quotation marks around the comparison parameter. For example filter[meta_query][0][compare]=%27=%27 now needs to be filter[meta_query][0][compare]==. When only matching one meta value, this is not necessary, when matching two, this is, now, necessary. :/ Update: I realised that my hosting provider changed the version of Linux on … Read more