-2
votes
1answer
65 views

Why haven't I see plugins using get_file_data to handle retrieving plugin version?

In terms of best practices, I'm curious as to why I haven't seen anyone using get_file_data or get_plugin_data to handle getting a plugin version (for versioning CSS/JS files). Many quality plugins do ...
7
votes
2answers
147 views

What is right way to go about adding functionality to a published WordPress plugin?

So I looked all over to try and find some kind of rules, or at least some common-courtesy guidelines, concerning this issue and couldn't find anything. Essentially I'm wondering what I should do when ...
3
votes
1answer
100 views

How can I import a class privately into a plugin?

I've written a Wordpress plugin that makes use of a simple controller/templating library I have authored, to separate out business logic from presentation. I have a (slightly theoretical) query about ...
1
vote
1answer
298 views

What's the best way to implement AJAX in WordPress?

WordPress has a framework in place for handling AJAX which is well documented here: http://codex.wordpress.org/AJAX_in_Plugins My concern with this is that every time you execute an AJAX query, (even ...
1
vote
1answer
371 views

Where should I use get_option in a plugin

I am working on creating a plugin to help me with future development projects. I want to make sure what I am using best practices when I write it. My question is about the use of get_option in my ...
1
vote
2answers
62 views

Translating long texts with html formatting

I was wondering what is the best way to translate some longer texts with html formatting. There was a couple of solutions I came across, but did not know what would be the best one. Writing a couple ...
1
vote
2answers
103 views

Failed to invoke other hook from the init hook

Related to this question (Use wp init hook to call other hooks?) but not the same. Sometimes, I found that the hook will failed to run when I place inside the init hook, e.g. Not Work: ...
7
votes
1answer
152 views

Shared functionality in plugins and themes

I recently started to develop plugins and themes and I found that I need to use several functions of on both. Sometime I think about to check if function / class exist before declared as said on this ...
1
vote
2answers
1k views

add_action(), add_filter() before or after function.

When looking through Wordpress snippets/tutorials/plugins I often see add_action() and add_filter() being placed before the function is declared: add_action('publish_post', 'email_friends'); ...
1
vote
1answer
65 views

How would I go about creating a user ranked post popularity page?

I currently run a music blog using Wordpress as my CMS and i'm looking to redesign the site in the very near future. Part of my plan for the redesign is to try and integrate a user ranking system for ...
3
votes
2answers
108 views

WordPress Plugin as 'Library' From Abstract Application?

Here is my thought, and I could be digging myself a huge hole. That's why I'm here ;) I am looking to develop a complex application but I want this application to run both as a standalone script as a ...
0
votes
2answers
432 views

Best practice for including plugin output in a template without using shortcode?

I need your recommendation for the best practice here: A custom post type I have created needs a list of attachments at the end of the post content. I have created a series of functions that handle ...
0
votes
1answer
288 views

unregister a sidebar widget

The codex says it is depreciated. As a long time plugin user, I know how annoying it is when plugins don't clean up after themselves, is it's deprecation indication that it is necessary?