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 | |
if ( false !== stripos( $_SERVER['SERVER_NAME'], 'development' ) ) { | |
//development config goes here | |
} elseif ( false !== stripos( $_SERVER['SERVER_NAME'], 'testing' ) ) { | |
//testing config goes here | |
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 | |
if ( false !== stripos( $_SERVER['SERVER_NAME'], 'development' ) ) { | |
//development | |
define( 'WP_DEBUG', true ); //always develop with debugging on, or you are an idiot... | |
define( 'WP_CACHE', false ); //no caching of any fliles please | |
define( 'WP_LOCAL_DEV', true ); //for usage in Mark Jaquiths plugin | |
define( 'JETPACK_DEV_DEBUG', true ); //use Jetpack in Dev-mode | |
} else { | |
//production |
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 | |
if ( file_exists( dirname( __FILE__ ) . '/custom-config.php' ) ) { | |
//this handy dandy file can be excluded from your Git or SVN repo! | |
//so each developer can use his/her own config :-) | |
include( dirname( __FILE__ ) . '/custom-config.php' ); | |
} else { | |
//production config goes here, example: |
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
define( 'WP_POST_REVISIONS', 3 ); // 3 revisions should be enough, use "false" to deactivate post revisions | |
define( 'AUTOSAVE_INTERVAL', 300 ); // seconds, increase to something like "9999" to `disable` autosave | |
define( 'EMPTY_TRASH_DAYS', 7 ); // empty trash for files longer than a week in trash, use "0" to completely deactivate trash, WP standard is 30 days | |
define( 'CORE_UPGRADE_SKIP_NEW_BUNDLED', true ); // skip the wp-content directory while updating, because we don't use the default themes | |
define( 'DISALLOW_FILE_EDIT', true ); // disable file editing in the backend | |
define( 'WP_DEFAULT_THEME', 'genesis' ); //On install use this theme instead of WordPress default theme | |
// remove header information about php version | |
header_remove( 'X-Powered-By' ); |
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
if ( !function_exists('wp_install_defaults') ) : | |
/** | |
* {@internal Missing Short Description}} | |
* | |
* {@internal Missing Long Description}} | |
* | |
* @since 2.1.0 | |
* | |
* @param int $user_id User ID. | |
*/ |
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
add_filter( 'user_contactmethods', 'change_contactmethods' ); | |
/** | |
* Customize contact methods. | |
* | |
* @since 1.0.0 | |
* | |
* @param array $contactmethods Existing contact fields. | |
* @return array Updated contact fields. | |
*/ | |
function change_contactmethods( $contactmethods ) { |
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
add_filter( 'http_request_args', 'dont_update_theme', 5, 2 ); | |
/** | |
* Don't Update Theme. | |
* | |
* If there is a theme in the repo with the same name, | |
* this prevents WP from prompting an update. | |
* | |
* @since 1.0.0 | |
* | |
* @author Mark Jaquith |
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
add_action( 'init', array( $this, 'set_pagination_base' ) ); | |
/** | |
* Set pagination base for NL sites. | |
*/ | |
function set_pagination_base() { | |
if ( 'nl_NL' === get_locale() ) { | |
global $wp_rewrite; | |
if ( 'pagina' !== $wp_rewrite->pagination_base ) { | |
$wp_rewrite->pagination_base = 'pagina'; |
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
add_action( 'wp_head', 'append_header_js_vars' ); | |
/** | |
* Append some handy dandy JS vars to the head | |
* | |
* Adds necessary code to start the PE-application (on document ready), | |
* with the WP_DEBUG boolean as a parameter. | |
* | |
* @since 1.0.0 | |
*/ | |
function append_header_js_vars() { |
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
add_filter( 'wp_headers', 'add_ie_compatibility_header' ); | |
/** | |
* Disable IE compatibilty view modus. | |
* | |
* Not 100% guaranteed to have affect. | |
* | |
* @since 1.0.0 | |
*/ | |
function add_ie_compatibility_header( $headers ) { |
OlderNewer