Filter hook 'dashboard_secondary_items'

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

View Source

dashboard_secondary_items

Filter Hook
Description
Filters the number of secondary link items 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 1602

Hook Parameters

Type Name Description
string $items How many items to show in the secondary feed.

Usage Examples

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

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

Source Code Context

wp-admin/includes/dashboard.php:1602 - How this hook is used in WordPress core
<?php
1597  			 *
1598  			 * @since 4.4.0
1599  			 *
1600  			 * @param string $items How many items to show in the secondary feed.
1601  			 */
1602  			'items'        => apply_filters( 'dashboard_secondary_items', 3 ),
1603  			'show_summary' => 0,
1604  			'show_author'  => 0,
1605  			'show_date'    => 0,
1606  		),
1607  	);

PHP Documentation

<?php
/**
			 * Filters the number of secondary link items for the 'WordPress Events and News' dashboard widget.
			 *
			 * @since 4.4.0
			 *
			 * @param string $items How many items to show in the secondary feed.
			 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-admin/includes/dashboard.php
Related Hooks

Related hooks will be displayed here in future updates.