Skip to content

Instantly share code, notes, and snippets.

View apsolut's full-sized avatar
🎯
Focusing

Aleksandar Perisic apsolut

🎯
Focusing
View GitHub Profile
@apsolut
apsolut / color_address_bar_chrome.php
Created April 18, 2017 08:27
color-address-bar-function
/* Written by Batz Bar http://amaze.website/set-color-of-address-bar-in-wordpress/
based on this stackoverflow answer http://stackoverflow.com/questions/26960703/how-to-change-the-color-of-header-bar-and-address-bar-in-newest-android-chrome-v */
add_action('wp_head','color_address_bar');
function color_address_bar() {
// Set here your html color. You could find a color picker here http://www.colorpicker.com/
//$color ="#ed1c24";
$color ="#ed1c24";
@apsolut
apsolut / preserve-page-and-taxonomy-hierarchy.php
Created April 21, 2017 07:32
WP backend navigation without pagination - nav-menus
<?php
/*
Plugin Name: Preserve Page and Taxonomy Hierarchy on Edit Menus Screen
Version: 0.1
Plugin URI: https://core.trac.wordpress.org/ticket/18282
Description: Disables paging for hierarchical post types and taxonomies on Edit Menus screen to preserve proper hierarchy in meta boxes.
Author: Sergey Biryukov
Author URI: http://profiles.wordpress.org/sergeybiryukov/
*/
@apsolut
apsolut / mls-slider-slickjs.js
Created May 31, 2017 08:27
mls-slider-slickjs
/*---------- Global Slider ----------*/
$('#mls-slider')
.on('init', function(event, slick){
}).on('beforeChange', function(event, slick){
}).on('afterChange', function(event, slick){
}).slick({
mobileFirst: true,
@apsolut
apsolut / yoast-move-to-bottom.php
Last active June 8, 2017 16:14
Move yoast metabox to bottom of page (even after acf... amazing)
// http://wpmunchies.com/
// Move Yoast Meta Box to bottom
function yoasttobottom() {
return 'low';
}
add_filter( 'wpseo_metabox_prio', 'yoasttobottom');
@apsolut
apsolut / list-with-load-more-button.php
Last active June 13, 2017 14:34
list with load more button - easy
<?php
/**
* Person
* List of VIPs
* Flexible fields
*
* @package DecomTheme
*/
$navigation = get_sub_field('navigation');
$center = get_sub_field('center');
@apsolut
apsolut / phpstorm-define-local-path.php
Created June 20, 2017 13:08
PhpStorm make local path work for all files and custom include, require
// PHPStorm
// it works, after all...
// define IF local ELSE live
define('ALEXTHEME_LOCAL', false);
// define
if (ALEXTHEME_LOCAL) {
define('ALEXTHEME_DIR', __DIR__);
}
@apsolut
apsolut / woocommerce-product-gallery.php
Created June 27, 2017 09:30
WooCommerce 3.x Gallery - Lightbox
@apsolut
apsolut / scrollmagic-element-offsetHeight.js
Created July 6, 2017 09:07
ScrollMagic sections - offsetHeight
/*
* ScrollMagic
* 2017
*/
var logo_normal = DD.logo.normal,
logo_black = DD.logo.black,
logo_white = DD.logo.white;
@apsolut
apsolut / WordPress Poedit keywords
Last active July 11, 2017 16:28
WordPress Poedit keywords
__
_e
__ngettext:1,2
_n:1,2
__ngettext_noop:1,2
_n_noop:1,2
_c,
_nc:4c,1,2
_x:1,2c
_ex:1,2c
<?php
/*
Plugin Name: sFTP sending file via ssh2_scp_send
Plugin URI: https://decom.ba
Description: send CSV file over PHP
Version: 17.0.0
Author: Decom
Author URI: https://decom.ba
Text Domain: language..
Domain Path: /languages