https://sublime.wbond.net/installation#st3
- Source Code Pro -
sourcecodepro.sh
- Hack -
hack.sh
ul.products li.product { | |
width: 46.411765%; | |
float: left; | |
margin-right: 5.8823529412%; | |
} | |
ul.products li.product:nth-of-type( 2n ) { | |
margin-right: 0; | |
} |
#optional part to install wordpress coding standards | |
git clone https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git wpcs | |
# tell phpcs about the wordpress coding standards | |
cd ~/bin/phpcs | |
scripts/phpcs --config-set installed_paths ../wpcs | |
# we probably want to ignore the space indenting on the files | |
vim ~/bin/ruleset.xml |
https://sublime.wbond.net/installation#st3
sourcecodepro.sh
hack.sh
function mailpoet_enable_wpmail(){ | |
if(class_exists('WYSIJA')){ | |
$model_config = WYSIJA::get('config','model'); | |
$model_config->save(array('allow_wpmail' => true)); | |
} | |
} | |
add_action('init', 'mailpoet_enable_wpmail'); |
<?php | |
// The ID of the lists you want to add a user to | |
$list_ids = array( 1 ); | |
// User Data without the custom fields | |
$data_subscriber = array( | |
'user' => array( | |
'email' => '[email protected]', | |
'firstname' => 'John', | |
'lastname' => 'Doe', |
# Activate the wordpress importer | |
wp plugin activate wordpress-importer --url=http://localhost/example.com/ | |
# Iterate over all of the import files in a given folder. | |
for f in myfolder/*.xml; do wp import $f --authors=skip --skip=attachment --url=localhost/example.com/; done |
<?php | |
/** | |
* function to return an undo unsbscribe string for MailPoet newsletters | |
* you could place it in the functions.php of your theme | |
* @return string | |
*/ | |
function mpoet_get_undo_unsubscribe(){ | |
if(class_exists('WYSIJA') && !empty($_REQUEST['wysija-key'])){ | |
$undo_paramsurl = array( |
This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.
I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.
<?php | |
// Exemplo 1 | |
// Filtra a edição de posts da categoria 6 permitida apenas para os usuários 5 e 9 | |
add_filter( 'user_has_cap', function( $allcaps, $caps, $args, $user ){ | |
if ( in_array($args[0], array( 'edit_post' ) ) ) | |
return $allcaps; | |
// Para `edit_post` será passado um argumento com o ID do post que desejamos verificar | |
if ( !isset( $args[2] ) || $args[2] == 0 || !is_numeric($args[2]) ) | |
return $allcaps; |
<?php | |
/** | |
* This scripts is intended to be triggered by Git hooks. For deployment you'll | |
* probably want to use `post-update`: | |
* http://schacon.github.io/git/githooks.html#post-update | |
* | |
* First, set the `PASS` constant to limit access to this script and use it as | |
* a `pass` GET variable. | |
* |