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
# Install brew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# Install composer | |
brew install homebrew/php/composer | |
### PHPCS | |
composer global require "squizlabs/php_codesniffer=*" | |
# Add to your .bash_profile |
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 | |
function get_default_language_posts($query) | |
{ | |
if ($query->is_main_query() && is_home() && function_exists('pll_languages_list') && !is_admin()) { | |
$languages = pll_languages_list(array('hide_empty' => 1)); | |
$terms = get_terms('post_translations'); | |
$lang_default = pll_default_language(); | |
$lang_current = pll_current_language(); | |
$post_ids = array(); |