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
$('.export-csv').click(function(){ | |
var nearestRow = $(this).closest('tr'); | |
// console.log(nearestRow); | |
var allValue = []; | |
nearestRow.each(function() { | |
var eventDate = $(this).find('.event-date').text(); | |
allValue.push(eventDate.trim().replace(/["~!@#$%^&*\(\)_+=`{}\[\]\|\\:;'<>,.\/?"\- \t\r\n]+/g, '-')); | |
var eventName = $(this).find('.event-name').text(); | |
// console.log(eventName.trim().replace(/["~!@#$%^&*\(\)_+=`{}\[\]\|\\:;'<>,.\/?"\- \t\r\n]+/g, '-')); |
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_filter('woocommerce_login_redirect', 'wc_login_redirect'); | |
function wc_login_redirect( $redirect_to ) { | |
$page_slug = 'foo'; | |
$redirect_to = get_permalink( get_page_by_path( $page_slug ) ); | |
return $redirect_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 | |
global $woocommerce; | |
foreach ( $woocommerce->cart->get_cart() as $cart_item_key => $cart_item ) { | |
if($cart_item['product_id'] == $current_package_id ){ | |
$remove_url = $woocommerce->cart->get_remove_url( $cart_item_key ); | |
echo '<a href="'.$remove_url.'class="remove-item">Remove</a> | |
<script> | |
jQuery('a.remove-item').trigger('click'); | |
window.location.href = "'.home_url().'/foo/"; | |
</script>'; |
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
<form action="" method="post" enctype="multipart/form-data" name="form1" id="form1"> | |
Choose your file: <br /> | |
<input name="csv" type="file" id="csv" /> | |
<input type="submit" name="Submit" value="Submit" /> | |
</form> |
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
To checkout your own version you can use one of: | |
git checkout HEAD -- <filename> | |
git checkout --ours -- <filename> | |
git show :2:<filename> > <filename> # (stage 2 is ours) | |
To checkout the other version you can use one of: | |
git checkout test-branch -- <filename> |
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_action('wp_ajax_register_user_front_end', 'register_user_front_end', 0); | |
add_action('wp_ajax_nopriv_register_user_front_end', 'register_user_front_end'); | |
function register_user_front_end() { | |
$new_user_name = stripcslashes($_POST['new_user_name']); | |
$new_user_email = stripcslashes($_POST['new_user_email']); | |
$new_user_password = $_POST['new_user_password']; | |
$user_nice_name = strtolower($_POST['new_user_email']); | |
$user_data = array( | |
'user_login' => $new_user_name, |
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 login_form_frontend($args = array()) { | |
$defaults = array('echo' => true, | |
'redirect' => ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], // Default redirect is back to the current page | |
'form_id' => 'loginformfrontend', | |
'label_username' => __('Username'), | |
'label_password' => __('Password'), | |
'label_remember' => __('Remember Me'), | |
'label_log_in' => __('SIGN IN'), | |
'id_username' => 'user_login', | |
'id_password' => 'user_pass', |
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
<!-- Enqueue fullcalender.io ---> | |
<style> | |
#calendar { | |
max-width: 900px; | |
margin: 0 auto; | |
} | |
</style> | |
<?php | |
for ( $upcoming_events as $upcoming_event ) { | |
$upcoming_event_object = array( |
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
*.log | |
.htaccess | |
sitemap.xml | |
sitemap.xml.gz | |
wp-config.php | |
wp-content/advanced-cache.php | |
wp-content/backup-db/ | |
wp-content/backups/ | |
wp-content/blogs.dir/ | |
wp-content/cache/ |