Independent Editorial DeskWordPress Releases, Builds, and Operations
Back to Archive
Implementation Notes

WordPress plugin_action_links Example: Add a Settings Link Cleanly

Add a focused Settings shortcut on the Plugins screen with plugin_action_links without bloating WordPress plugin row actions.

Published

May 5, 2026

Reading Time

2 min read

Updated

May 5, 2026

Plugin management dashboard scene with a highlighted settings shortcut on a WordPress-style plugins screen.
Build PatternImplementation Notes

Implementation Notes

Extension points, code paths, and implementation choices that should survive contact with production.

Best For

WordPress developers, agencies, and technical teams building custom plugin or theme functionality with cleaner operational defaults.

Primary Topics

Implementation Notes

Editorial Focus

Build Pattern: Extension points, code paths, and implementation choices that should survive contact with production. Updated on May 5, 2026.

Full Report

Last reviewed: May 5, 2026

Small plugin UX details matter more than teams admit. If a plugin has a settings screen but forces users to navigate through several admin levels to reach it, that friction shows up every time someone audits or changes configuration. The plugin_action_links hooks are the clean place to add a focused Settings shortcut directly on the Plugins screen.

This guide shows how to add a settings link safely for one specific plugin and why the plugin-specific dynamic hook is usually the better choice.

Target the specific plugin file, not every plugin row

<?php
add_filter(
	'plugin_action_links_' . plugin_basename( __FILE__ ),
	'vulnwp_add_settings_action_link'
);

function vulnwp_add_settings_action_link( $actions ) {
	$settings_link = sprintf(
		'<a href=\"%s\">%s</a>',
		esc_url( admin_url( 'options-general.php?page=vulnwp-security-reports' ) ),
		esc_html__( 'Settings', 'vulnwp' )
	);

	array_unshift( $actions, $settings_link );

	return $actions;
}

The dynamic hook keeps the callback limited to the current plugin instead of forcing the code to inspect every plugin row on the page.

Link to a real screen that the user can reach

The shortcut should point to a stable settings page or admin screen that already exists. If the plugin does not yet have a coherent settings destination, the action link is just decorative noise.

Keep the label narrow and predictable

Most plugins do not need five custom action links. A single Settings link is usually enough. The goal is to reduce friction, not turn the Plugins screen into another dashboard.

Do not confuse navigation convenience with authorization

The action link is only a shortcut. The destination page still needs its normal capability check. If the target screen should be limited to administrators, the callback that renders that screen remains the real enforcement point.

Common mistakes

  • Using the generic hook when the callback only belongs to one plugin. The dynamic hook is cleaner.
  • Adding too many links. One focused shortcut usually serves users better.
  • Linking to an unstable slug or unfinished page. Action links should feel dependable.
  • Skipping capability checks on the destination screen. Navigation is not authorization.

Production checklist

  • Prefer plugin_action_links_{plugin_file} for plugin-specific behavior.
  • Use plugin_basename( __FILE__ ) to target the correct plugin file.
  • Point the link at a stable admin URL.
  • Keep the number of custom links minimal.
  • Leave authorization to the destination screen callback.

Related reading

Pair this with the add_menu_page guide if the plugin screen sits at the top level, or with the add_submenu_page article if the settings page belongs under an existing parent.

References and further reading

Popular Guides

Popular WordPress guides to read next.

These articles connect recurring production concerns: implementation details, updates, troubleshooting, recovery paths, and operational cleanup.

Continue Reading

More from the archive.

Diagnostic dashboard scene representing a WordPress Site Health review before major updates.
01Build Pattern
Implementation Notes

Build Pattern

Extension points, code paths, and implementation choices that should survive contact with production.

May 21, 2026 · 3 min read

WordPress Site Health Check Before Major Updates: What to Review First

A pre-update WordPress Site Health checklist covering loopbacks, connectivity, debug settings, and environment readiness.

Structured data and route review scene representing permalink validation after a WordPress migration.
02Build Pattern
Implementation Notes

Build Pattern

Extension points, code paths, and implementation choices that should survive contact with production.

May 21, 2026 · 3 min read

WordPress Permalink Checklist After Migration: Catch URL Problems Early

A post-migration WordPress permalink checklist for checking rewrite rules, post URLs, archives, and redirect noise.

Technical media workspace representing image preparation and optimization before upload to WordPress.
03Build Pattern
Implementation Notes

Build Pattern

Extension points, code paths, and implementation choices that should survive contact with production.

May 21, 2026 · 3 min read

WordPress Image Optimization Checklist: What to Fix Before Upload

A practical WordPress image optimization checklist covering dimensions, compression, formats, and Media settings before upload.