« first day (1692 days earlier)      last day (3267 days later) » 

1:50 AM
@gmazzap so that sets up all the index.php etc needed to get the sub dir install working?
 
 
7 hours later…
8:46 AM
@TomJNowell yes. And it generates a wp-config that loads composer autoload and integrates phpdotenv. And little more.
 
9:19 AM
Okay, I actually solved my issue:
http://wordpress.stackexchange.com/q/190455/22728
But now I'm striving for he good practice.
Which one is a better approach while I'm not using PHP OOP:
...using a Global variable into my function, or using a function directly into my function?
 
@MayeenulIslam I would not assign the return value of your function to a global for use within pre_get_posts, for starters you need to run that function prior to pre_get_posts in a global context, even when you might not need it, plus that is maintenance nightmare. I would just call the encapuslating function only when you need it inside of pre_get_posts
 
@userabuser Can I request you to post an answer so that I can check that live?
 
You already did in your own asnwer...
function e_exclude_posts( $query ) {
   if( $query->is_main_query() && $query->is_tax('my_tax') ) {
       $expired = g_get_all_the_expired_posts(); //now this won't create a problem
       $query->set( 'post__not_in', $expired );
   }
}
add_action( 'pre_get_posts', 'e_exclude_posts' );
 
so setting a global is nay-say
 
pretty bad basically...
 
9:26 AM
:)
 
for example if you are calling this in say your theme functions.php file, then that function is going to be ran in the global context each page load even if it does not get used... not good
so you only call the function in pre_get_posts conditional when you need it... E.g. when if( $query->is_main_query() && $query->is_tax('my_tax') ) === true
 
that's right
thanks a lo-oooo-t , @userabuser
 
all good
 
 
3 hours later…
12:51 PM
@gmazzap that page is unstyled for me, all the stylesheets etc are blocked because of mixed content warnings, https loading http blocked by extensions
Mixed Content: The page at 'https://wecodemore.github.io/wpstarter/docs/quick-start.html' was loaded over HTTPS, but requested an insecure stylesheet 'http://fonts.googleapis.com/css?family=Open+Sans:300|Source+Code+Pro:400'. This request has been blocked; the content must be served over HTTPS.
quick-start.html:11 Mixed Content: The page at 'https://wecodemore.github.io/wpstarter/docs/quick-start.html' was loaded over HTTPS, but requested an insecure stylesheet 'http://wecodemore.github.io/wpstarter/css/theme.min.css'. This request has been blocked; the content must be served over HTTPS.
 
hrm. when overriding wc templates in a theme, does that mean you overtake the translation textdomains as well? it certainly seems so looking at the end frontend results. how do i keep _e( "whatever", "woocommerce" ); translating things from "woocommerce" textdomain, from a theme-override template?
(doing wordpress.stackexchange.com/search?q=textdomain research in the background)
 
all better ^_^ thanks!
I have the https everywhere chrome extension installed in this chrome profile
it's a fast way of debugging mixed content stuff
 
thanks to you... was already fixed on local, forgot to rebuild static content
 
 
2 hours later…
3:26 PM
@gmazzap hey man...moving from Twitter to here.
 
 
5 hours later…
8:25 PM
@lkraav The domain used is whatever is provided in the function call. So in the theme's template just use the woocommerce domain if that is what's required. Or do you not have control over the theme?
 
i do have control. the observation is that the translations from the non-theme domains aren't getting translated
 
 
3 hours later…
11:26 PM
Gabe Koscky on June 04, 2015

Há mais ou menos 2 anos nós fizemos uma descoberta avassaladora: nós percebemos que a maioria das pessoas do mundo não fala Inglês. E, se isso é verdade, significa que existem programadores que, pasmém, não conhecem o Stack Overflow. O choque inicial foi grande, mas depois de um copo de água com açucar nós decidimos fazer algo a respeito disso: abrir novos sites sobre programação!

Criar novas comunidades onde mesmo quem não fala Inglês possa se expressar em sua própria língua, à sua própria maneira. Afinal, ter a resposta para todo tipo de pergunta sobre programação é só metade do que faz do St …

 

« first day (1692 days earlier)      last day (3267 days later) »