lets do this
This commit is contained in:
commit
21314d8593
|
@ -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
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="LaravelPluginSettings">
|
||||
<option name="routerNamespace" value="" />
|
||||
<option name="mainLanguage" value="en" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/wp_staging_plugin_disabler.iml" filepath="$PROJECT_DIR$/.idea/wp_staging_plugin_disabler.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="PhpProjectSharedConfiguration" php_language_level="7.3" />
|
||||
</project>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
Plugin Name: Wp Staging Plugin Disabler
|
||||
Plugin URI: https://cooini.com/services/dev/wordpress
|
||||
Description: This plugin will disable plugins that should be disabled in a staging environment
|
||||
Version: 1.0
|
||||
Author: sbyrd
|
||||
Author URI: https://cooini.com/
|
||||
License: MINE-all-mine
|
||||
*/
|
||||
|
||||
require_once(ABSPATH . 'wp-admin/includes/plugin.php');
|
||||
|
||||
$constant_requirements = ['WP_ENVIRONMENT_TYPE'=>'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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue