Reputation
6,742
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
2 18 32
Newest
 Populist
Impact
~468k people reached

Feb
17
awarded  Populist
Sep
28
comment How do I make a draft post accessible to everyone?
@MatthiasGrahamSlick - You just need something that will set the ENV_PRODUCTION constant if you're on production. I was using domain.com for production and staging.domain.com for staging, so my line was define( 'ENV_PRODUCTION', false === stripos( $_SERVER['HTTP_HOST'], 'staging' ) ); Does that help?
Sep
7
awarded  Good Answer
Aug
19
awarded  Yearling
May
22
awarded  Popular Question
May
13
awarded  Good Question
Apr
28
comment How do I make a draft post accessible to everyone?
@Joelio Can you be specific about the problem you're solving? As a simple approach, I just added this code to my functions.php, and added a simple definition to my wp-config.php which set the ENV_PRODUCTION constant to true or false depending on the request domain.
Dec
23
revised I Want to Get A Plugin Version Number Dynamically
replaced broken xref link with link to Codex page
Dec
22
awarded  Nice Answer
Oct
10
answered How do I make a draft post accessible to everyone?
Aug
19
awarded  Yearling
Jul
31
awarded  Nice Answer
Jul
2
awarded  Curious
Apr
20
awarded  Notable Question
Jan
21
awarded  Caucus
Jan
10
comment How to use get_template_part()?
Oh, good point. With the formula I gave, the require or require_once call (from locate_template) is inside a function and so doesn't have access to the current scope.
Jan
9
awarded  Nice Answer
Dec
6
comment I Want to Get A Plugin Version Number Dynamically
@AriSusanto Are you trying to use it on the front end? The WP plugin administration functions are only defined in the admin section. If you need to use this on the front end you'll have to include the file wp-admin/includes/plugin.php.
Sep
30
awarded  Nice Answer
Sep
1
awarded  Enlightened