Articles of plugin development

Dynamic CSS Vs Inline Issues in Code any Way around in a WordPress Themes?

One of my Developer has used this kind of Code to style – <div class=”progress-bar progress-bar-striped custom-color-progress” role=”progressbar” aria-valuenow=”<?php echo $percentage?>” aria-valuemin=”0″ aria-valuemax=”100″ style=”width:<?php echo $percentage * 100?>%”></div> Bu few experts believes that this – style=”width:<?php echo $percentage * 100?>%” looks ultimately hard coded(or Inline CSS in Browser) and is not what one may look […]

How to run a external JavaScript file on wp-admin if admin, and other if normal user?

I’m new to WordPress plugins, and I’m trying to load a external JS/jQuery file with some scripts I need. It needs to run in the wp-admin page (not just once when activated). There is a JS file for a common user and another one for the admin. function wp_ui_activation() { } register_activation_hook(__FILE__, ‘wp_ui_activation’); function wp_ui_deactivation() […]

Admin auto-refresh is interfering with Firebug — how to prevent it?

I’m developing a plugin that adds a metabox to the post editing page. When I try to debug it with Firebug, about every 15 seconds the Firebug display refreshes as though the page has reloaded. This collapses the code tree and loses my place, so I have to start from scratch… and get where I […]

How to Add Custom Taxonomy To Woocommerce Plugin

I am trying to add a Custom Taxonomy to Woocommerce by targeting the product post type in Woocommerce. I used following code and added it into functions.php I am not getting any error message but the taxonomy is not showing in the Woocommerce as well. Can you please let me know how I can do […]

Extending WP_List_Table seems getting wrong with $this->get_columns() – what's wrong?

I’m trying to implement an Admin Table for a view page of a plugin of mine by following the following tutorial: Create Native Admin Tables In WordPress The Right Way    by Jeremy Desvaux de Marigny    SmashingMagazine.com Here’s how I extended the WP_List_Table class for my plugin. (Code at Pastebin) The problem is: it’s not showing […]

Custom plugins/Manipulated plugins: Always a terrible idea to inherit these types of WP sites that discourage updates?

So I have been working on WP sites for a little bit now and I think I’m getting to the point where I’m starting to get to a wider range of clients with unique site builds. One site I was assigned to lately was a WP site that dealt with Automobile inventory and its biggest […]

WP AJAX is not working, always returns 0

I’ve checked any threads here regarding this and did a debug test which worked, I’d like to understand why my own code doesn’t work as it presents the same functionality explained in every possible thread created about this issue. I’m trying to send AJAX request when clicking on a checkbox and do some work with […]

Do uploaded plugins get updates if they came from the wordpress plugin directory?

I’m a plugin developer and want to ensure my users are getting updates when I release an update within the wordpress plugin svn repo. I know if they search for the plugin through the plugin area of their admin and install it that way that they see updates. However I’m not sure if people download […]

preprocess_comment array doesn't have comment_ID

I have a function using the filter preprocess_comment and want to use the update_comment_meta( $comment[‘comment_ID’], ‘post_id’, $post_id );. However, the array in preprocess_comment doesn’t have comment_ID. In looking at filters, I cannot find a different one to use for this function. The function writes the comment to an external forum. This part of the function […]

Can i create two tables at single time while installation of custom plugin?

Hi i want to know can i create two tables while installing my custom plugin. This is the way i am creating the tables in database function wnm_install(){ global $wpdb; global $wnm_db_version; $sms_table = $wpdb->prefix . “smsfactory”; if($wpdb->get_var(“show tables like ‘”. $sms_table . “‘”) != $sms_table){ $sql_sms_table = “CREATE TABLE “. $sms_table . ” ( […]