The following module handles parsing a URL in JavaScript. If this script is run outside of a browser, where the DOM is inaccessible, a regular expression will be executed to parse the provided URL.
[@JSFiddle][1]
<?php | |
/** Absolute path to the WordPress directory. **/ | |
if ( !defined('ABSPATH') ) | |
define('ABSPATH', dirname(__FILE__) . '/'); | |
/** Define Environments **/ | |
$environments = array( | |
'localhost' => 'localhost', | |
'development' => '', |
function param(arrFields, callback) { | |
for (var t, o = {}, defaults = [], len = arrFields.length, i = len; i--;) { | |
t = o.toString.call(t = arrFields[i]) == '[object Array]' ? t : [t]; | |
defaults[i] = t[1]; | |
arrFields[i] = t[0]; | |
} | |
return function(fields) { | |
for (var t, args = arrFields.slice.call(arguments, 0), i = len; i--;) { | |
args.unshift(fields && (o.hasOwnProperty.call(fields, t=arrFields[i]) ? fields[t] : defaults[i])); |
<?php | |
/** | |
* The base configurations of the WordPress. | |
* | |
* This file has the following configurations: MySQL settings, Table Prefix, | |
* Secret Keys, WordPress Language, and ABSPATH. You can find more information | |
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing | |
* wp-config.php} Codex page. You can get the MySQL settings from your web host. | |
* | |
* This file is used by the wp-config.php creation script during the |
a{ cursor:pointer; } | |
a, a:link { | |
background-color: #eee; /*#407EC9*/ | |
border-radius:5px; | |
padding:0px 2px 0px 2px; | |
color: #666; | |
font-weight: none; | |
text-decoration: none; | |
opacity:.7; | |
} |
<?php | |
/** | |
* The base configurations of the WordPress. | |
* | |
* This file has the following configurations: MySQL settings, Table Prefix, | |
* Secret Keys, WordPress Language, and ABSPATH. You can find more information | |
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing | |
* wp-config.php} Codex page. You can get the MySQL settings from your web host. | |
* | |
* This file is used by the wp-config.php creation script during the |
This is a list of links I have read:
Warning: good quality :)
## Start .gitignore | |
*.log | |
.htaccess | |
/index.php | |
license.txt | |
readme.html | |
sitemap.xml | |
sitemap.xml.gz | |
wp-activate.php |
<?php | |
/** | |
* The base configurations of the WordPress. | |
* | |
* This file has the following configurations: MySQL settings, Table Prefix, | |
* Secret Keys, WordPress Language, and ABSPATH. You can find more information | |
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing | |
* wp-config.php} Codex page. You can get the MySQL settings from your web host. | |
* | |
* This file is used by the wp-config.php creation script during the |
# WP-Config File Changer | |
## Credit to Konstantin Kovshenin, a complete stranger who publishes nice things on the web. | |
### Nutshell: customize this code with various DB information and place it in wp-config.php file instead of corresponding config information. It instructs Wordpress to look for a different (empty) file in parent directory of local, development or production servers and serves up the appropriate config to wordpress. | |
### You will have to create empty env_local, env_development files in parent directories of your websites on corresponding servers. | |
<?php | |
if ( file_exists( dirname( __FILE__ ) . '/../env_local' ) ) { | |
// Local Environment |