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
# >>>>>>>>> | |
# script to copy this structure - TO NEW DIRECTORY: | |
# slike1 | |
# ├── 12063DSC04233.JPG | |
# ├── 27454DSC04230.JPG | |
# └── sub1 | |
# ├── 15997DSC04140.JPG | |
# └── sub12 | |
# └── 25022DSC04150.JPG |
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 | |
// This script is to solve the problem of doing database search and replace | |
// when developers have only gone and used the non-relational concept of | |
// serializing PHP arrays into single database columns. It will search for all | |
// matching data on the database and change it, even if it's within a serialized | |
// PHP array. | |
// The big problem with serialised arrays is that if you do a normal DB | |
// style search and replace the lengths get mucked up. This search deals with |
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
{ | |
"$schema": "http://schemas.wp.org/trunk/theme.json", | |
"version": 2, | |
"settings": { | |
"layout": { | |
"contentSize": "750px" | |
}, | |
"color": { | |
"background": false, | |
"custom": false, |
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
magento transaction email insert block | |
cms/content.phtml == just returt cms block content! | |
{{block type="cms/block" block_id="blockIdHere" template="cms/content.phtml"}} |
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 | |
// Define a constant to use with html emails | |
define("HTML_EMAIL_HEADERS", array('Content-Type: text/html; charset=UTF-8')); | |
// @email - Email address of the reciever | |
// @subject - Subject of the email | |
// @heading - Heading to place inside of the woocommerce template | |
// @message - Body content (can be HTML) | |
function send_email_woocommerce_style($email, $subject, $heading, $message) { |
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
#CACHE | |
set $condition ''; | |
if ($request_method = POST){ | |
set $condition "null"; | |
} | |
if ($query_string) { | |
set $condition "null"; | |
} | |
if ($http_cookie ~* (comment_author|comment_author_|wordpress_logged_in|wp_woocommerce_session)) { | |
set $condition "null"; |
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
// attach that to everywhere | |
add_action( 'template_redirect', function (){ | |
$w = new WP_Query( array( | |
'post__in' => array( 823, 817 ), | |
'post_type' => 'any' , | |
// 'posts_per_page' => 100, | |
// 'offset' => 400 | |
)); |
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
$(document).ready(function(e){ | |
// local storage var | |
var ls = localStorage; | |
var now = new Date(); | |
var old = ( ls.getItem( 'cachetime' ) ) ? new Date( JSON.parse ( ls.getItem( 'cachetime' ) ) ) : new Date( '2000' ); | |
var dis = now - old; | |
var day = dis / (1000 * 60 * 60 * 24 ) ; | |
// show popup when EITHER: | |
// 1) popup never shown before (original first visit) | |
// 2) or if more then TIME passed after shown |
NewerOlder