This file contains 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 | |
/** | |
* WooCommerce price adjustment for WPUF | |
* | |
* @param int $post_id | |
* | |
* @return void | |
*/ | |
function wpufe_update_post_price( $post_id ) { |
This file contains 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 remove_wc_password_meter() { | |
wp_dequeue_script( 'wc-password-strength-meter' ); | |
} | |
add_action( 'wp_print_scripts', 'remove_wc_password_meter', 100 ); |
This file contains 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 wpufe_update_post_geo1( $post_id ) { | |
function gmw_update_post_type_post_location( $post_id ) { | |
// Return if it's a post revision | |
if ( false !== wp_is_post_revision( $post_id ) ) | |
return; | |
// check autosave // | |
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { |
This file contains 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 _mygd_dequeue_script() { | |
if(!function_exists('geodir_plugin_url')){return;} | |
wp_deregister_script( 'chosen' ); | |
wp_register_script('chosen', geodir_plugin_url() . '/geodirectory-assets/js/chosen.jquery.min.js', array(), GEODIRECTORY_VERSION); | |
wp_dequeue_style( 'dokan-chosen-style' ); | |
} | |
add_action( 'wp_print_scripts', '_mygd_dequeue_script', 100 ); |
This file contains 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_action( 'wpuf_add_post_after_insert', function( $post_id ) { | |
wp_set_post_terms( $post_id, get_post_meta( $post_id, 'wpuf_hidden_cat', true ), 'your taxonomies name' ); | |
}); |
This file contains 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
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li.active, | |
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li:hover, | |
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li.dokan-common-links a:hover{ | |
background: #6abb46; | |
} | |
input[type="submit"].dokan-btn-theme, a.dokan-btn-theme, .dokan-btn-theme, | |
input[type="submit"].dokan-btn-theme:hover, | |
a.dokan-btn-theme:hover, |
This file contains 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
/* Showing the extra field on the registration form */ | |
add_action('register_form', 'new_register_field'); | |
function new_register_field() { | |
?> | |
<p> | |
<label for="first_name"><?php _e('First Name') ?><br /> | |
<input type="text" name="first_name" id="first_name" class="input" value="<?php echo esc_attr($_POST['first_name']); ?>" size="25" tabindex="20" /> | |
</label> | |
</p> |
This file contains 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
/*MIME TYPE*/ | |
function wpufe_custom_upload_extensions( $extensions ) { | |
$extensions['custom'] = array( | |
'label' => __( 'Custom Extensions', 'wpuf' ), | |
'ext' => 'eps,ai', | |
); | |
return $extensions; | |
} |
This file contains 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
/* global shipping for each seller into the seller profile */ | |
add_action( 'show_user_profile', 'my_show_extra_profile_fields' ); | |
add_action( 'edit_user_profile', 'my_show_extra_profile_fields' ); | |
function my_show_extra_profile_fields( $user ) { | |
$country_obj = new WC_Countries(); | |
$countries = $country_obj->countries; | |
$states = $country_obj->states; |
OlderNewer