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 | |
function add_custom_meta_boxes_to_page() { | |
add_meta_box( 'custom_wysiwyg', __('Custom WYSIWYG'), 'custom_wysiwyg', 'page', 'normal', 'high' ); | |
} | |
add_action( 'add_meta_boxes_page', 'add_custom_meta_boxes_to_page' ); | |
add_action( 'save_post', 'save_custom_wysiwyg' ); | |
//Build | |
function custom_wysiwyg() { | |
global $post; |
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 | |
function add_custom_meta_boxes_to_page() { | |
global $post; | |
if ( 'product-configurator' == $post->post_name ) { | |
remove_post_type_support('page', 'editor'); | |
add_meta_box( 'description_of_configurator', __('Configurator Information'), 'description_of_configurator', 'page', 'normal', 'high' ); | |
add_meta_box( 'hero_content', __('Hero Content'), 'hero_content', 'page', 'side', 'low' ); | |
} | |
} | |
add_action( 'add_meta_boxes_page', 'add_custom_meta_boxes_to_page' ); |
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 | |
function custom_page_template( $page_template ){ | |
if ( is_page( 'product-configurator' ) ) { | |
$page_template = dirname( __FILE__ ) . '/product_configurator.php'; | |
} | |
return $page_template; | |
} | |
add_filter( 'page_template', 'custom_page_template' ); |
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 | |
//Create Page | |
function create_page() { | |
if ( !$post = get_page_by_path( 'product-configurator', OBJECT, 'post_type' ) ) { | |
$user_id = get_current_user_id(); | |
$page = array( | |
'post_title' => 'Product Configurator', | |
'post_status' => 'publish', | |
'post_author' => $user_id, |
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
.video-wrapper { | |
position: relative; | |
width: 100%; | |
height: 0; | |
padding-bottom: 56.25%; | |
margin: 0px auto; | |
} | |
.video-wrapper iframe { | |
position: absolute; |
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 | |
$woocommerce_customer_new_account_settings = get_option('woocommerce_customer_new_account_settings'); | |
$user_pass = 'generated_password'; | |
$user_login = 'user_name'; | |
$email = '[email protected]'; | |
$blogname = 'user_name'; | |
$password_generated = 'generated_password'; | |
require_once( '/www/wp-content/themes/theme-name/woocommerce/emails/customer-new-account.php' ); | |
$email_content = ob_get_clean(); | |
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 | |
//Not original code, just don't want to loose it | |
// fill in your Constant Contact login and API key | |
$ccuser = get_theme_mod( 'ccuser' ); | |
$ccpass = get_theme_mod( 'ccpass' ); | |
$cckey = get_theme_mod( 'key' ); | |
// fill in these values | |
$firstName = ""; | |
$lastName = ""; |
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
//Includes Polyfill | |
if (!String.prototype.includes) { | |
String.prototype.includes = function(search, start) { | |
'use strict'; | |
if (typeof start !== 'number') { | |
start = 0; | |
} | |
if (start + search.length > this.length) { | |
return false; |
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
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { | |
//Code here | |
} |
OlderNewer