This file contains hidden or 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
function get_terms($taxonomy, $args = '') { | |
global $wpdb; | |
$empty_array = array(); | |
$single_taxonomy = true; | |
if ( ! taxonomy_exists($taxonomy) ) { | |
$error = new WP_Error('invalid_taxonomy', __('Invalid taxonomy')); | |
return $error; |
This file contains hidden or 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 | |
/** | |
* Implements taxonomy command. | |
* | |
* @package wp-cli | |
*/ | |
class Taxonomy_Command extends WP_CLI_Command { | |
/** | |
* Exports all terms from a taxonomy. |
This file contains hidden or 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
// non-prefixed version submited to core as patch | |
function tc_strip_for_xml( $string ) { | |
// Store the site charset as a static to avoid multiple calls to get_option() | |
static $is_utf8; | |
if ( ! isset( $is_utf8 ) ) { | |
$is_utf8 = in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) ); | |
} | |
if ( ! $is_utf8 ) { | |
return $string; | |
} |
This file contains hidden or 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 | |
/** | |
* Provide functionality to register new Archive Elements | |
*/ | |
/** | |
* Proposed generic field class to be used by the Settings API, Widgets, |
This file contains hidden or 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 | |
class FilterWithArgs { | |
protected $filter; | |
protected $function; | |
protected $priority; | |
protected $arg_count; | |
protected $args; | |
public function __construct( $filter, $function, $priority, $arg_count, $args ) { | |
$this->filter = $filter; | |
$this->function = $function; |
This file contains hidden or 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
/** | |
* Returns a compact date range like March 27-29, 1977 from two unix time stamps. If $end is empty | |
* or less than start returns start only. | |
* | |
* @param int $start Unix timestamp | |
* @param int $end Unix timestamp | |
* @param string $round Least unit of time to include - supported values: day, hour, minute | |
* @param string $include Largest unit of time to include - supported values: year, month, hour | |
* | |
* Samples: |
This file contains hidden or 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
} elseif ( isset ( $item->taxonomy ) && isset( $item->term ) ) { | |
if ( ( is_int( $item->term ) && $term = get_term_by( 'id', $item->term, $item->taxonomy ) ) | |
|| ( $term = get_term_by( 'name', $item->term, $item->taxonomy ) ) | |
|| ( $term = get_term_by( 'slug', $item->term, $item->taxonomy ) ) ) { | |
$item_array['menu-item-type'] = 'taxonomy'; | |
$item_array['menu-item-object'] = $term->taxonomy; | |
$item_array['menu-item-object-id'] = $term->term_id; | |
$item_array['menu-item-title'] = ( $item_array['menu-item-title'] ) ?: $term->name; | |
} else { | |
continue; |
This file contains hidden or 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
function seoslides_pre_user_query( $query ) { | |
if( 'DateRegistered' == $query->query_vars['orderby'] ) {// echo 'thus far'; | |
$query->query_from .= " LEFT JOIN wp_usermeta m ON (wp_users.ID = m.user_id AND m.meta_key = 'user_registered')"; | |
$query->query_orderby = "ORDER BY m.meta_value " . $query->query_vars['order']; | |
} | |
} | |
add_action( 'pre_user_query', 'seoslides_pre_user_query' ); | |
function seoslides_manage_users_columns( $columns ) { | |
$columns['user_registered'] = 'Date Registered'; |
This file contains hidden or 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: Lightbox Evolution | |
Plugin URI: http://codecanyon.net/item/lightbox-evolution-for-wordpress/119478 | |
Description: <strong>Lightbox Evolution</strong> is a tool for displaying images, html content, maps, and videos in a "lightbox" style that floats overtop of web page. Using Lightbox Evolution, website authors can showcase a wide assortment of media in all major browsers without navigating users away from the linking page. | |
Version: 1.4.5 | |
Author: Eduardo Daniel Sada | |
Author URI: http://codecanyon.net/user/aeroalquimia/portfolio | |
*/ |
This file contains hidden or 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
<div id="container"> | |
<h1>Hello | |
<span class="seoslides-vistoggler"> | |
<a href="#">Trigger</a> | |
<span>hide me</span> | |
</span> world | |
</h1> | |
The trigger can be a link, button, or anything else as long as it isn't in a span :) | |
</div> | |
<style> |