dashboard_primary_feed
Filters the primary feed URL for the 'WordPress News' dashboard widget.
Description
Parameters (1)
- 0. $var (string) =>
__( 'http://wordpress.org/news/feed/' )
- The widget's primary feed URL.
Usage
- To run the hook, copy the example below.
- $var = apply_filters( 'dashboard_primary_feed', $var );
- if ( !empty( $var ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the dashboard_primary_feed callback
- function filter_dashboard_primary_feed( $var ) {
- // make filter magic happen here...
- return $var;
- };
- // add the filter
- add_filter( 'dashboard_primary_feed', 'filter_dashboard_primary_feed', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'dashboard_primary_feed', 'filter_dashboard_primary_feed', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /wp-admin/includes/dashboard.php
- 'url' => apply_filters( 'dashboard_primary_feed', __( 'http://wordpress.org/news/feed/' ) ),