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
.et_pb_slides .et_pb_slide:first-child .et_pb_slide_description { | |
display:none; | |
} |
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
function weather_forecast_func( $atts ) { | |
$atts = shortcode_atts( array( | |
'city' => 'Kingston, ON' | |
), $atts ); | |
// delete_transient( 'weather_forecast' ); | |
if ( false === ( $weather_forecast = get_transient( 'weather_forecast' ) ) ) { | |
// $weather_forecast_raw = get_transient( 'weather_forecast_raw' ); |
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 | |
$wp_user_query = new WP_User_Query( array( 'role' => 'Subscriber', 'fields' => 'all') ); | |
$authors = $wp_user_query->get_results(); | |
if (!empty($authors)) { | |
echo '<ul>'; | |
$fields = array( | |
'Membership Category' => 'custom_field_1', |
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 file contains the fix. | |
*/ | |
/*global wc_add_to_cart_variation_params, wc_cart_fragments_params */ | |
/*! | |
* Variations Plugin | |
*/ | |
;(function ( $, window, document, undefined ) { |
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
# ----------------------------------------------------------------- | |
# .gitignore for WordPress | |
# Bare Minimum Git | |
# http://ironco.de/bare-minimum-git/ | |
# ver 20150227 | |
# | |
# This file is tailored for a WordPress project | |
# using the default directory structure | |
# | |
# This file specifies intentionally untracked files to ignore |
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
/** | |
* Generate VCF from form's data and send as attachment for admin, in Contact Form 7 | |
* | |
*/ | |
add_action('wpcf7_before_send_mail', 'wpcf7_add_attachment'); | |
function wpcf7_add_attachment($contact_form) { | |
global $_POST; | |
$submission = WPCF7_Submission::get_instance(); | |
$vcf_dir = WP_CONTENT_DIR.'/uploads/2017/04/'; | |
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
// Change filter_country function to following | |
function filter_by_country($payment_gateways){ | |
$woocommerce = function_exists('WC') ? WC() : $GLOBALS['woocommerce']; | |
if($woocommerce == null || $woocommerce->customer == null ) | |
return $payment_gateways; | |
$customer_country = $woocommerce->customer->get_country(); |
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 | |
/** | |
* Plugin Name: Meticulous Product Categories Widget | |
* Description: This plugin adds a woocommerce product category widget. Requires WooCommerce | |
* Version: 1.0 | |
* Author: Meticulous Solutions | |
* Author URI: http://MeticulouSolutions.com | |
* License: GPL2 | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt | |
*/ |
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 | |
/** | |
* Add following snippet in functions.php of your active theme. it should fix both admin and frontend. | |
*/ | |
function ms_admin_head() { | |
echo '<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">'; | |
} | |
add_action( 'admin_print_styles', 'ms_admin_head', 1 ); | |
add_action( 'wp_head', 'ms_admin_head', 1 ); |
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 | |
/** | |
* This code retrieves course data from an external API and displays it in the user's | |
* My Account area. A merchant has noticed that there's a delay when loading the page. | |
* | |
* 1) What changes would you suggest to reduce or remove that delay? | |
* 2) Is there any other code changes that you would make? | |
*/ | |
public function add_my_courses_section() { | |
// MR - Todos |