Skip to content

Instantly share code, notes, and snippets.

@petermann
petermann / Disable WP REST API - Contact Form 7 Endpoints
Created April 28, 2023 18:54
Automatically Enable Contact Form 7 Endpoints with Disable WP REST API Plugin
/**
* Automatically Enable Contact Form 7 Endpoints with Disable WP REST API Plugin
* Plugin URI: https://wordpress.org/plugins/disable-wp-rest-api/
*/
function disable_wp_rest_api_enable_contact_form7_endpoints() {
$active_plugins = get_option('active_plugins');
// Check if the "Disable WP REST API" plugin is active
if (in_array('disable-wp-rest-api/disable-wp-rest-api.php', $active_plugins)
// Check if the "Contact Form 7" plugin is active
&& in_array('contact-form-7/wp-contact-form-7.php', $active_plugins)
@petermann
petermann / .Masks Form Fields
Last active October 29, 2024 21:09
Masks Form Fields - WordPress Plugin
Masks Form Fields - WordPress Plugin
Link: https://wordpress.org/plugins/masks-form-fields/
@petermann
petermann / ..WordPress - Multiple Domains
Last active August 12, 2020 17:54
Multiple Domains into Single Instance of WordPress