{"id":422,"date":"2011-11-15T11:36:32","date_gmt":"2011-11-15T11:36:32","guid":{"rendered":"http:\/\/www.sitekickr.com\/blog\/?p=422"},"modified":"2011-11-15T11:42:53","modified_gmt":"2011-11-15T11:42:53","slug":"love-wordpress-plugin","status":"publish","type":"post","link":"https:\/\/www.sitekickr.com\/blog\/love-wordpress-plugin\/","title":{"rendered":"I love this WordPress plugin, all except this one little thing"},"content":{"rendered":"<p>How many times has this happened to you? You read the full plugin introduction on WordPress.org, look to the heavens and say &quot;Thank You!&quot;. Only to find there is one little nuance in the plugin which is a deal breaker.<\/p>\n<p>You&#39;re saying to yourself, &quot;Why couldn&#39;t they just provide a configuration option for that?&quot; In all truth, this has happened to me many times, and as a developer, can certainly understand the amount of work involved in making absolutely everything configurable.<\/p>\n<p>Often times, with a little PHP experience, you are able to override a plugin template file, but other times you are forced to make changes to the plugin itself. As all WordPress developers know, this is not a future-proof solution. While it may provide the temporary relief you need, an upgrade to your plugin will wipe out any changes you employed.<\/p>\n<p>In this case, if your change is minor and mostly presentational, you might consider a JavaScript \/ jQuery solution.<\/p>\n<p>Let&#39;s take for example, an issue I had with the WP Portfolio plugin. While I love the plugin, it did one little thing the irked me. When it could not produce a thumbnail for a given website, it used the ugliest placeholder known to man.<\/p>\n<p>Normally, I would simply replace the JPEG used for the thumbnail. But, I wanted to use a PNG for the transparency. There was no apparent way to do this in the configuration options, so I resorted to a jQuery solution:<\/p>\n<p><code>$(&#39;.website-thumbnail img&#39;).each(function() {<br \/>\n\t&nbsp;&nbsp;&nbsp; if($(this).attr(&#39;src&#39;).indexOf(&#39;thumbnail_blank_lg.jpg&#39;) &gt;= 0)<br \/>\n\t&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $(this).attr(&#39;src&#39;, $(this).attr(&#39;src&#39;).replace(&#39;.jpg&#39;, &#39;.png&#39;)).css(&#39;border&#39;, 0);<br \/>\n\t});<\/code><\/p>\n<p>\n\tThe simple code above allows me to break free of any hard coded, impossible to track down piece of code, which almost made a great product useless to me. Thank you JavaScript and jQuery!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How many times has this happened to you? You read the full plugin introduction on WordPress.org, look to the heavens and say &quot;Thank You!&quot;. Only&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"amp_status":""},"categories":[5,103],"tags":[139],"_links":{"self":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/422"}],"collection":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/comments?post=422"}],"version-history":[{"count":4,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/422\/revisions"}],"predecessor-version":[{"id":426,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/422\/revisions\/426"}],"wp:attachment":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/media?parent=422"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/categories?post=422"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/tags?post=422"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}