Filter hook 'dashboard_primary_link'

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

View Source

dashboard_primary_link

Filter Hook
Description
Filters the primary link 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 1534

Hook Parameters

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

Usage Examples

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

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

Source Code Context

wp-admin/includes/dashboard.php:1534 - How this hook is used in WordPress core
<?php
1529  			 *
1530  			 * @since 2.5.0
1531  			 *
1532  			 * @param string $link The widget's primary link URL.
1533  			 */
1534  			'link'         => apply_filters( 'dashboard_primary_link', __( 'https://wordpress.org/news/' ) ),
1535  
1536  			/**
1537  			 * Filters the primary feed URL for the 'WordPress Events and News' dashboard widget.
1538  			 *
1539  			 * @since 2.3.0

PHP Documentation

<?php
/**
			 * Filters the primary link URL for the 'WordPress Events and News' dashboard widget.
			 *
			 * @since 2.5.0
			 *
			 * @param string $link The widget's primary link 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.