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
<?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 | |
/* | |
* 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( '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
Copyright (c) 2010-2015 Giulia Alfonsi <[email protected]> | |
Permission is hereby granted, free of charge, to any person | |
obtaining a copy of this software and associated documentation | |
files (the "Software"), to deal in the Software without | |
restriction, including without limitation the rights to use, | |
copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the | |
Software is furnished to do so, subject to the following | |
conditions: |
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
// Enable WP_DEBUG mode. | |
define( 'WP_DEBUG', true ); | |
// Enable Debug logging to the /wp-content/debug.log file. | |
// Create this file yourself. | |
define( 'WP_DEBUG_LOG', true ); | |
// Disable display of errors and warnings. | |
define( 'WP_DEBUG_DISPLAY', false ); | |
@ini_set( 'display_errors', 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 | |
/** | |
* This gist is used to create custom fields in the | |
* checkout form of EDD (Easy Digital Downloads). | |
*/ | |
/** | |
* Adding HTML for User Contact Form. | |
*/ | |
function add_address_html() { |
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
/** | |
* Default Body Class Styles | |
*/ | |
.rtl {} | |
.home {} | |
.blog {} | |
.archive {} | |
.date {} | |
.search {} |
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 for triggering different events | |
* on base of slide number in | |
* Owl Carousel 2 | |
* @url (http://www.owlcarousel.owlgraphic.com/) | |
*/ | |
vr_slider_detailsPage.on('change.owl.carousel', function(event) { | |
//console.log(event.item.index); | |
var vr_slide_index = event.item.index; | |
if ( vr_slide_index == 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
/** | |
* function for triggering different events | |
* on base of slide number in | |
* Owl Carousel 2 | |
* @url (http://www.owlcarousel.owlgraphic.com/) | |
*/ | |
vr_slider_detailsPage.on('change.owl.carousel', function(event) { | |
//console.log(event.item.index); | |
var vr_slide_index = event.item.index; | |
if ( vr_slide_index == 2 ) { |