Jesse Gardner
Forum Replies Created
-
Forum: Plugins
In reply to: [Auto Hide Admin Bar] This doesn't seem to workI’m experiencing the same thing. Plugin installed, still getting the admin bar. Running v.4.0.
Forum: Plugins
In reply to: [WP Favorite Posts] Public Favourite Posts?I had the same question. This function seems to do what you need:
<?php wpfp_list_most_favorited() ?>
You can pass in a number to set the “limit”. It defaults to 5.
Forum: Plugins
In reply to: [WP Favorite Posts] Feature request – dynamic image classIf you add the $class variable to the class in line 162, you can then style accordingly:
$link = "<a class='wpfp-link ".$action."' href='?wpfpaction=".$action."&postid=". $post_id . "' title='". $opt ."' rel='nofollow'>". $opt ."</a>";
Forum: Plugins
In reply to: [W3 Total Cache] Query String ID for Javascript/Stylesheet CachingFor what it’s worth, here’s how I solved this.
First, I disabled the W3TC option to add query strings to the tail of JS/CSS files.
Then, I dropped the following code into my functions.php, specifically where I’m registering my main stylesheet and javascript files: https://gist.github.com/4282236
Nutshell: when registering m primary stylesheet and javascript, instead of passing a version number, I’m passing a CRC32-hashed string of the file. That way, when the size of the file changes (i.e. you make an update), so does this hash string.
Thus, browsers and proxies are forced to download the updated file, no matter the caching policy.
Forum: Plugins
In reply to: [W3 Total Cache] Query String ID for Javascript/Stylesheet CachingAfter thinking about it for a bit, perhaps a combination of the two might work best.
I’m thinking that if you appended the linked files with an MD5 hash of the W3TC options and and MD5 hash of the linked file size, you’d force browsers to download the new file when the options change or when the file changes. Seems like a win-win to me.
The solution is pretty simple. Change the following:
$headers .= 'From: '.stripslashes( $_REQUEST['cntctfrm_contact_email'] )."\r\n";
to:
$headers .= 'From: '.stripslashes( $_REQUEST['cntctfrm_contact_name'] ).' <'.stripslashes( $_REQUEST['cntctfrm_contact_email'] ). ">\r\n";
In lines 808, 826, and 862 of contact_form.php.
In a nutshell, this passes the name AND the email address in the mail header.
I added this functionality to line 79 of post-widget.php:
// Injecting our content block id into the $before_widget class if( strpos($before_widget, 'class') === false ) { // It has no class, add it! $before_widget = str_replace('>', 'class="widget-content-block-'. $custom_post_id . '"', $before_widget); } else { // Append existing class $before_widget = str_replace('class="', 'class="widget-content-block-'. $custom_post_id . ' ', $before_widget); }
It will add the ID of the content block you’ve chosen as class of the widget, e.g. class=”widget-content-block-1412″.
Hope someone else finds this useful.
Forum: Plugins
In reply to: [W3 Total Cache] Batch Purge for Selective PagesThat’s a good question, Steffi3rd. I have a hunch archive pages can’t be “cherry picked” for cache purging and that need to get a full page cache purge.
Forum: Plugins
In reply to: [W3 Total Cache] Batch Purge for Selective PagesSorry, I should have read the FAQ’s a bit more carefully.
if (function_exists('w3tc_pgcache_flush_post')) { w3tc_pgcache_flush_post($post_id); }