Remote DBA Experts List The Must Know Skills For WordPress Developer

WordPress as we know it is one of the most efficient powerful and popular CMS frameworks being used in the industry at this very moment. It is used in the creation websites that are extremely flexible, complex and expandable in nature. Some belief that the availability of varied plug ins and themes for WordPress makes it such an effective tool for developers. We asked the best remote DBA experts to list out a few must know skills for all the WordPress developers out there. Here is what they think is essential for all of you.

According to best remote DBA experts, it’s always beneficial to create your plugins. It not only gives you a better platform but also it will enable you to take your website to exactly where you intended it to be. Better flexibility means better accuracy and in turn better efficiency.

Creating your own plugin

To begin creating your own plugins you need first to create a folder dedicated to plugins in /wp-content/plugins destination. Naming your plugins should have a consistent nomenclature. Plugins name should be easy to understand and differentiate.

<?php
/* Plugin Name:  Sample Name
Plugin URI: http://www.sitepoint.com/tutorials/wordpress-plugin-url
Description: Get email notifications when your favorite author publishes a post.
Version: 1.0
License: GPL2
*/

Your plugin should be visible in the dashboard

Activating/deactivating your plugin

Register_activation_hook function will be triggered upon activation of your plugin. A custom function can also be used for activation.

function wp_sample_activation() { } register_activation_hook(__FILE__, ‘wp_sample_activation’);

The file of the path that contains the activation function should be the first parameter and the function name can be taken as the other parameter

Similar course is followed for deactivating the plugin.

function wp_sample_deactivation() {  }  register_deactivation_hook(__FILE__, 'wp_sample_deactivation');

Custom table creation

The WordPress database table is extremely flexible and in most of the situations you should be able to make use of the tables provided in the WordPress functionality.

But for additional functions you may need to know how to create the custom tables.

global $wpdb; $wpdb->query("DROP TABLE IF EXISTS {$wpdb->prefix}sample_table"); 
$sql1 = "CREATE TABLE {$wpdb->prefix}sample_table ( id int(11) NOT NULL AUTO_INCREMENT,                                                        
activation_code varchar(255) NOT NULL,                                                        
email varchar(75) NOT NULL,                                                        
status int(11) NOT NULL, PRIMARY KEY  (id) )          ENGINE=InnoDB AUTO_INCREMENT=1;";  
require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); dbDelta($sql1);

It’s important to ensure if the table that you require is not already available. If your table is not included by default, you need to include the file first.

Including scripts and styles

One way of going about this is to just echo the scripts and styles from and to anywhere. But if you are creating your own styles then it is recommended to check once if the file is already present anywhere else. And also the dependencies of the same.

add_action('wp_enqueue_scripts', 'sample_scripts');
function sample_scripts() 
{
wp_enqueue_script('jquery');
wp_register_style('sample_style', plugins_url('styles.css', __FILE__)); 
wp_enqueue_style('sample_style');
wp_register_script('jqueryUICore', plugins_url('ui/jquery.ui.core.js', __FILE__),array(“jQuery”));
wp_enqueue_script('jqueryUICore');
$config_array = array(“sample_name”=>”sample_value”]);
wp_localize_script('jqueryUICore', 'sampleData', $config_array);
}

Adding option boxes

WordPress provides a few default set of boxes, fields, title etc in the content creation screen. But you may require custom fields to add additional behavior. And custom fields section only provides boxes. It’s very easy to use option boxes to provide additional fields.

add_action('add_meta_boxes', 'add_custom_fields_box'); function add_custom_fields_box() {

add_meta_box(‘custom_fields_box_id’, ‘Custom Info’, ‘display_custom_info_box’, ‘post’, ‘normal’, ‘high’); }  function display_custom_info_box() { global $post; $html = “<table><tr><td>Custom Checkbox</td><td><input id=’custom_checkbox’ type=’checkbox’ name=’custom_checkbox’  /></td></tr> <tr><td>Custom Selecy</td><td><select name=’custom_select’  > <option>Option 1</option> </select></td></tr> <tr><td>Custom Upload</td><td><input id=’custom_file’ type=’file’ name=’custom_file’  /></td></tr></table>”;  echo $html;  }

Author bio

Jack is a software developer from Singapore. He loves developing applications and is an emerging technology enthusiast. Many of our readers often write to him and have always considered him one of the best remote DBA experts – remotedba

It is a guest post by Jack.

Tags:

Thetechhacker new intern, workaholic with a great interest in technology.
5 Comments
  1. Reply
    Mathew Feb 5, 2015 at 12:04 pm

    Yes Sarath agreed with your post topic it has now become essential for remote dba experts to know the skills of word press. Because now a days word press is more commonly used to build any website. Thank you for describing useful skills of word press in the post. Keep sharing such useful article.

  2. Reply
    Suzanne Thomas Feb 5, 2015 at 2:09 pm

    Good piece of article Sarath. I have read the article carefully and surely discuss with my friends and team members who are remote dba experts. As you have given much detail information on word press plug-in
    and what is use of it. I like the way you have described the article by comparing 2 most common topics in today’s world. Many thanks and Thumps up for the article.

  3. Reply
    David Wicks Feb 8, 2015 at 7:16 am

    Word press database guide excellent article. This is from remote dba experts so feeling very nice to read the post. Thanks for sharing the post and sharing such innovative post. Good piece of article to read. Word press is one of the tools used for CMS. In this you have described optimizing the Word Press database.

  4. Reply
    Alexander Apr 21, 2015 at 10:03 am

    Thanks a lot Sarath for the article. It has many points which I feel to read many times as it explains clearly. I was looking to get help from remote dba support as I need to know more abou database. This article I would like to share with my friends because some of them are lloking to build career as wordpress developer which I feel is a good choice

  5. Reply
    Walter Moore Jul 4, 2016 at 10:11 am

    Well, it’s good to see that the remote DBA experts have shared about the most common tool like WordPress which is used these days by the most of the web developers. The article will surely help beginners like me those who use WordPress. It’s good that everything has explained in steps . The basic knowledge about the use of the plugins, creating plugins, activating/deactivating plugins, etc. has described clearly. Looking forward to read more such type of article with the new plugins update and use of the more tools in WordPress.

    Leave a Reply

    Thetechhacker
    Register New Account
    Reset Password