Plugin Directory

Changeset 1494814


Ignore:
Timestamp:
09/12/2016 09:22:08 PM (10 years ago)
Author:
philip.newcomer
Message:

Update to version 1.2.0 from GitHub

Location:
widget-output-filters/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • widget-output-filters/trunk/composer.json

    r1319383 r1494814  
    11{
    22    "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/",
    55    "license": "GPL-2.0+",
    66    "authors": [
     
    88            "name": "Philip Newcomer",
    99            "email": "[email protected]",
    10             "homepage": "http://philipnewcomer.net",
     10            "homepage": "https://philipnewcomer.net",
    1111            "role": "Developer"
    1212        }
  • widget-output-filters/trunk/readme.txt

    r1319383 r1494814  
    44Tags:              widget, widgets, filter, filters, output, html
    55Requires at least: 3.0
    6 Tested up to:      4.4
    7 Stable tag:        1.1
     6Tested up to:      4.6
     7Stable tag:        1.2.0
    88License:           GPLv2 or later
    99
    10 Enables developers to filter the output of any WordPress widget.
     10A library which enables developers to filter the output of any WordPress widget.
    1111
    1212== Description ==
     
    2626== Changelog ==
    2727
    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 =
    2933* Refactor code
    3034* Add Composer support
  • widget-output-filters/trunk/src/class.Widget_Output_Filters.php

    r1319383 r1494814  
    88
    99    /**
     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    /**
    1031     * Initializes the functionality by registering actions and filters.
    1132     */
    12     public function __construct() {
     33    private function __construct() {
    1334
    1435        // Priority of 9 to run before the Widget Logic plugin.
     
    5172        $original_callback = $wp_registered_widgets[ $widget_id ]['original_callback'];
    5273
     74        $wp_registered_widgets[ $widget_id ]['callback'] = $original_callback;
     75
    5376        $widget_id_base = $original_callback[0]->id_base;
    5477        $sidebar_id     = $original_callback_params[0]['id'];
  • widget-output-filters/trunk/widget-output-filters.php

    r1319383 r1494814  
    22/**
    33 * 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.
    66 * Author:      Philip Newcomer
    7  * Author URI:  http://philipnewcomer.net
    8  * Version:     1.1
     7 * Author URI:  https://philipnewcomer.net
     8 * Version:     1.2.0
    99 * License:     GPLv2 or later
    1010 *
     
    2828
    2929require_once( __DIR__ . '/src/class.Widget_Output_Filters.php' );
    30 new Widget_Output_Filters();
     30Widget_Output_Filters::get_instance();
Note: See TracChangeset for help on using the changeset viewer.