313 reputation
28
bio website
location
age
visits member for 2 years, 11 months
seen Feb 7 at 16:02

Jan
21
awarded  Constituent
Jan
13
awarded  Caucus
Oct
18
awarded  Scholar
Oct
18
comment What should I use instead of WP_CONTENT_DIR and WP_PLUGIN_DIR?
Many thanks – that gives me enough to work with!
Oct
18
accepted What should I use instead of WP_CONTENT_DIR and WP_PLUGIN_DIR?
Oct
16
comment What should I use instead of WP_CONTENT_DIR and WP_PLUGIN_DIR?
@CharlesClarkson I reference that page in the first sentence of my question. It says not to use the above constants, but doesn't suggest an alternative to things like WP_PLUGIN_DIR, hence my question here.
Oct
16
comment What should I use instead of WP_CONTENT_DIR and WP_PLUGIN_DIR?
(I'm specifically interested in finding the full path to installed plugins other than the plugin that contains my own code, in case that helps to explain.)
Oct
16
comment What should I use instead of WP_CONTENT_DIR and WP_PLUGIN_DIR?
Thanks for this, but your answer seems to deal with URLs rather than absolute server paths, which is what I was interested in. For example, plugins_url() returns the URL to the plugins folder, not the full path to the directory on the server. Are there similar functions for handling directories that I'm not aware of? Or is the advice not to use the WP_PLUGIN_DIR constant simply wrong?
Oct
16
awarded  Student
Oct
16
awarded  Critic
Oct
16
asked What should I use instead of WP_CONTENT_DIR and WP_PLUGIN_DIR?
Jan
29
answered Wordpress plugin archive
Dec
16
awarded  Yearling
Jun
7
revised Detecting a WordPress URL without doing a full HTTP GET?
Added info regarding Link header on wp.com blogs
Jun
7
comment Detecting a WordPress URL without doing a full HTTP GET?
@Rarst Yes - that's the caveat. It's possible for sites to spoof this, and there may be some that use the page_id variable already. Any sort of detection method using headers can probably be spoofed, so I don't think it's worth worrying too much about that. Which just leaves false positives for custom CMS. I couldn't think of a more WordPress-specific variable that would be less likely to be used elsewhere. Is there one?
Jun
7
answered Detecting a WordPress URL without doing a full HTTP GET?
Apr
24
revised Where Can I get wordpress hosting similar to wordpress.com?
Updated pricing
Jan
31
comment check for shortcode in post/pages AND widgets AND template files
You're welcome. Worth noting that the original poster would need to call the hooks wp_print_styles or wp_enqueue_scripts from the plugin or shortcode function. It won't work if you use the functions wp_enqueue_style() or wp_enqueue_scripts() directly inside the plugin/hook -- those functions have to be inside whichever function the wp_print_styles and wp_enqueue_scripts hooks call.
Jan
31
comment check for shortcode in post/pages AND widgets AND template files
+1 From the developer notes for v3.3: "WordPress 3.3 allows wp_enqueue_script() to work mid-page, which means most of that Jedi logic is no longer needed."
Jan
31
awarded  Citizen Patrol