**Admin
wp_user_level
10**
wp_capabilities
a:1:{s:13:"administrator";b:1;}
/** | |
* Overrides the default wc_get_template_part cachekey to add the $_SERVER['SERVER_NAME'] as an additional unique identifier. | |
* | |
* @param string $template Template path. | |
* @param mixed $slug Template slug. | |
* @param string $name Template name (default: ''). | |
* @return mixed $template Modified template path from new $cachekey. | |
*/ | |
function wc_get_template_part_override( $template, $slug, $name ) { | |
if ( isset( $_SERVER['SERVER_NAME'] ) ) { |
<?php | |
/** | |
* @package active-plugins | |
* @version 1.0 | |
* | |
* Plugin Name: Active Plugins | |
* Plugin URI: http://wordpress.org/extend/plugins/# | |
* Description: This is a development plugin | |
* Author: Carlo Daniele | |
* Version: 1.0 |
// Best if put before this line | |
/* That's all, stop editing! Happy Pressing. */ | |
if (!defined('WP_DEBUG') && isset($_ENV['PANTHEON_ENVIRONMENT'])) { | |
if(in_array( $_ENV['PANTHEON_ENVIRONMENT'], array('test', 'live'))) { | |
define('WP_DEBUG', false); | |
define( 'WP_DEBUG_DISPLAY', false ); | |
@ini_set( 'display_errors', 0 ); | |
define( 'WP_DEBUG_LOG', false ); |
<?php | |
/** | |
* Sample script that returns DB environment variables in Pantheon so 3rd party | |
* applications can check the changes and update accordingly. | |
* Disclaimer: This is just a sample script and you should put additional security in it like input/output validation and file access checks, etc... | |
* | |
* Usage: Upload this file in the root site and access by http://dev-example.pantheonsite.io/dbenv.php?fetch=DB_PORT | |
* Will return to you the latest DB port number of that environment | |
*/ | |
// |
# WordPress # | |
############ | |
web/wp-config-local.php | |
web/wp-cli.local.yml | |
web/wp-content/uploads | |
web/wp-content/blogs.dir/ | |
web/wp-content/upgrade/ | |
web/wp-content/updraft/ | |
web/wp-content/backupwordpress-*/ | |
web/wp-content/backup-db/ |
function menu_initial() { | |
if ( 894 !== get_current_user_id() ) { | |
$menu_slug = 'plugins.php'; | |
remove_menu_page( 'admin.php?page=wp_stream' ); | |
remove_menu_page( 'edit.php?post_type=wp_stream_alerts' ); | |
remove_menu_page( 'admin.php?page=wp_stream_settings' ); | |
remove_menu_page( 'admin.php?page=sib_page_home' ); | |
remove_menu_page( 'wp_stream' ); | |
remove_menu_page( 'sib_page_home' ); |
<?php | |
define('WP_APP_DEBUG', true ); | |
define('WP_APP_DEBUG_UID', 58 ); | |
/** | |
* Debug function | |
* | |
* @return true if debug parameters is enabled | |
*/ |
// ADD NEW ADMIN USER TO WORDPRESS | |
// ---------------------------------- | |
// Put this file in your Wordpress root directory and run it from your browser. eg example.com/adduser.php | |
// Delete it when you're done. | |
require_once('wp-blog-header.php'); | |
require_once('wp-includes/registration.php'); | |
// ---------------------------------------------------- | |
// CONFIG VARIABLES | |
// Make sure that you set these before running the file. | |
$newusername = 'admin'; |
// You can easily put a list of many 301 url redirects in this format | |
// Trailing slashes matters here so /old-url1 is different from /old-url1/ | |
$redirect_targets = array( | |
'/old-url1' => '/new-url1', | |
'/old-url2' => '/new-url2', | |
'/old-url3' => '/new-url3', | |
); | |
if ( (isset($redirect_targets[ $_SERVER['REQUEST_URI'] ] ) ) && (php_sapi_name() != "cli") ) { | |
echo 'https://'. $_SERVER['HTTP_HOST'] . $redirect_targets[ $_SERVER['REQUEST_URI'] ]; |