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 | |
global $current_user; | |
$address_fields = array(); | |
if ( isset( $_POST['add_line_1'] ) | |
&& isset( $_POST['city'] ) | |
&& isset( $_POST['state'] ) | |
&& isset( $_POST['zip_code'] ) |
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 Stack() { | |
this.value = []; | |
} | |
Stack.prototype.push = function(value) { | |
return this.value.push(value); | |
} | |
Stack.prototype.pop = function() { | |
return this.value.pop() ? true : false; |
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
root@serveraddress:DirectoryURL/.git |
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
if ( function_exists('ffwd_activate') ) { | |
remove_filter( 'mce_external_plugins', 'ffwd_register' ); | |
remove_filter( 'mce_buttons', 'ffwd_add_button', 0 ); | |
if ( is_admin() ) { | |
add_filter( 'mce_external_plugins', 'ffwd_register' ); | |
add_filter( 'mce_buttons', 'ffwd_add_button', 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
function update_product_schedule_date_meta( $post_id ) { | |
$dates_from = get_post_meta( $post_id, '_sale_price_dates_from', true ); | |
$dates_to = get_post_meta( $post_id, '_sale_price_dates_to', true ); | |
$dates_from = strtotime($dates_from); | |
$dates_to = strtotime($dates_to); | |
update_post_meta( $post_id, '_sale_price_dates_from', $dates_from ); | |
update_post_meta( $post_id, '_sale_price_dates_to', $dates_to ); | |
} |
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 and update custom field through Action Hook in registration form. Paste this code in the functions.php . You should create action hook "wpuf_registration_form_hook" in the registration field. | |
* | |
* @param int $form_id | |
* @param null|int $user_id | |
* @param array $form_settings | |
*/ | |
function render_registration_form_hook( $form_id, $user_id, $form_settings ) { |
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 order_email_include_shop_name( $order ) { | |
$seller_id = dokan_get_seller_id_by_order( $order->id ); | |
if ( $seller_id !== 0 ) { | |
$store_info = dokan_get_store_info( $seller_id ); | |
?> | |
<table cellspacing="0" cellpadding="6" style="width: 100%; border: 1px solid #eee;" border="1" bordercolor="#eee"> |
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 dokan_new_shipping_processing_times() { | |
$times = array( | |
'' => __( 'Ready to ship in...', 'dokan' ), | |
'1' => __( '1 business day', 'dokan' ), | |
'2' => __( '1-2 business day', 'dokan' ), | |
'3' => __( '1-3 business day', 'dokan' ), | |
'4' => __( '3-5 business day', 'dokan' ), | |
'5' => __( '1-2 weeks', 'dokan' ), |
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
$(document).ready(function() { | |
// Preloading | |
var div_box = "<div id='load-screen'><div id='loading'></div></div>"; | |
$("body").prepend(div_box); | |
$('#load-screen').delay(700).fadeOut(600, function(){ | |
$(this).remove(); | |
}); |