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
//For http basic authentication in php | |
//Just add this code on top before any echo or print in common file | |
$user = 'user'; | |
$password = 'pass'; | |
if (!($_SERVER['PHP_AUTH_USER'] == $user && $_SERVER['PHP_AUTH_PW'] == $password)) { | |
header('WWW-Authenticate: Basic realm="Please enter username and password to access tgis website"'); | |
header('HTTP/1.0 401 Unauthorized'); | |
echo '<h1>Unauthorized Access</h1>'; | |
exit; | |
} |
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( $ ) { | |
$(document).on('click','.thumbnails .zoom', function(){ | |
var photo_fullsize = $(this).attr("href"); | |
$('.woocommerce-main-image').attr('href',$(this).attr("href")); | |
$('.woocommerce-main-image img').removeAttr("srcset") | |
$('.woocommerce-main-image img').removeAttr("src").attr('src', photo_fullsize); | |
return false; | |
}); | |
} )( jQuery ); |
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
global $wp; | |
$current_url = home_url(add_query_arg(array(),$wp->request)); |
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 | |
/* | |
* PHP: Recursively Backup Files & Folders to ZIP-File | |
* (c) 2012-2014: Marvin Menzerath - http://menzerath.eu | |
*/ | |
// Make sure the script can handle large folders/files | |
ini_set('max_execution_time', 600); | |
ini_set('memory_limit','1024M'); |
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
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |