‘WordPress Hack’ Category

Preventing WordPress Plugins From Loading

15
responses
by
Ronald Huereca
on
January 10th, 2010
in
WordPress Hack, WordPress Tips

There may be times in WordPress where you would like to load the WordPress environment manually, and prevent plugins from loading.
Two instances where this is ideal are:

When loading an inline frame with Thickbox or Colorbox.
When parsing AJAX requests in an external PHP file.

To further give justification for this technique, I had a major plugin conflict with another plugin. My Ajax Edit Comments plugin had failed to work for one of my clients.
After doing some troubleshooting, I determined it was a plugin conflict with “xyz” plugin. When I looked at the conflicting plugin’s code, I was able to pinpoint the problem to one patch of code, but failed to determine a fix.
The conflicting plugin was causing my nonces to fail, as well as my AJAX processor to fail (since that uses nonces as well).
Since my plugin’s editing options are all in a Colorbox inline frame (where I manually load [...]

[Continue Reading...]

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 5.00 out of 5)
Loading ... Loading ...

Publish The Feed Later

5
responses
by
Mark Ghosh
on
December 5th, 2009
in
WordPress Hack, WordPress Plugins

Publish The Feed Later: WP Engineer provides a nice tutorial on how to publish your post to your feed a few minutes (configurable) after you publish your post. These few minutes can help you find errors or bugs in your post and fix them before they get sent out via your feed to all your readers. The “hack” requires you to change your theme’s functions.php file and add the code snippet provided. Alternatively you could also use a plugin written by our very own Keith, called Feed Pauser. I see no compatibility information on this plugin (maybe Keith could chime in and let us know) but it does offer further functionality such as the ability to prevent individual posts from appearing in your feed. A useful hack/plugin for those like me who have an itchy post finger.

[Continue Reading...]

1 Star2 Stars3 Stars4 Stars5 Stars (5 votes, average: 4.80 out of 5)
Loading ... Loading ...

¿Habla HTML?

28
responses
by
James Dimick
on
September 1st, 2009
in
WordPress, WordPress Hack

