Author: ShairyPortfolio

  • Dom in JavaScript

    Dom in JavaScript

    DOM is Document Object Model that is used to represent the data of a document on the web and mainly it is an object-oriented representation of the web page that can be modified easily with a scripting language like JavaScript. DOM is an application programming interface (API) for manipulating (add, remove, and modify) HTML and…

  • Create Short code in WordPress using Action Hook

    Create Short code in WordPress using Action Hook

    <?php /** DOC LOG */ defined(‘ABSPATH’)||die(“You can’t access this file directly”); add_action(‘init’,’shairy_init’); function shairy_init() {             add_shortcode(‘test’,’shairy_my_shortcode’); } /*function shairy_my_shortcode($par) {             return “Hello Guys this is my First Plugin”; }*/ Now Here test is the shortcode name and you can use this shortcode anywhere in the program. It will display the output Hello Guys…

  • Action and Filter Hook in WordPress

    Action and Filter Hook in WordPress

    Step 4 In the precious session we already learned about the Action Hook and Filter Hook of the word press. In this session we will cover the function used in these hooks with their working. There are 4 functions in Action and Filter Hook as follow: Action Hook do_action () This function is used to…

  • Activate / Deactivate Hooks in WordPress

    Activate / Deactivate Hooks in WordPress

    Step 3 There are 3 Core Hooks in WordPress Plugin Register_activation_hook (); Register_deactivation_hook (); Register_uninstall_hook (); But we can’t use Register_uninstall_hook () instead of this we create a new file with name uninstall. php within same folder And write the below code to delete the plugin <?php Defined(‘ABSPATH’) || die Plugin deleted successfully “); ?>…