Plugin Directory

Changeset 2161744


Ignore:
Timestamp:
09/23/2019 11:21:10 PM (6 years ago)
Author:
deb255
Message:

Removing News Widget to comply with wordpress.org guidelines.

Location:
insert-headers-and-footers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • insert-headers-and-footers/tags/1.4.4/ihaf.php

    r2087406 r2161744  
    5454        add_action( 'admin_init', array( &$this, 'registerSettings' ) );
    5555        add_action( 'admin_menu', array( &$this, 'adminPanelsAndMetaBoxes' ) );
    56         add_action( 'wp_feed_options', array( &$this, 'dashBoardRss' ), 10, 2 );
    5756        add_action( 'admin_notices', array( &$this, 'dashboardNotices' ) );
    5857        add_action( 'wp_ajax_' . $this->plugin->name . '_dismiss_dashboard_notices', array( &$this, 'dismissDashboardNotices' ) );
     
    6160        add_action( 'wp_head', array( &$this, 'frontendHeader' ) );
    6261        add_action( 'wp_footer', array( &$this, 'frontendFooter' ) );
    63 
    64         // Filters
    65         add_filter( 'dashboard_secondary_items', array( &$this, 'dashboardSecondaryItems' ) );
    66     }
    67 
    68     /**
    69      * Number of Secondary feed items to show
    70      */
    71     function dashboardSecondaryItems() {
    72         return 6;
    73     }
    74 
    75     /**
    76      * Update the planet feed to add the WPB feed
    77      */
    78     function dashboardRss( $feed, $url ) {
    79         // Return early if not on the right page.
    80         global $pagenow;
    81         if ( 'admin-ajax.php' !== $pagenow ) {
    82             return;
    83         }
    84 
    85         // Return early if not on the right feed.
    86         if ( strpos( $url, 'planet.wordpress.org' ) === false ) {
    87             return;
    88         }
    89 
    90         // Only move forward if this action hasn't been done already.
    91         if ( ! $GLOBALS['wpb_feed_append'] ) {
    92             $GLOBALS['wpb_feed_append'] = true;
    93             $urls = array( 'http://www.wpbeginner.com/feed/', $url );
    94             $feed->set_feed_url( $urls );
    95         }
    96     }
     62    }
    9763
    9864    /**
  • insert-headers-and-footers/trunk/ihaf.php

    r2087406 r2161744  
    5454        add_action( 'admin_init', array( &$this, 'registerSettings' ) );
    5555        add_action( 'admin_menu', array( &$this, 'adminPanelsAndMetaBoxes' ) );
    56         add_action( 'wp_feed_options', array( &$this, 'dashBoardRss' ), 10, 2 );
    5756        add_action( 'admin_notices', array( &$this, 'dashboardNotices' ) );
    5857        add_action( 'wp_ajax_' . $this->plugin->name . '_dismiss_dashboard_notices', array( &$this, 'dismissDashboardNotices' ) );
     
    6160        add_action( 'wp_head', array( &$this, 'frontendHeader' ) );
    6261        add_action( 'wp_footer', array( &$this, 'frontendFooter' ) );
    63 
    64         // Filters
    65         add_filter( 'dashboard_secondary_items', array( &$this, 'dashboardSecondaryItems' ) );
    66     }
    67 
    68     /**
    69      * Number of Secondary feed items to show
    70      */
    71     function dashboardSecondaryItems() {
    72         return 6;
    73     }
    74 
    75     /**
    76      * Update the planet feed to add the WPB feed
    77      */
    78     function dashboardRss( $feed, $url ) {
    79         // Return early if not on the right page.
    80         global $pagenow;
    81         if ( 'admin-ajax.php' !== $pagenow ) {
    82             return;
    83         }
    84 
    85         // Return early if not on the right feed.
    86         if ( strpos( $url, 'planet.wordpress.org' ) === false ) {
    87             return;
    88         }
    89 
    90         // Only move forward if this action hasn't been done already.
    91         if ( ! $GLOBALS['wpb_feed_append'] ) {
    92             $GLOBALS['wpb_feed_append'] = true;
    93             $urls = array( 'http://www.wpbeginner.com/feed/', $url );
    94             $feed->set_feed_url( $urls );
    95         }
    96     }
     62    }
    9763
    9864    /**
Note: See TracChangeset for help on using the changeset viewer.