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 | |
/** | |
* My Account page | |
* | |
* @author WooThemes | |
* @edited by McLane Creative | |
* @package WooCommerce/Templates | |
* @version 3.1.0 | |
*/ |
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 | |
class My_Custom_My_Account_Endpoint { | |
/** | |
* Custom endpoint name. | |
* | |
* @var string | |
*/ | |
public static $endpoint = 'my-custom-endpoint'; |
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
// Rob Scott makes the icon for diners and jcb disappear pfft like magic | |
function rs_removed_icon( $icons ) { | |
$icons = str_replace( '<img src="[your absolute url to...]/assets/images/icons/credit-cards/jcb.svg" alt="JCB" width="32" style="margin-left: 0.3em" />', '', $icons ); | |
$icons = str_replace( '<img src="[your absolute url to...]/assets/images/icons/credit-cards/diners.svg" alt="Diners" width="32" style="margin-left: 0.3em" />', '', $icons ); | |
return $icons; | |
} | |
add_filter( 'woocommerce_gateway_icon', 'rs_removed_icon'); |
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
//Add a checkout padlock and alternative message in the Pay Now button - by Robin Scott of Silicon Dales | |
add_filter( 'woocommerce_order_button_text', 'sd_custom_order_button_text' ); | |
function sd_custom_order_button_text() { | |
return __( 'Checkout Securely 🔒', 'woocommerce' ); | |
} |
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
a:focus, | |
.focus a { | |
outline: none !important; | |
} |
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
// Add a shortcode to dispay [now_time] for the time in Europe/London - by Robin Scott of Silicon Dales | |
function sd_now_time_formated($atts) { | |
date_default_timezone_set("Europe/London"); | |
$i = date('g:i A'); | |
return $i; | |
} | |
add_shortcode('now_time', 'sd_now_time_formated'); |
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
// the gist below will hide stuff on the frontpage in wordpress, when added to a theme template file... see https://silicondales.com/tutorials/wordpress-tutorials/code-hide-content-front-page-wordpress/ | |
<?php if( !is_front_page() ) {?> | |
// hide this stuff | |
<?php } ?> |
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
//this gist will hide Yoast breadcrumbs on the blog front page (the home page if you made this a page) | |
// see https://silicondales.com/tutorials/wordpress-tutorials/code-hide-content-front-page-wordpress/ | |
<?php if( !is_front_page() ) { | |
if ( function_exists('yoast_breadcrumb') ) { | |
yoast_breadcrumb(' | |
<p id="breadcrumbs">','</p> | |
'); | |
} | |
} | |
?> |
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
// Remove unwanted fields from Gravity Forms export - updated by Robin Scott of Silicon Dales | |
add_filter( 'gform_export_fields', function ( $form ) { | |
// array of field IDs I never want to see on the export page | |
$fields_to_remove = array( | |
'payment_amount', | |
'payment_date', | |
'payment_status', | |
'transaction_id', | |
'user_agent', | |
'ip', |
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
// Robin Scott added this here for use in SiliconDales.com, but the snippet comes from Gravity Forms docs, here: https://docs.gravityforms.com/gform_export_fields/ | |
add_filter( 'gform_export_fields', function ( $form ) { | |
// only limit the fields available for export form form ID 3 | |
if ( $form['id'] == 3 ) { | |
// array of field IDs I never want to see on the export page | |
$fields_to_remove = array( | |
'payment_amount', | |
'payment_date', | |
'payment_status', | |
'transaction_id', |
OlderNewer