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
# 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 |
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 | |
// 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', |
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 | |
/** | |
* This is a sample function showing how to get a link toward the "Manage your subscriptions page" in Wysija (http://wordpress.org/plugins/wysija-newsletters/description/) | |
* You'll need to call that function at a moment where Wysija's classes are already loaded otherwise it won't work | |
* @return subscription link for the current logged in WordPress' user | |
*/ | |
function wysija_get_subscriptions_edit_link(){ | |
// wysija classes ar enot loaded so we can't use that function | |
if (!class_exists('WYSIJA')){ | |
return; |
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 | |
/** | |
* 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 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
# Sync fork with original repository | |
# | |
# Requires an "upstream" remote, pointing to original repo | |
# e.g. `git remote add upstream [email protected]:user/repo.git` | |
alias git-sync-fork="git fetch upstream; git checkout master; git merge upstream/master" |
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 | |
/* | |
Enviar e-mail para o administrador se houver posts para revisão | |
Dicas do @GugaAlves (@tudoparawp): | |
- Adicionar link para enviar e-mail diretamente para o administrador; | |
- Incluir link para a edição do post no admin, facilitando a vida do admin que receber este email. | |
Dicas do Gustavo Bordoni (@webord): | |
- incluir na função o $post (objeto para WP_Query) para não ficar passando o $post_id a cada save; |
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
// SmoothScroll for websites v1.2.1 | |
// Licensed under the terms of the MIT license. | |
// People involved | |
// - Balazs Galambosi (maintainer) | |
// - Michael Herf (Pulse Algorithm) | |
(function(){ | |
// Scroll Variables (tweakable) |
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 | |
/* | |
* Plugin Name: Category Image Field | |
* Plugin URI: http://claudiosmweb.com/ | |
* Description: Adds image field in category description. | |
* Version: 0.1 | |
* Author: Claudio Sanches | |
* Author URI: http://claudiosmweb.com/ | |
* License: GPLv2 or later | |
*/ |