1,406 reputation
320
bio website about.me/adam.bosco
location Glenwood Springs, Colorado
age 24
visits member for 1 year, 11 months
seen Nov 14 at 22:16

Level 6 Dire Code Monkey


Sep
30
awarded  Explainer
Aug
31
comment Remove meta robots tag from wp_head
NOTE: With the current release of WordPress SEO this answer is no longer valid - the lines modified within the plugin no longer exist. Visitors to this question may find that my second answer provides solutions which do not require plugin hacks. If you are not using WordPress SEO or wish to remove search-engine indexing from every page, the best solution to the question as posed is to enable "Discourage search engines from indexing this site."
Aug
31
revised Set TRUE or FALSE based on a wp_localize_script option value
added 16 characters in body
Aug
30
revised Set TRUE or FALSE based on a wp_localize_script option value
added 5 characters in body
Aug
30
revised Set TRUE or FALSE based on a wp_localize_script option value
added 216 characters in body
Aug
30
comment Set TRUE or FALSE based on a wp_localize_script option value
Or, more succinctly, you can simply cast the value of $fblbp['fbclsbtn'] directly to a boolean, i.e. $localize = array( 'button' => (bool) $fblbp['fbclsbtn'] );
Aug
30
answered Set TRUE or FALSE based on a wp_localize_script option value
Aug
30
comment Scheduled events disappear from events queue
@TomásCot totally looked over that - thanks! What a cryptic little note! I thought the source might elaborate on the issue further but no - you in fact quoted it verbatim.
Aug
30
comment Set TRUE or FALSE based on a wp_localize_script option value
By simply removing the quotes. true and false are reserved keywords in most languages used to reference a proper boolean value. In quotation marks they are strings, and when any string (depending on the language) is cast to boolean it evaluates as logical true such that all of the following logical operations will produce logical true: true && true, true && 'true', true && 'false', etc.
Aug
30
comment Set TRUE or FALSE based on a wp_localize_script option value
Aye - what is being done incorrectly is simply Javascript syntax - this question is not specific to WordPress, and as such may be closed as off-topic. It would be more appropriate on Stack Overflow or Webmasters. However I'm formulating a reply nonetheless
Aug
30
comment Scheduled events disappear from events queue
@TomásCot: I cannot seem to find the passage that you are referencing - mind throwing us a link?
Aug
30
comment Scheduled events disappear from events queue
'minutely' is not a core-supplied interval. Though unlikely that this is the root of the problem, could you please supply the filter responsible for adding the interval and let us know where it resides?
Jul
9
comment What, specifically, should be included in theme_name_setup()?
If you are planning to distribute the theme outside of the organization, then individual hooks are likely the way to go. And you are correct - while registering sidebars at after_theme_setup may work, widgets_init would indeed be more semantically correct!
Jul
9
comment What, specifically, should be included in theme_name_setup()?
It certainly does - code organization is choice ;) . In my experience, some theme authors like to create a single hooked function and use it as an authority for that event, acting to invoke all of the functionality that needs to execute at that time rather than providing any functionality itself. In a more WordPress traditional manner, others like to ignore the authoritative hooked function and create individual hooks for each function that would otherwise be invoked... The latter provides more flexibility as other code - a plugin for instance - has finer control over what functions execute.
Jul
9
comment What, specifically, should be included in theme_name_setup()?
On a final note, off the top of my head I can think of no reasons why "hooking absolutely everything [...] on the same hook is a train wreck waiting to happen," could you elaborate on this? If you're bothered by it all being in once place, you could break it up into multiple functions hooked to the after_theme_setup action, but doing so is a purely cosmetic change.
Jul
9
comment What, specifically, should be included in theme_name_setup()?
Some things frequently done at after_theme_setup: shortcode registrations, script and style registrations/enqueing, post type registrations, taxonomy registrations, theme support configuration, navigation menu registrations, theme environment configuration, adding theme-relevant actions, theme option initialization, admin dashboard modifications, localization domain setup, etc. etc.. In my mind, after_theme_setup is basically the primary entry point for theme functionality.
Jul
9
comment What, specifically, should be included in theme_name_setup()?
The original author may have perfectly valid reasons for all of the functionality called at the after_theme_setup hook. Considering that this is the first hook available to themes, it's common to initialize and register literally everything that the theme needs on this action. If the theme in question functions as intended as it is and you yourself don't see anything peculiar, why fix what isn't broke? Without actually seeing the content of that function, it's hard to get much more specific...
Jun
16
comment Can't find text source file in WP theme
It's stored in the database within the wp_options table. You should alter/remove it by editing the field on the settings page that I mentioned. You can also remove it by adding custom code to your installation, but such a solution is unnecessary given that you can do so through the dashboard, and without making the tagline hard-coded, to boot.
Jun
16
comment Dynamic Post Type Variable echo as string?
Let us continue this discussion in chat.
Jun
16
comment Dynamic Post Type Variable echo as string?
rewrite => slug can indeed share the value of $novus_comedy_to, but note that "slug"s' intended purpose is for use in URLs - if $novus_comedy_to is not URL-friendly (or URL-encoded) it could create issues. If the argument is omitted, WordPress will default to assigning the actual post-type string to slug (in this case, 'comedy') which is frequently alright - but whether or not you explicitly set slug and what you set it to are mostly a matter of personal preference as well as the specific needs of your project.