One of my favorite additions to WordPress over the last few years was the redesigned media manager. Launched in version 3.5, it was a big improvement, with features like drag-and-drop uploading and an improved gallery function. It is also pretty easy to integrate into WordPress plugins.
Read moreIn WordPress, hide page name for protected pages
WordPress has a handy feature where you can password protect pages on your site. When a user lands on that page they are shown only the page name (preceded by “Protected”) and a form to enter a password.
On a recent project, I also wanted to hide the page name since that was also sensitive, along with the content of the page.
The fix is pretty easy, and uses the post_password_required()
function.
Simply drop the following code into the functions.php
file of your theme:
add_filter('protected_title_format', 'protected_title_function'); function protected_title_function($title) { if ( post_password_required() ) { $return_val = __('Protected', 'themedomain'); } else { $return_val = '%s'; } return $return_val; }
Don’t forget to also change the permalink since it is generally based on the text of the title.
Useful Examples of CSS Pseudo-Classes :before and :after
Put simply, CSS pseudo-classes a way to append styles that relate to existing elements. (Here’s a much more complex description.) They’ve been around awhile and browser support is pretty good. Common examples include :hover and :first-child.
Read moreFacebook Comment Deep-Dive: Analyzing an HTC Thread
HTC recently posted to their Facebook wall a simple question: “How many mobile phones have you owned?” Within a day they received about 2000 answers. Using the Facebook’s Graph API I wondered how hard it would be to automate the analysis to find out the average number.
Read more