Changeset 1494814
- Timestamp:
- 09/12/2016 09:22:08 PM (10 years ago)
- Location:
- widget-output-filters/trunk
- Files:
-
- 4 edited
-
composer.json (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
src/class.Widget_Output_Filters.php (modified) (2 diffs)
-
widget-output-filters.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
widget-output-filters/trunk/composer.json
r1319383 r1494814 1 1 { 2 2 "name": "philipnewcomer/wp-widget-output-filters", 3 "description": " Enables developers to filter the output of any WordPress widget.",4 "homepage": "http ://philipnewcomer.net/wordpress-plugins/widget-output-filters/",3 "description": "A library which enables developers to filter the output of any WordPress widget.", 4 "homepage": "https://philipnewcomer.net/wordpress-plugins/widget-output-filters/", 5 5 "license": "GPL-2.0+", 6 6 "authors": [ … … 8 8 "name": "Philip Newcomer", 9 9 "email": "[email protected]", 10 "homepage": "http ://philipnewcomer.net",10 "homepage": "https://philipnewcomer.net", 11 11 "role": "Developer" 12 12 } -
widget-output-filters/trunk/readme.txt
r1319383 r1494814 4 4 Tags: widget, widgets, filter, filters, output, html 5 5 Requires at least: 3.0 6 Tested up to: 4. 47 Stable tag: 1. 16 Tested up to: 4.6 7 Stable tag: 1.2.0 8 8 License: GPLv2 or later 9 9 10 Enables developers to filter the output of any WordPress widget.10 A library which enables developers to filter the output of any WordPress widget. 11 11 12 12 == Description == … … 26 26 == Changelog == 27 27 28 = 1.1 = 28 = 1.2.0 = 29 * Fix infinite loop when the same widget instance is rendered twice on the same page as some page builder plugins allow 30 * Convert class to a singleton 31 * Update docs 32 = 1.1.0 = 29 33 * Refactor code 30 34 * Add Composer support -
widget-output-filters/trunk/src/class.Widget_Output_Filters.php
r1319383 r1494814 8 8 9 9 /** 10 * Contains the single instance of this class. 11 * 12 * @var Widget_Output_Filters 13 */ 14 private static $instance = null; 15 16 /** 17 * Returns the single instance of this class. 18 * 19 * @return Widget_Output_Filters The single instance of this class. 20 */ 21 public static function get_instance() { 22 23 if ( null === self::$instance ) { 24 self::$instance = new self; 25 } 26 27 return self::$instance; 28 } 29 30 /** 10 31 * Initializes the functionality by registering actions and filters. 11 32 */ 12 p ublicfunction __construct() {33 private function __construct() { 13 34 14 35 // Priority of 9 to run before the Widget Logic plugin. … … 51 72 $original_callback = $wp_registered_widgets[ $widget_id ]['original_callback']; 52 73 74 $wp_registered_widgets[ $widget_id ]['callback'] = $original_callback; 75 53 76 $widget_id_base = $original_callback[0]->id_base; 54 77 $sidebar_id = $original_callback_params[0]['id']; -
widget-output-filters/trunk/widget-output-filters.php
r1319383 r1494814 2 2 /** 3 3 * Plugin Name: Widget Output Filters 4 * Plugin URI: http ://philipnewcomer.net/wordpress-plugins/widget-output-filters/5 * Description: Enables developers to filter the output of any WordPress widget.4 * Plugin URI: https://philipnewcomer.net/wordpress-plugins/widget-output-filters/ 5 * Description: A library which enables developers to filter the output of any WordPress widget. 6 6 * Author: Philip Newcomer 7 * Author URI: http ://philipnewcomer.net8 * Version: 1. 17 * Author URI: https://philipnewcomer.net 8 * Version: 1.2.0 9 9 * License: GPLv2 or later 10 10 * … … 28 28 29 29 require_once( __DIR__ . '/src/class.Widget_Output_Filters.php' ); 30 new Widget_Output_Filters();30 Widget_Output_Filters::get_instance();
Note: See TracChangeset
for help on using the changeset viewer.