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 | |
$posts = multisite_latest_post( array( | |
"how_many"=>10, | |
"how_long_days"=>30, | |
"how_many_words"=>50, | |
"more_text"=>"[...]", | |
"remove_html"=>true, | |
"sort_by"=>"post_date", | |
// if paginating: | |
"paginate"=>true, |
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: Twitter Demo | |
* Plugin URI: http://wp.tutsplus.com/tutorials/creative-coding/a-look-at-the-wordpress-http-api-a-practical-example-of-wp_remote_get/ | |
* Description: Retrieves the number of followers and latest Tweet from your Twitter account. | |
* Version: 1.0.0 | |
* Author: Tom McFarlin | |
* Author URI: http://tommcfarlin.com/ | |
* License: GPL-2.0+ | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt |
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( 'pre_get_posts', array( $this,'function_pre_get_posts' ) ); | |
function function_pre_get_posts(){ | |
// you can't use the query->set here for tax_query | |
// as tax query has already been made | |
// so you need to need add youself to any | |
// existing tax query | |
$tax_query = array( | |
'taxonomy' => 'tax_name', |
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
global $woothemes_sensei; | |
global $avia_config; | |
remove_action( 'sensei_before_main_content', array( $woothemes_sensei->frontend, 'sensei_output_content_wrapper' ), 10 ); | |
remove_action( 'sensei_after_main_content', array( $woothemes_sensei->frontend, 'sensei_output_content_wrapper_end' ), 10 ); | |
add_action('sensei_before_main_content', 'my_theme_wrapper_start', 10); | |
add_action('sensei_after_main_content', 'my_theme_wrapper_end', 10); | |
function my_theme_wrapper_start() { | |
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 | |
/** | |
* Filter the aspect ratio by field idea | |
* @param $ratio Default ratio | |
* @param $id The field ID in the form, pewc_group_1234_5678 | |
* @param $field The field object | |
*/ | |
function prefix_aspect_ratio( $ratio, $id, $field ) { | |
// Check for our field ID here |