Last active
October 21, 2023 16:47
-
-
Save Nodws/768eac8947d06bc5e9ae to your computer and use it in GitHub Desktop.
home and theme dirs
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 | |
exec('curl -LO https://wordpress.org/latest.zip; unzip latest.zip '); |
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 | |
// Disable login modals introduced in WordPress 3.6 | |
remove_action( 'admin_enqueue_scripts', 'wp_auth_check_load' ); | |
//Disable annoying index redirect | |
remove_filter('template_redirect', 'redirect_canonical'); | |
// Disable useless tags | |
remove_action( 'wp_head', 'rsd_link' ); | |
remove_action( 'wp_head', 'wlwmanifest_link' ); | |
remove_action( 'wp_head', 'wp_generator' ); | |
remove_action( 'wp_head', 'start_post_rel_link' ); | |
remove_action( 'wp_head', 'index_rel_link' ); | |
remove_action( 'wp_head', 'adjacent_posts_rel_link' ); | |
remove_action( 'wp_head', 'wp_shortlink_wp_head' ); | |
// all rubbish related to emojis | |
remove_action( 'admin_print_styles', 'print_emoji_styles' ); | |
remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); | |
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); | |
remove_action( 'wp_print_styles', 'print_emoji_styles' ); | |
remove_action('admin_enqueue_scripts', 'wp_auth_check_load'); | |
remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' ); | |
remove_filter( 'the_content_feed', 'wp_staticize_emoji' ); | |
remove_filter( 'comment_text_rss', 'wp_staticize_emoji' ); | |
// filter to remove TinyMCE emojis | |
add_filter( 'tiny_mce_plugins', 'disable_emojicons_tinymce' ); | |
// Remove useless retina images | |
add_filter( 'wp_calculate_image_srcset_meta', '__return_null' ); | |
add_filter( 'wp_calculate_image_srcset', '__return_false' ); |
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 | |
define('td', get_bloginfo('template_directory').'/' ); | |
define('hd', esc_url(home_url( '/' ))); | |
//WPconfig | |
$path = ''; //No trail | |
$http = isset($_SERVER['HTTPS']) ? 'https://' : 'http://'; | |
define( 'WP_SITEURL', $http . $_SERVER['SERVER_NAME'] . $path ); | |
define( 'WP_HOME', $http . $_SERVER['HTTP_HOST'] . $path ); | |
define('DB_NAME', $_SERVER['RDS_DB_NAME']); | |
define('DB_USER', $_SERVER['RDS_USERNAME']); | |
define('DB_PASSWORD', $_SERVER['RDS_PASSWORD']); | |
define('DB_HOST', $_SERVER['RDS_HOSTNAME'] . ':' . $_SERVER['RDS_PORT']); | |
define('WP_HTTP_BLOCK_EXTERNAL', true ); | |
define( 'WP_ACCESSIBLE_HOSTS', '*.wordpress.org,*.elementor.com,*.paypal.com' ); | |
define('CORE_UPGRADE_SKIP_NEW_BUNDLED', true); | |
define( 'AUTOSAVE_INTERVAL', 3600 ); | |
define( 'WP_POST_REVISIONS', 9 ); | |
define( 'WP_MAX_MEMORY_LIMIT', '356M' ); | |
//define( 'DISALLOW_FILE_EDIT', true ); | |
define( 'IMAGE_EDIT_OVERWRITE', true ); | |
//define( 'WP_AUTO_UPDATE_CORE', false ); | |
define( 'WP_DEBUG', false ); | |
//ini_set( 'display_errors', 'On' ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment