sudo usermod -a -G nginx ec2-user &&
exit
$ cd ~ | |
$ sudo curl -sS https://getcomposer.org/installer | sudo php | |
$ sudo mv composer.phar /usr/local/bin/composer | |
$ sudo ln -s /usr/local/bin/composer /usr/bin/composer | |
then you can run | |
$ sudo composer install |
/* | |
* search an array recursively to find | |
* the first instance of a key and return its value | |
* | |
* useful when you do not know the location of a key nested (only once) in a multidimensional array | |
* | |
*/ | |
function array_find_first_recursive($needle_key, array $haystack) { | |
if (array_key_exists($needle_key, $haystack)) { |
<?php | |
add_action( 'wp_enqueue_scripts', 'wps_enqueue_jquery' ); | |
/** | |
* Enqueue jQuery from Google CDN with fallback to local WordPress | |
* | |
* @link http://codex.wordpress.org/Function_Reference/wp_enqueue_script | |
* @link http://codex.wordpress.org/Function_Reference/wp_register_script | |
* @link http://codex.wordpress.org/Function_Reference/wp_deregister_script | |
* @link http://codex.wordpress.org/Function_Reference/get_bloginfo | |
* @link http://codex.wordpress.org/Function_Reference/is_wp_error |
<? | |
/** | |
* Repeatable Custom Fields in a Metabox | |
* Author: Helen Hou-Sandi | |
* | |
* From a bespoke system, so currently not modular - will fix soon | |
* Note that this particular metadata is saved as one multidimensional array (serialized) | |
*/ | |
function hhs_get_sample_options() { |
/* ---------------------------------------------------------------------------------------------------- | |
Super Form Reset | |
A couple of things to watch out for: | |
- IE8: If a text input doesn't have padding on all sides or none the text won't be centered. | |
- The default border sizes on text inputs in all UAs seem to be slightly different. You're better off using custom borders. | |
- You NEED to set the font-size and family on all form elements | |
- Search inputs need to have their appearance reset and the box-sizing set to content-box to match other UAs |