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 | |
$slider = new RevSlider(); | |
$arrSliders = $slider->getArrSliders(); | |
$addNewLink = self::getViewUrl(RevSliderAdmin::VIEW_SLIDER); | |
require self::getPathTemplate("sliders"); | |
?> |
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 | |
$args = array( | |
'orderby' => 'name', | |
'parent' => 0, | |
'order' => DESC | |
); | |
$categories = get_categories( $args ); | |
$curr_letter = ''; | |
foreach ( $categories as $category ) { | |
$this_letter = strtoupper(substr($category->name,0,1)); |
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
/* | |
* This code allows your posts to have a fallback featured image based on your category. | |
* It requires manual upload of the featured images. In this case it assumed /category-images to have | |
* been created in the root WP install directory. | |
* It is based on this tutorial at WPBeginner: | |
* http://www.wpbeginner.com/wp-themes/set-fallback-featured-image-based-post-category-wordpress/ | |
* The original tutorial assumed all categories have a featured image. | |
* This codes inserts a div (to be styled) when there is also no featured image for the category. | |
* Nathan Briggs was instrumental in implementation of the file_exists method. | |
*/ |
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 | |
/** | |
* Optimize WooCommerce Scripts | |
* Updated for WooCommerce 2.0+ | |
* Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages. | |
*/ | |
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 ); | |
function child_manage_woocommerce_styles() { | |
//remove generator meta tag |
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 checks whether either version of FooBox -- | |
* Free or Premium -- is activated. If not, it throws | |
* An admin notification, only for users who can | |
* activate plugins. | |
*/ | |
function fooboxnotpresent_admin_notice() { | |
if ( class_exists('Foobox_Free') || class_exists('fooboxV2')) { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<script src="//code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
// Small script to detect mobile browsers and toggle the visibility of specified elements. | |
(function($){ | |
var isMobile = function(_, ua){ | |
_.Android = ua.match(/Android/i); |
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 load_mc_iris() { | |
if (wp_script_is( 'iris', 'enqueued' )) { | |
return; // if it's already enqueued, don't enqueue it again. | |
} else { // since it's NOT enqueued, let's enqueue it | |
wp_enqueue_script( | |
'iris', //iris.js handle | |
admin_url( 'js/iris.min.js' ), //path to wordpress iris file |
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 | |
//Adding custom class to posts is easy with the post_class filter | |
add_filter('post_class', 'custom_content_class'); | |
function custom_content_class($classes) { | |
$classes[] = 'custom_class'; | |
return $classes; | |
} |
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 | |
add_filter('get_image_tag_class', 'add_imagelens_frames', 0, 4); | |
function add_imagelens_frames($classes, $id) { | |
$singlelens = get_post_meta( $id, '_enable_lens', true ); | |
if ($singlelens === 'imagelens-single') { | |
return $classes . ' ' . $singlelens; | |
} else { |
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 | |
/* Add Image Upload to Series Taxonomy */ | |
// Add Upload fields to "Add New Taxonomy" form | |
function add_series_image_field() { | |
// this will add the custom meta field to the add new term page | |
?> | |
<div class="form-field"> | |
<label for="series_image"><?php _e( 'Series Image:', 'journey' ); ?></label> |
OlderNewer