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 shopfront_child_theme_site_title_fonts( $fonts ) { | |
// the font-name must match the google font name exactly as shown on https://edgewebfonts.adobe.com/fonts | |
$fonts['pt-sans'] = 'PT Sans'; | |
$fonts['droid-sans'] = 'Droid Sans'; | |
return $fonts; | |
} | |
add_filter( 'shopfront_typography_site_title_fonts', 'shopfront_child_theme_site_title_fonts' ); |
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 shopfront_child_theme_body_fonts( $fonts ) { | |
// the font-name must match the google font name exactly as shown on https://edgewebfonts.adobe.com/fonts | |
$fonts['pt-sans'] = 'PT Sans'; | |
$fonts['droid-sans'] = 'Droid Sans'; | |
return $fonts; | |
} |
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 shopfront_child_theme_breadcrumbs() { | |
if ( function_exists( 'yoast_breadcrumb' ) && !is_home() ) | |
yoast_breadcrumb( '<p id="breadcrumbs">', '</p>' ); | |
} | |
add_action( 'shopfront_content_start', 'shopfront_child_theme_breadcrumbs' ); |
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 | |
if ( ! defined( 'EDD_DISABLE_ARCHIVE' ) ) | |
define( 'EDD_DISABLE_ARCHIVE', 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 | |
function my_theme_easy_image_gallery_lightbox( $lightboxes ) { | |
// the option that is saved to the database, and the label that appears in the select menu | |
$lightboxes['colorbox'] = 'Colorbox'; | |
return $lightboxes; | |
} | |
add_filter( 'easy_image_gallery_lightbox', 'my_theme_easy_image_gallery_lightbox' ); |
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 my_theme_easy_image_gallery_scripts() { | |
$lightbox = function_exists( 'easy_image_gallery_get_lightbox' ) ? easy_image_gallery_get_lightbox() : ''; | |
if ( 'colorbox' == $lightbox ) { | |
wp_enqueue_script( 'colorbox-js', get_stylesheet_directory_uri() . '/colorbox/jquery.colorbox-min.js', array( 'jquery' ), '1.4.26', true ); | |
wp_enqueue_style( 'colorbox-css', get_stylesheet_directory_uri() . '/colorbox/colorbox.css', '', '1.4.26', 'screen' ); | |
} |
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 my_theme_easy_image_gallery_js() { | |
$lightbox = function_exists( 'easy_image_gallery_get_lightbox' ) ? easy_image_gallery_get_lightbox() : ''; | |
if ( 'colorbox' == $lightbox ) { ?> | |
<script> | |
jQuery(document).ready(function() { |
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 my_theme_easy_image_gallery() { | |
// return if we're not on a single download page | |
if ( ! is_singular( 'download' ) ) | |
return; | |
// stop it appending to the end of the gallery automatically | |
remove_filter( 'the_content', 'easy_image_gallery_append_to_content' ); |
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 my_child_theme_set_download_labels( $labels ) { | |
$labels = array( | |
'name' => _x( 'Products', 'post type general name', 'your-theme-name' ), // this is the one that is "downloads" by default, change this to Templates | |
'singular_name' => _x( 'Product', 'post type singular name', 'your-theme-name' ), | |
'add_new' => __( 'Add New', 'your-theme-name' ), | |
'add_new_item' => __( 'Add New Product', 'your-theme-name' ), | |
'edit_item' => __( 'Edit Product', 'your-theme-name' ), | |
'new_item' => __( 'New Product', 'your-theme-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
<?php | |
/** | |
* Filter Easy Image Gallery HTML to add description | |
* | |
*/ | |
function my_child_theme_easy_image_gallery_description( $html, $rel, $image_link, $image_class, $image_caption, $image, $attachment_id, $post_id ) { | |
// get the image's description | |
$image_description = get_post( $attachment_id )->post_content ? get_post( $attachment_id )->post_content : ''; |
OlderNewer