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 | |
include_once( plugin_dir_path( __FILE__ ) . 'classes/MetaBox.php' ); | |
include_once( plugin_dir_path( __FILE__ ) . 'classes/MediaAccess.php' ); | |
$meta_boxname = new WPAlchemy_MetaBox( array( | |
'id' => '_boxname_meta', | |
'title' => 'Metabox Name', | |
'template' => plugin_dir_path( __FILE__ ) . 'meta-template.php', | |
'mode' => WPALCHEMY_MODE_EXTRACT, | |
) ); |
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 | |
/** | |
* Responsive Embeds in WordPress | |
* | |
* Custom embed sizing for basic listing template | |
*/ | |
class ResponsiveVideoEmbeds | |
{ | |
/** | |
* Setup the object |
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
/** | |
* Load Media Upload Scripts | |
* | |
* Load the JS & CSS needed for the media upload field | |
*/ | |
function enqueue_scripts() { | |
// Only load on widgets screen | |
$screen = get_current_screen(); | |
if ( $screen->id != 'widgets' ) |
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
// Query arguments | |
$popular_args = array( | |
'posts_per_page' => $size, | |
'meta_key' => '_base_popular_posts_count', | |
'orderby' => 'meta_value_num' | |
'year' => date('Y'), // Current year | |
'monthnum' => date('n') // Current month | |
); |
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 | |
/** | |
* Template Name: Around The Web | |
* | |
* The template for displaying a curated resources Archive. | |
* | |
* Learn more: http://codex.wordpress.org/Template_Hierarchy | |
* | |
* @package _s | |
* @since _s 1.0 |
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
/** | |
* Google hosted jQuery | |
*/ | |
function google_hosted_jquery( $src, $handle ) { | |
// Only run for jQuery | |
if ( $handle == "jquery" ) { | |
$parse_url = parse_url( $src ); | |
$version = str_replace( 'ver=', '', $parse_url['query'] ); | |
return "//ajax.googleapis.com/ajax/libs/jquery/$version/jquery.min.js"; |
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
(function($){ | |
$(window).load( function() { | |
// Equalize columns | |
$('.wrapper').equalizeColumns({ | |
'primary_identifier' : '.primary-content', | |
'secondary_identifier' : '.secondary-content', | |
'callout_identifier' : 'aside', | |
'margin_offset' : 40 |
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
// Show an optional taxonomy term description | |
if ( is_tax() ) { | |
$term_description = term_description(); | |
if ( ! empty( $term_description ) ) | |
echo apply_filters( 'taxonomy_archive_meta', '<div class="taxonomy-description">' . $term_description . '</div>' ); | |
} |
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
/** | |
* Woo: Custom Download View | |
* | |
* Enable custom download box from plugin, if plugin is de-activated | |
* fallback to woocommerce default. | |
*/ | |
function rapid_mydownloads( $template, $slug, $name ) { | |
if ( $template == 'myaccount/my-downloads.php' && function_exists( 'rapid_show_custom_download_box' ) ) { | |
global $woocommerce; | |
rapid_show_custom_download_box(); |
OlderNewer