$ docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require( 'wp-load.php' ); | |
define('WP_USE_THEMES', false); | |
$sku = 'wp-pennant'; | |
// get the product ID from the SKU | |
$product_id = $wpdb->get_var( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key='_sku' AND meta_value='%s' LIMIT 1", $sku ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: WP Rocket | Disable permissions warnings about "cache" folders | |
* Description: It will prevent WP Rocket from displaying warnings on environments where the "cache" folders aren't writeable. | |
* Author: Vasilis Manthos | |
* License: GNU General Public License v3 or later | |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html | |
*/ | |
// Basic security, prevents file from being loaded directly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: WP Rocket | No Cache for IP | |
* Description: Disable WP Rocket caching and optimizations by IP. | |
* Plugin URI: https://github.com/wp-media/wp-rocket-helpers/tree/master/cache/wp-rocket-no-cache-for-admins/ | |
* Author: WP Rocket Support Team | |
* Author URI: http://wp-rocket.me/ | |
* License: GNU General Public License v2 or later | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); | |
$current_theme = wp_get_theme(); | |
if ( 'uncode' === strtolower( $current_theme->get( 'Name' ) ) || 'uncode' === strtolower( $current_theme->get( 'Template' ) ) ) { | |
/** | |
* Excludes Uncode init and ai-uncode JS files from minification/combine | |
* | |
* @since 3.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: WP Rocket | No Optimized CSS Delivery on Mobile | |
* Description: Disables optimized CSS delivery for mobile devices. | |
* Plugin URI: https://github.com/wp-media/wp-rocket-helpers/tree/master/static/wp-rocket-static-no-opt-css-mobile/ | |
* Author: WP Rocket Support Team | |
* Author URI: http://wp-rocket.me/ | |
* License: GNU General Public License v2 or later | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Speed Up 404 Static File | |
* Description: Skip WordPress handling 404 on static files to avoid lack of performance. | |
* Author: GeekPress | |
* Licence: GPLv2 or later | |
* */ | |
$path = parse_url( $_SERVER['REQUEST_URI'], PHP_URL_PATH ); | |
$path = explode( '/', $path ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// PHP memory limit for this site | |
define( 'WP_MEMORY_LIMIT', '128M' ); | |
// Explicitely setting url | |
define( 'WP_HOME', 'http://domain.com' ); | |
define( 'WP_SITEURL', 'http://domain.com' ); | |
// Set url to... whatever. | |
define( 'WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function activate_plugin_via_php() { | |
$active_plugins = get_option( 'active_plugins' ); | |
array_push($active_plugins, 'cloudflare-flexible-ssl/plugin.php'); | |
update_option( 'active_plugins', $active_plugins ); | |
} | |
add_action( 'init', 'activate_plugin_via_php' ); |
NewerOlder