sam_a
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: [Plugin: W3 Total Cache] Amazon CDN – Test fail, but works as CDNI did get a successful connection after setting
CURLOPT_SSL_VERIFYPEERtofalse, but I have a hunch that updating curl’s certificates might be the proper fix.So I set
CURLOPT_VERBOSE => trueand first triedCURLOPT_SSL_VERIFYPEER => true:* About to connect() to www.google.com port 443 (#0) * Trying 74.125.67.103... * connected * Connected to www.google.com (74.125.67.103) port 443 (#0) * SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed * Closing connection #0And then I tried
CURLOPT_SSL_VERIFYPEER => false* About to connect() to www.google.com port 443 (#0) * Trying 74.125.67.103... * connected * Connected to www.google.com (74.125.67.103) port 443 (#0) * SSL connection using RC4-SHA * Server certificate: […] * SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.Forum: Fixing WordPress
In reply to: [Plugin: W3 Total Cache] Amazon CDN – Test fail, but works as CDNI haven’t been able to test it, but some Googling suggests setting
CURLOPT_SSL_VERIFYHOSTorCURLOPT_SSL_VERIFYPEERor both tofalsemight work on IIS.Forum: Fixing WordPress
In reply to: [Plugin: W3 Total Cache] Amazon CDN – Test fail, but works as CDNI’m getting the “Unable to list distributions” error also.
It’s a IIS-6 server with curl installed.
The error message for the request was “could not connect to host”. Could be a problem making SSL requests on a Windows server? See the comments — http://php.net/manual/en/ref.curl.php
Forum: Plugins
In reply to: [Plugin: W3 Total Cache] Home and content directory paths are incorrectThe content directory path still seems to be incorrect in version 0.9 (revision 257304 of http://plugins.svn.wordpress.org/w3-total-cache/trunk).
It’s looking for the content directory in
[path to WordPress application dir]/wp-contentForum: Plugins
In reply to: [Plugin: W3 Total Cache] Home and content directory paths are incorrectWill it be in the trunk soon?
I’m still seeing incorrect home paths in http://plugins.svn.wordpress.org/w3-total-cache/trunk revision 253018
Forum: Plugins
In reply to: [Plugin: W3 Total Cache] Home and content directory paths are incorrectAwesome.
Forum: Everything else WordPress
In reply to: Add link with class to page menuUse the
page_css_classfilter:add_filter('page_css_class', 'my_page_css_class', 10, 2); function my_page_css_class($class, $page) { if ( 'Contact' == $page->post_title ) { $class .= ' page-contact-special-class'; } return $class; }Then select the anchor as descendant:
.page-contact-special-class a { /* my special styles */ }There is an enhancement ticket & patch for filtering the Page menu/list hyperlinks directly, which will make this sort of thing a lot easier. You can vote for the ticket if you want to see this change soon. 🙂
Forum: Fixing WordPress
In reply to: get_post_ancestors( $page->ID ) is always emptyIt’s not actually the argument type (you can get missing ancestors with either an ID or object argument), but a problem with get_posts.
Anyway, there’s a patch now 🙂
Ticket #10381 (new defect (bug)): post->ancestors isn’t always set
Forum: Fixing WordPress
In reply to: [Widget Logic] Conditional check parent category help!It looks like you’re using
post_is_in_descendant_categorycorrectly.post_is_in_descendant_category( 33 )means “are any of the current post’s assigned categories descendants of category ID 33.”Forum: Fixing WordPress
In reply to: If in subcategory of a category?Just to clarify (there was some confusion in another thread about this) — you have to actually copy the definition of the post_is_in_descendant_category function mentioned in the Codex before you use it — it doesn’t come with WordPress. 😉
Forum: Fixing WordPress
In reply to: clean SVN checkoutCodex: Installing WordPress with clean Subversion repositories
I could never figure out what to do with the index.php file 😉 — anyway, you do move
wp-configandwp-content, but (unlike my advice above) you leave index.php where it is and instead edit the mod_rewrite rules to pass requests there.I take this does not mean we can re-name the directories?
Any of the directories WordPress allows you to move you can also rename, as long as you tell WordPress the new location — either in the Admin panels or wp-config, usually.
Forum: Requests and Feedback
In reply to: Why did they depricate bloginfo(‘stylesheet_directory’);You could try
<?php dirname( get_bloginfo('stylesheet_url') ); ?>Forum: Plugins
In reply to: Pull latest attachment from post?Hello 007casper,
You may want to start a new thread since this one is already “resolved”. Anyway —
I tried the full code on my WP and it prints images for every post that has an image.
If you’re sure that each post has an attached image and a working thumbnail, do “View source” from your browser and check if WP is printing an
<img />(even if you can’t see it on the page).You don’t want to change
numberposts => 1in the post_image() function because it’s only supposed to print 1 image per post.Forum: Fixing WordPress
In reply to: clean SVN checkoutIf you define the WP_PLUGIN constants yourself (in wp-config.php), those values get used; otherwise WordPress defines them (based on the WP_CONTENT values) in wp-settings.php.
So you don’t need to set the WP_PLUGIN constants in wp-config.php unless you’ve moved the plugins directory outside of the content directory.
Forum: Fixing WordPress
In reply to: clean SVN checkoutThis is what I did:
- Move (or check out) the WordPress application files into a subdirectory, and set that as your “WordPress address” (either in the General Settings panel or by setting the WP_SITEURL constant in wp-config.php)
- Move wp-config.php, index.php, and .htaccess into the main directory, and edit index.php so it points to the new location:
/** Loads the WordPress Environment and Template */ require './wp/wp-blog-header.php'; - Put wp-content wherever you want and set WP_CONTENT_DIR (full local path) and WP_CONTENT_URL (full URI) constants in wp-config. When I did this, I also had to empty the “Store uploads in this folder” field in the Miscellaneous Settings panel — the default wp-content/uploads seems to be relative to the application path (ABSPATH), and that’s not what you want.
You end up with a structure like this (I put the application files in the wp folder):
/.htaccess /index.php /wp-config.php /wp-content/ /wp/ /wp/wp-blog-header.php /wp/wp-load.php /wp/…
(If you want, you can also move the plugins and uploads directories: set the WP_PLUGIN_DIR and WP_PLUGIN_URL constants in wp-config.php, and set the local upload path and upload URL in the Miscellaneous Settings panel.)
If you make updates with Subversion, it looks like the working copy has an extra index.php file and wp-content folder that never get used — ?