PHP

  • Useful predefined PHP functions

    print_r(get_defined_vars()); get_defined_vars — Returns an array of all defined variables print_r(get_defined_functions()); get_defined_functions — Returns an array of all defined functions You should be careful about the location in the code, because if you are inside a function it will work only for this function. print_r(get_defined_constants()); get_defined_constants – Returns list all defined constants with their…

  • Create WordPress Plugin

    To create a plugin, all you need to do is create a folder and then create a single file. First go to the wp-content/plugins folder, and create a new folder named myPlugin. Inside this new folder, create a file named myPlugin.php. Open the file in a text editor, and paste the following information in…