DISCLAIMER: This post is in no way intended to promote HTML over XHTML or vice-versa. This is simply a solution to a problem for those who may find it useful.
Anyone who has used WordPress for any decent length of time probably knows that everything it outputs is in XHTML format. For those who prefer this, that’s just fine. However, for those of us out there that prefer to use HTML instead, we’re pretty much out of luck when it comes to WordPress. As it stands now, there is no easy way to make WordPress output in HTML format. But today I hope to help those people with this simple function I found around the web.
First, the code:
function HTMLify($buffer) {
$xhtml = array(‘/XHTML 1.0 Transitional|XHTML 1.0 Strict|XHTML 1.0 Frameset|XHTML 1.1|XHTML Basic 1.0|XHTML Basic 1.1/’, ‘/xhtml1\/DTD\/xhtml1-transitional.dtd|xhtml1\/DTD\/xhtml1-strict.dtd|xhtml11\/DTD\/xhtml11.dtd|xhtml-basic\/xhtml-basic10.dtd|xhtml-basic\/xhtml-basic11.dtd/’, ‘/\/>/’, ‘/\/\s+>/’, ‘/xmlns=”http:\/\/www.w3.org\/1999\/xhtml”/’, ‘/\s+xmlns=”http:\/\/www.w3.org\/1999\/xhtml”/’, ‘/\s+xml:lang=”(.*)”\s+lang=”(.*)”/’, ‘/\s+>/’);
$html = array(‘HTML 4.01′, [...]

[Continue Reading...]

1 Star2 Stars3 Stars4 Stars5 Stars (7 votes, average: 2.43 out of 5)
Loading ... Loading ...

Actions and Filters and Classes, Oh My!

16
responses

Ever wondered how you can manipulate WordPress filters and actions that are defined inside a PHP class?
I did! I was working on a project recently that needed a plugin. The only problem was that the plugin was inserting some unnecessary cruft into the header of my theme. So, I figured I’d just use the remove_filter function WordPress provides… right?
Hold on a second! It’s not working!? But I put in the function name just how the codex explains it:
remove_filter(‘wp_head’, ‘the_crufty_function’);
Why would it not work? Time to do some troubleshooting… So, I opened up the main plugin PHP file in my code editor and began to look around. What’s this? It’s a class! Hmm… But why should that make a difference?
It seems that WordPress requires a special reference to the function if it is defined inside a class. If you, the reader, are at all familiar with PHP classes then you probably [...]

[Continue Reading...]

1 Star2 Stars3 Stars4 Stars5 Stars (7 votes, average: 3.71 out of 5)
Loading ... Loading ...

10 Useful WordPress Hook Hacks

2
responses

If you are a WordPress developer or designer or have been messing around in the world of WordPress for any period of time, you have by no doubt heard of WordPress hooks. Hooks are a set of custom written functions that can be added to existing functions in the WordPress core to increase, improve or remove functionality. WordPress plugins make extensive use of hooks to latch onto various portions of the WordPress themes or to the admin interface in order to provide the additional functionality or to perform certain actions in certain parts of the code. If you are looking to understand hooks, learn about all the action and filter hooks and all the deprecated hooks, find the latest changes and understand how hooks can be used in customizing WordPress, I suggest you look at Adam’s WordPress hooks database.
Smashing Magazine has listed 10 Useful WordPress Hook Hacks in which they do [...]

[Continue Reading...]

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 3.67 out of 5)
Loading ... Loading ...

WordPress Configuration Tricks

14
responses

WordPress Configuration Tricks : If you have ever installed WordPress and wanted to know what else you could do with your wp-config.php file, this is the blog post to read. As Ozh points out in the comments, a couple of tricks were left out but nothing that could not be remedied with a simple Google search (e.g. WP_HTTP) as long as you know what you are looking for.
Tips from that page that got me thinking (things that make you go hmmmmm?) include moving your wp-content directory, increasing your memory limit, changing the autosave interval, turning on debugging and finally the ability to specify a log file for errors. All of this through the wondrous wp-config.php file. The list is quite exhaustive.
While you are there, make sure you subscribe to the blog. Chris and Jeff are putting out some good stuff!

[Continue Reading...]

1 Star2 Stars3 Stars4 Stars5 Stars (6 votes, average: 3.50 out of 5)
Loading ... Loading ...

Blogging and WordPress Links for 4/23/09

7
responses

How To Blog Anonymously And Maintain Control Of Your Personal Privacy.: Robin Good puts together a nice writeup on how and why to blog anonymously. If you do not have Robin on your reading list, he should be. I like his general writing style and his visual clues.
10 Exceptional WordPress hacks from Smashing Magazine.: Smashing Magazine has another list of nice hacks for WordPress including resizing images on the fly and automatically including the first image in your posts for your home page. These lists amaze me. Some of the more popular design sites and larger blog houses such as Smashing Magazine and Mashable have become very adept at using lists to link bait. These lists tend to get Dugg very heavily and bring in a lot of traffic for them. I still cannot look away from a good list about WordPress!
3 tools to track and defeat content theft lists [...]

[Continue Reading...]

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 3.67 out of 5)
Loading ... Loading ...

WordPress News for 3/31/09

4
responses

Learn how to create a sleek and stylish WordPress theme in Photoshop with this tutorial from PSDVibe. A little tweak with a little creativity could land you a personalized theme. Once you put together your new theme, don’t forget to offer it to others to download and enjoy!
Learn some new tricks and discover new tools and plugins to speed up your WordPress blog. I have run into some scalability issues with this blog recently and have learned quite a bit.
Jean-Baptiste tells us about 10 awesome .htaccess hacks for your WordPress blog including the ability to redirect visitors to a maintenance page while you can continue to see and work on your blog.

[Continue Reading...]

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 5.00 out of 5)
Loading ... Loading ...

WordPress for iPhone Version 1.2 Available

22
responses

The new version of WordPress for iPhone (and iPod touch) app is now live and available for download in the iTunes App store. This version has a lot of fixes/enhancements that many people (including me) have been waiting for. I’ve been playing around with version 1.2 for a little bit and here are some of my first impressions.
New Features (and Some Comments)

Landscape mode with extra wide keyboard

This is probably the most desired feature for this application simply because it is physically painful to type a full length blog post in the iPhone portrait keyboard. I am glad that the portrait keyboard restriction is now a thing of the past!
Link creation help

I wasn’t sure where this feature was hiding at first, but I soon found the trick to invoking this feature. Basically anytime you are writing, you can type something that resembles a link (for example “www.” [...]

[Continue Reading...]

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 5.00 out of 5)
Loading ... Loading ...


Obviously Powered by WordPress. © 2003-2010 MidOut LLC

page counter