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
//JS | |
var ajaxcontent = $('.products'); | |
$.ajax({ | |
type: 'POST', | |
url: window.wp_data.ajax_url, | |
data: { | |
action: "loadPosts", | |
}, | |
success: function (html) { |
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
/* | |
* ajax Defaults (optional): | |
$.ajaxSetup({ | |
type : 'POST', | |
dataType : 'json', | |
cache : true, | |
global : true, | |
data : {}, | |
contentType : 'application/json', | |
beforeSend : function (xhr) { |
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 i in *.CR2; do sips -s format jpeg $i --out "${i%.*}.jpg"; done |
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
[ | |
{ | |
"name": "IndianRed", | |
"color": "#CD5C5C" | |
}, | |
{ | |
"name": "LightCoral", | |
"color": "#F08080" | |
}, | |
{ |
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($) { | |
$.fn.visible = function(partial, hidden) { | |
var $t = $(this).eq(0), | |
t = $t.get(0), | |
$w = $(window), | |
viewTop = $w.scrollTop(), | |
viewBottom = viewTop + $w.height(), | |
_top = $t.offset().top, |
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
<svg> | |
<linearGradient y2="0.5" x2="1" id="textGradient" spreadMethod="repeat" x1="0" y1="0.5"> | |
<stop stop-color="#802b78" offset="0"></stop><stop stop-color="#ef4036" offset="1"></stop> | |
</linearGradient> | |
<text style="fill: url(#textGradient);" y="1em">Sklepy i usługi</text> | |
</svg> |
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
find . -type f -exec chmod 644 {} + | |
find . -type d -exec chmod 755 {} + | |
#fix for wp-config.php and index.php | |
find . -name "wp-config.php" -exec chmod 444 {} + |
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
add_action('init', 'apiSynchronization_activation'); | |
function apiSynchronization_activation(){ | |
if ( !wp_next_scheduled( 'apiSynchronization' ) ) { | |
wp_schedule_event( time(), 'twicedaily', 'apiSynchronization'); | |
} | |
} | |
add_action('apiSynchronization', 'apiSync', 100); | |
function apiSync() | |
{ |
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 | |
/** | |
Instagram API | |
*/ | |
function instagram_user_ID($username, $client_id, $token){ | |
$ins_id = get_transient( 'instagram_userid' ); | |
if ( false === $ins_id || empty($ins_id) ) { | |
$url = 'https://api.instagram.com/v1/users/search?q=' . $username . '&client_id=' . $client_id .'&access_token=' . $token; | |
$api = wp_remote_get( $url ); | |
$data = json_decode($api['body']); |