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
/* | |
* Polylang Language API functions tester - WordPress | |
* Github: https://gist.github.com/icetee/fbbfef5534fead58611e | |
* | |
*/ | |
function ex_pll_the_languages($arg = '') { | |
if ( function_exists('pll_the_languages') ) { | |
return pll_the_languages($arg); | |
} |
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 | |
/* | |
* A walker class to use that extends wp_dropdown_categories and allows it to use the term's slug as a value rather than ID. | |
* | |
* See http://core.trac.wordpress.org/ticket/13258 | |
* | |
* Usage, as normal: | |
* wp_dropdown_categories($args); | |
* |
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
/* | |
* Polylang Language Filter for the post - WordPress | |
* Github: https://gist.github.com/icetee/2f7db2d4105006cb1080 | |
* | |
* Require: | |
* SH_Walker_TaxonomyDropdown() | |
* https://gist.github.com/2902509 | |
* | |
* Polylang function_exists (or no use ex_pll__() instead __() ) | |
* https://gist.github.com/icetee/fbbfef5534fead58611e |
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 get_custom_categories($slug) { | |
$args = array( | |
'hide_empty' => 1, | |
'orderby' => 'name', | |
'show_count' => 0, | |
'pad_counts' => 0, | |
'hierarchical' => 1, | |
'taxonomy' => $slug, | |
'title_li' => '', |
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 remove_a_tag($string, $postid, $slug = true) { | |
$return = array(); | |
preg_match_all("/<a.*?>(.*?)<\/a>/", $string, $matches); | |
foreach ($matches[1] as $key => $value) { | |
if ($slug == true) { | |
$return[] = sanitize_title($value); |
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 create_category_translate() { | |
$currentScreen = get_current_screen(); | |
if ( $currentScreen->base == "settings_page_mlang" ) { | |
$categories = get_custom_categories("portfolio_category"); | |
foreach ($categories[1] as $cat) { | |
pll_register_string("Category", $cat); |
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
body { | |
-webkit-font-smoothing: antialiased; | |
} |
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 squares_content($) { | |
var $selector = $('.views-row'); | |
var max = Math.max.apply(Math, $selector.map(function(){ return $(this).height(); }).get()); | |
$selector.height(max); | |
})(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
{ | |
"vars": { | |
"@gray-base": "#000", | |
"@gray-darker": "lighten(@gray-base, 13.5%)", | |
"@gray-dark": "lighten(@gray-base, 20%)", | |
"@gray": "lighten(@gray-base, 33.5%)", | |
"@gray-light": "lighten(@gray-base, 46.7%)", | |
"@gray-lighter": "lighten(@gray-base, 93.5%)", | |
"@brand-primary": "darken(#428bca, 6.5%)", | |
"@brand-success": "#5cb85c", |