I’ve got lots of plugin ideas but don’t have much time on developing recently, due to I’m fascinated by AngularJS since last November and prepare to grow my freelancing business. Despite that I still try to take some time to update my plugins based on suggestions from users.
Today I just pushed the latest version of Media Search Enhanced to WP.org, the major updates are inspired by a comment left here last week. Basically Don requested if I can make the plugin work on the frontend, so website visitors can search for media by all fields (title, caption, alt text, filename and terms).
I found it interesting because I’ve considered to implement functions like that but not sure if it’s of use enough. According to Don’s comment, it will be a very good idea.
So I made a major change that moved all main functions from admin class to public class in my plugin, and create a shortcode
mse-search-form to insert a media search form into posts or templates. The media search form is a default WordPress search form but customized:
- Add a hidden field to force it only to search for
- Add a class name
mse-search-formto help if user would like to modify the form with CSS.
- Two custom filters in the form:
mse_search_form_classto change the form class name,
mse_search_form_placeholderto change the input placeholder.
For now the frontend media search form might not be that helpful that it just display all media as posts in search results page. You have to custom the page to make sense of it, so maybe I should improve it in the next release by adding a media search results page or creating a media search results shortcode.
Other comments on the WP.org support forum proposed to display the media search results but group them by post id, and search for meta values. These opinions are useful to some extend so I’ll keep in mind. Your feedback is always welcome. Let’s improve the media search workflow together!
Users can select multiple Categories for a post by default, that’s why WordPress use checkboxes in the Categories metabox. If you need to force the user select only one category, I have this little plugin for you.
Categories Metabox Enhanced is a new plugin released by us today. After installing it, you could replace the checkboxes with radio buttons or a select drop-down in the plugin’s Settings page. That’s how you can force the user select only one category.
The plugin is based on a useful library Taxonomy_Single_Term created by WebDevStudios, I found it when I did the research work on creating Categories Metabox Enhanced. For it’s not actually a WordPress plugin and only hosted on GitHub, I decided to integrated it to the plugin and implemented the options on the Settings. Read More…
Quick Add Child joined the 1Fix.io plugin family today. If you need to add lots of child posts for your WordPress site, the little one is for you.
I found it very annoying when I need to select the Parent Page from 30+ pages. It might be rare, but when this is the case, you’ll be thankful if you don’t have to select the Parent manually.
Quick Add Child creates 2 links on a hierarchical post (like Page) editing screen, just right after the “Add New” link. The 2 links are “Add New Sibling” and “Add New Child“. As the names indicate, the links will open in new browser tabs, the cool part is if you take a look at the “Parent” field in “Page Attributes” metabox, it has been selected automatically.
Add links to H2 tag on the post editing screen
page_row_actions filter built in WordPress Core, there is no such a hook for this. I add new links with the jQuery function below:
page_attributes_dropdown_pages_args does the trick
The other key function for this plugin is to pre-select the Parent in Page Attributes metabox. Luckily we’ve got a filter to use this time.
page_attributes_dropdown_pages_args is a filter to let you modify the arguments which will be passed to
wp_dropdown_pages later. The defaults for the arguments are:
So we could pre-select the Parent by setting
$dropdown_args['selected'] to a specific value, in this case, a $_GET variable ($_GET[‘parent_id’]) passed from the “Add New Sibling / Child” link.
Bonus tips: create a banner for the WordPress plugin repository
It’s the first time I create a banner for the plugins of 1Fix.io. For the simplicity of Quick Add Child, I hope people could get the idea of what it’s all about at first glance.
I’d like to address the 2 links “Add New Sibling” and “Add New Child” added by the plugin, here’s what I did:
- Make a screenshot of the page editing screen.
- Resize the image by 110%.
- Rotate the image just 3 degree counterclockwise.
- Crop the image to fit the right size for the banner (772*250 px).
Any feedback or comments are welcome. Stay tuned to get more plugin updates from 1Fix.io!
Back to WordPress 2.9, people are thrilling about a new feature called “Post Thumbnails”, I was one of them. Before it was a core feature, it was already a requirement for any premium theme in the market. Without doubt, add “thumbnail” to theme support was definitely a big moment in WordPress history. Later with WordPress 3.0, the name was changed from “Post Thumbnails” to “Featured Image”.
I love this feature from day one. I quickly add it to themes in clients’ projects, and they are as happy as I expected. After the name changed to “Featured Image”, things became a little different. Clients were still happy about the UI, I just got asked about the same question more often. Read More…
Seriously, I always get headaches when think about which page hooks to use on certain WordPress admin pages. I found this code snippet form WP Tutsplus is very useful and each developer should keep it in functions.php.