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 | |
if ( ! function_exists( 'allow_only_one_subscription' ) ) { | |
/** | |
* allow_only_one_subscription. | |
* | |
* This functions limits the number of items in | |
* WooCommerce cart to only one. | |
* | |
* @since 1.3.2 |
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 | |
/* | |
* On first publish set a special date in advance in custom field | |
*/ | |
add_action('transition_post_status','tanc_first_schedule_publish_set',10,3); | |
function tanc_first_schedule_publish_set($new, $old, $post) { | |
// REFERENCE | |
// $new = new post status ('publish') | |
// $old = old post status ('draft') |
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 | |
if ( ! function_exists( 'remove_select2_wc' ) ) { | |
/** | |
* remove_select2_wc. | |
* | |
* This function removes select2 JS and CSS so that | |
* theme can use its own. | |
*/ | |
function remove_select2_wc() { |
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 | |
if ( ! function_exists( 'wp_limit_dashboard_access' ) ) { | |
/** | |
* Limit the access of a certain user role to dashboard. | |
*/ | |
function wp_limit_dashboard_access() { | |
if ( current_user_can( 'user-role' ) && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) { | |
wp_redirect( home_url() ); | |
} |
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
{ | |
"always_show_minimap_viewport": true, | |
"auto_upgrade": false, | |
"bold_folder_labels": false, | |
"color_scheme": "Packages/Theme - Cobalt2/cobalt2.tmTheme", | |
"default_line_ending": "unix", | |
"font_size": 12, | |
"ignored_packages": | |
[ | |
"Markdown", |
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 function removes HTTP error from images | |
* while uploading on HTTPS protocol. | |
*/ | |
if ( !function_exists( 'http_wp_error_fix' ) ) { | |
function http_wp_error_fix( $array ) { | |
return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' ); |
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
/** | |
* Click on the pagination thumbnail | |
* to drag the owlcarosel to a particular clicked image | |
* and highlight its thumbnail. | |
* | |
* @author Ahmad Awais | |
* @since 1.0.0 | |
*/ | |
$('.vr_carousel__pagDiv').click(function() { | |
// Efficient $this. |
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 to override the checkout fields of WooCommerce. | |
* | |
*/ | |
if ( ! function_exists( 'override_woocommerce_checkout_fields' ) ) { | |
function override_woocommerce_checkout_fields( $fields ) { |
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 | |
if ( ! function_exists( 'inspiry_fix_select2_wc' ) ) { | |
/** | |
* inspiry_fix_select2_wc. | |
* | |
* This function removes select2 JS and CSS of WooCommerce | |
* so that theme can use its own. | |
* |
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 | |
if ( ! function_exists( 'inspiry_fix_select2_wc' ) ) { | |
/** | |
* inspiry_fix_select2_wc. | |
* | |
* This function removes select2 JS and CSS of WooCommerce | |
* so that theme can use its own. | |
* |