Filter hook 'dashboard_primary_feed'

in WP Core File wp-admin/includes/dashboard.php at line 1543

View Source

dashboard_primary_feed

Filter Hook
Description
Filters the primary feed URL for the 'WordPress Events and News' dashboard widget.

Hook Information

File Location wp-admin/includes/dashboard.php View on GitHub
Hook Type Filter
Line Number 1543

Hook Parameters

Type Name Description
string $url The widget's primary feed URL.

Usage Examples

Basic Usage
<?php
// Hook into dashboard_primary_feed
add_filter('dashboard_primary_feed', 'my_custom_filter', 10, 1);

function my_custom_filter($url) {
    // Your custom filtering logic here
    return $url;
}

Source Code Context

wp-admin/includes/dashboard.php:1543 - How this hook is used in WordPress core
<?php
1538  			 *
1539  			 * @since 2.3.0
1540  			 *
1541  			 * @param string $url The widget's primary feed URL.
1542  			 */
1543  			'url'          => apply_filters( 'dashboard_primary_feed', __( 'https://wordpress.org/news/feed/' ) ),
1544  
1545  			/**
1546  			 * Filters the primary link title for the 'WordPress Events and News' dashboard widget.
1547  			 *
1548  			 * @since 2.3.0

PHP Documentation

<?php
/**
			 * Filters the primary feed URL for the 'WordPress Events and News' dashboard widget.
			 *
			 * @since 2.3.0
			 *
			 * @param string $url The widget's primary feed URL.
			 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-admin/includes/dashboard.php
Related Hooks

Related hooks will be displayed here in future updates.