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 | |
// Set product price if dyncialy populate vlaue is set to 'workshop_price' | |
add_filter( 'gform_field_value_workshop_price', 'cf_custom_product_price', 10, 2 ); | |
function cf_custom_product_price( $value, $field ) { | |
global $post; | |
// Get the workshop price | |
$quantity = get_post_meta( $post->ID, 'workshop_price', 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 pb_load_inline_svg( $filename ) { | |
// Add the path to your SVG directory inside your theme. | |
$svg_path = '/assets/svg/'; | |
$file_end = '.svg'; | |
//Check the SVG file exists | |
if ( ! file_exists( CHILD_DIR . $svg_path . $filename . $file_end ) ) { |
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
//* Lightweight Youtube Emebeds | |
//********************************************** | |
// https://www.labnol.org/internet/light-youtube-embeds/27941/ | |
document.addEventListener("DOMContentLoaded", | |
function() { | |
var div, n, | |
v = document.getElementsByClassName("youtube-player"); | |
for (n = 0; n < v.length; n++) { | |
div = document.createElement("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
$ dandelion --config=staging.yml deploy | |
$ dandelion --config=production.yml deploy |
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 | |
// Don't include opening php tag | |
// Cmb2 meta feild prefix | |
$prefix = '_homepage_header_gallery_' | |
// Get the list of files | |
$files = get_post_meta( get_the_ID(), $prefix . 'images', 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
<?php | |
// Don't include opening php tage | |
// Change feautred image text for Portfolios | |
add_filter( 'post_type_labels_portfolios', 'pb_change_featured_portfolios_image_labels', 10, 1 ); | |
function pb_change_featured_portfolios_image_labels( $labels ) { | |
$new_text = __( 'Portfolio Image', 'core-functionality' ); | |
$labels->featured_image = $new_text; |
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 | |
// Don't include opening php tag | |
//* Change Post Editor Placeholder Text | |
//********************** | |
add_filter( 'enter_title_here', 'pb_change_placeholder_title_text' ); | |
function pb_change_placeholder_title_text( $title ){ | |
$screen = get_current_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 | |
// Don't include opening php function | |
// Remove website comment field | |
add_filter('comment_form_default_fields', 'pb_remove_comment_url'); | |
function pb_remove_comment_url( $fields ) { | |
unset( $fields['url'] ); | |
return $fields; |
NewerOlder