Skip to content

Instantly share code, notes, and snippets.

View jaworowicz's full-sized avatar

Jakub Jaworowicz jaworowicz

View GitHub Profile
<script type="text/javascript" defer>
var _smid = "ID KLIENTA";
var _smcustom = true;
(function(w, r, a, sm, s ) {
w['SalesmanagoObject'] = r;
w[r] = w[r] || function () {( w[r].q = w[r].q || [] ).push(arguments)};
sm = document.createElement('script'); sm.type = 'text/javascript'; sm.async = true; sm.src = a;
s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(sm, s);
})(window, 'sm', ('https:' == document.location.protocol ? 'https://' : 'http://') + 'app2.emlgrid.com/static/sm.js');
<script type="text/javascript" defer>
var _smid = "ID KLIENTA";
var _smcustom = true;
(function(w, r, a, sm, s ) {
w['SalesmanagoObject'] = r;
w[r] = w[r] || function () {( w[r].q = w[r].q || [] ).push(arguments)};
sm = document.createElement('script'); sm.type = 'text/javascript'; sm.async = true; sm.src = a;
s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(sm, s);
})(window, 'sm', ('https:' == document.location.protocol ? 'https://' : 'http://') + 'app2.salesmanago.pl/static/sm.js');
AuthType Basic
AuthName "Página protegida"
AuthUserFile /home/.htpasswd
Require valid-user
<Files admin-ajax.php>
Order allow,deny
Allow from all
Satisfy any
</Files>
add_action('admin_head', 'jcz_support_admin_bar_css');
function jcz_support_admin_bar_css() {
echo '<style>#wp-admin-bar-jcz-help { background-color: #0066CC !important; }</style>';
}
<script src="http://jaworowi.cz/wp-content/themes/jaworowi.cz/jquery.magnific-popup.min.js"></script>
<link rel="stylesheet" href="http://jaworowi.cz/wp-content/themes/jaworowi.cz/magnific-popup.css">
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('.open-popup-link').magnificPopup({
type: 'inline',
//fixedContentPos : false,
midClick: true, // Allow opening popup on middle mouse click. Always set it to true if you don't provide alternative source in href.
callbacks: {
open: function () {
@jaworowicz
jaworowicz / Inny adres do wysyłki WooCommerce - Dodanie opcji.php
Created August 4, 2017 12:29
Potrzebujesz pomocy z WordPress lub WooCommerce? wejdź na http://jaworowi.cz lub wyślij email konsultacje@jaworowi.cz
add_filter( 'woocommerce_cart_needs_shipping_address', '__return_true', 50 );
#Dodaj do htaccess
#Blokada xmlrpc.php
#Zezwól na JetPACK
<Files xmlrpc.php>
Order Deny,Allow
Deny from all
Allow from 192.0.64.0/18
Satisfy All
</Files>
#Dodaj do htaccess
#Blokada xmlrpc.php
<Files xmlrpc.php>
order deny,allow
deny from all
</Files>
remove_action( 'wp_print_styles', 'print_emoji_styles' );
remove_action( 'admin_print_styles', 'print_emoji_styles' );
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
@jaworowicz
jaworowicz / WordPress first category
Created May 13, 2017 19:24
Wyświetlanie jednej kategorii - glownej, podczas gdy post jest również w kategoriach podrzędnych. http://jaworowi.cz/category/naprawa-wordpress
function g7_first_category() {
$category = get_the_category();
$category_name = '';
if ($category[0]) {
$category_name = sprintf(
'<a href="%s">%s</a>',
get_category_link($category[0]->term_id),
$category[0]->cat_name
);
}