WordPress: Create Additional Links for Plugin with Plugin Row Meta

By default, WordPress only display the author and plugin URI links. Since the version 2.8, they applied filter plugin_row_meta within the plugin administration section. With this filter, you can create many links for your plugin or another plain text.

Let’s start to create the additional links by using the filter. First, create function that returns the links in an array and then add the filter with your function.

Put this function in your main .php plugin file:

function RPSS_plugin_meta( $links, $file ) { // add 'Plugin page' and 'Donate' links to plugin meta row
		if ( strpos( $file, 'radio-streaming.php' ) !== false ) {
			$links = array_merge( $links, array( '<a href="https://www.kloningspoon.com/radio-player-streaming-stats/" title="Plugin page">Radio Player Streaming &amp; Stats</a>' ) );
			$links = array_merge( $links, array( '<a href="http://about.me/dartokloning" title="About me">About.me</a>' ) );
		}
		return $links;
	}
	add_filter( 'plugin_row_meta', 'RPSS_plugin_meta', 10, 2 );

 

Artikel terkait:   WordPress: Create Plugin Action Links

1 komentar untuk “WordPress: Create Additional Links for Plugin with Plugin Row Meta”

  1. Ping-kembali: WordPress: Create Plugin Action Links – KLoningSpoon

Isi Komentar

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *

nine × one =

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top