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
/** | |
* Escape HTML. | |
* | |
* @param {String} html HTML code. | |
* @return {String} Escaped html. | |
*/ | |
function escape(html) { | |
const replace = { | |
'&': '&', | |
'<': '<', |
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 | |
// Just set up an array and pass it to the function, and | |
// echo out the returned HTML. | |
$atts = array( | |
'link' => $videourl, | |
'thumb' => $videothumb, | |
); | |
echo themeblvd_shortcode_lightbox( $atts ); |
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 | |
// Just set up an array and pass it to the function, and | |
// echo out the returned HTML. | |
$atts = array( | |
'link' => $videourl, | |
'thumb' => $videothumb, | |
); | |
echo themeblvd_shortcode_lightbox( $atts ); |
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 | |
// First, let's just build a string of content. | |
// Method 1: If you using single quotes and you want to insert | |
// variables, you MUST open and close the string, and append chunks | |
// together with periods. | |
$str = '[lightbox link="' . $videourl . '" thumb="' . $videothumb . '"]'; | |
// Method 2: When wrapping the string in double quotes, you can actually |
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 | |
// Use the following with Jump Start 2.2.4+ (framework 2.7.4+) | |
/** | |
* Adjust icons used for opening and closing toggles. | |
*/ | |
function my_toggle_icons( $icons ) { | |
// Icon for opening a closed toggle. | |
$icons['show'] = 'plus'; // Could also be more specific like `fal fa-plus`. |
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 | |
/** | |
* Checkout button. | |
*/ | |
function themeblvd_checkout_button(){ | |
global $edd_options; | |
return '<a href="' . get_permalink( $edd_options['purchase_page'] ) . '" class="checkout"><span class="inner">Checkout<i class="icon-shopping-cart"></i></span></a>'; |
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 | |
/** | |
* Customize TinyMCE plugins with Theme Blvd `editor` | |
* type options. | |
*/ | |
function my_editor_tinymce_plugins( $plugins ) { | |
$plugins = array( | |
'charmap', | |
'colorpicker', |
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 | |
/** | |
* The Header for our theme. | |
* | |
* WARNING: This template file is a core part of the | |
* Theme Blvd WordPress Framework. It is advised | |
* that any edits to the way this file displays its | |
* content be done with via hooks, filters, and | |
* template parts. | |
* |
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 ( class_exists( 'Theme_Blvd_Options_Page' ) ) { | |
class My_Options_Page extends Theme_Blvd_Options_Page { | |
/** | |
* This method needs to be overwritten because | |
* the parent class uses add_theme_page() which | |
* can only add pages as subpages to the | |
* Appearance menu. | |
*/ |
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 | |
/** | |
* HOW TO USE STANDARD PAGE TEMPLATE WITH LAYOUT BUILDER | |
* | |
* 1. Copy page.php to your child theme and rename | |
* it "template_builder.php". | |
* | |
* 2. Copy the commented code snippet from the top of | |
* parent theme template_builder.php in place of the | |
* comment snippet in your new child theme template_builder.php. |
NewerOlder