PHP Reference

Last Updated on January 24, 2019 by Neil Murray

DEVELOPMENT #

Code Examples #

Bulk Delete – allows you to delete posts, pages and users in bulk based on different conditions and filters.
Easy Digital Downloads EDD_SL_Plugin_Updater.php – Allows plugins to use their own update API
Better Code Editing WordPress plugin – merged into WP 4.9
Bootstrap for Contact Form 7 – style CF7 forms using the Bootstrap CSS framework

Testing #

Testing Examples #

TinyMCE Templates for WordPress
Github: TinyMCE Templates for WordPress
Travis: TinyMCE Templates for WordPress

General #

wp-enqueue-script() Debugging

For simple debugging you can add debug_backtrace into WordPress’ enqueue functions. Definitely only suggested as a temporary thing to determine where the enqueues are coming from

Class Types

  • public: Public declared items can be accessed everywhere. Public methods and properties are accessible only after instantiating class and is called via “->” sign.
  • protected: Protected limits access to inherited and parent classes (and to the class that defines the item).
  • private: Private limits visibility only to the class that defines the item.
  • static: A static variable exists only in a local function scope, but it does not lose its value when program execution leaves this scope.
  • final: Final keyword prevents child classes from overriding a method – the class cannot be extended.
  • public static: Methods and properties can be accessed without need of instantiating class and can be called via “::”.

LEARN #

SUPERCEDED

Heading

Item