From 21314d8593d0474149e88216c97b52b1718ee403 Mon Sep 17 00:00:00 2001 From: sbyrd Date: Wed, 5 Oct 2022 21:30:07 -0400 Subject: [PATCH] lets do this --- .idea/.gitignore | 8 ++++++++ .idea/laravel-plugin.xml | 7 +++++++ .idea/modules.xml | 8 ++++++++ .idea/php.xml | 4 ++++ .idea/vcs.xml | 6 ++++++ .idea/wp_staging_plugin_disabler.iml | 8 ++++++++ wp-staging-plugin-disabler.php | 28 ++++++++++++++++++++++++++++ 7 files changed, 69 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/laravel-plugin.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/php.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/wp_staging_plugin_disabler.iml create mode 100644 wp-staging-plugin-disabler.php diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/laravel-plugin.xml b/.idea/laravel-plugin.xml new file mode 100644 index 0000000..83be292 --- /dev/null +++ b/.idea/laravel-plugin.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..a99cd2b --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/php.xml b/.idea/php.xml new file mode 100644 index 0000000..f6159c8 --- /dev/null +++ b/.idea/php.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/wp_staging_plugin_disabler.iml b/.idea/wp_staging_plugin_disabler.iml new file mode 100644 index 0000000..c956989 --- /dev/null +++ b/.idea/wp_staging_plugin_disabler.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/wp-staging-plugin-disabler.php b/wp-staging-plugin-disabler.php new file mode 100644 index 0000000..4025338 --- /dev/null +++ b/wp-staging-plugin-disabler.php @@ -0,0 +1,28 @@ +'staging']; +$plugins = ['fluent-smtp/fluent-smtp.php']; + +//Loop through our constants requirements +foreach($constant_requirements as $constant => $requirement) +{ + if (constant($constant) === $requirement) + { + //Our constant requirement is meet. Plugins need to be disabled + deactivate_plugins($plugins); + break; // We only need one constant requirement to be meet + } +} +