Creating plugin custom links on WordPress plugins page

WordPress exhibits pretty restricted info about plugin like the creator, plugin uri, variation and many others. on plugins website page. But there might be occasions wherever you would like to clearly show some a lot more back links here. Those back links might be a donation url, might be a url to the Pro variation (if you have a person), might be guidance forum, might be some other as perfectly. So if this is what the requirement is, then how can we reach this a person?

Properly, there is a hook out there which we can use to move or build a lot more solutions here. The hook is plugin_row_meta. Permit’ see a person illustration on utilizing this assuming my plugin is WTI Like Publish (wti-like-article).

/**
 * Added back links on plugins website page
 * 
 * @param array
 * @param string
 *
 * @return array
 */
functionality wti_custom made_plugin_row_meta( $back links, $file ) 

if ( strpos( $file, 'wti-like-article.php' ) !== phony ) 
$new_back links = array(
'' . __( 'Donate', 'wti-like-post' ) . '',
'' . __( 'PRO Version', 'wti-like-post' ) . '',
'' . __( 'PRO Assist Forum', 'wti-like-post' ) . '',
)

$back links = array_merge( $back links, $new_back links )


return $back links


incorporate_filter( 'plugin_row_meta', 'wti_custom made_plugin_row_meta', 10, 2 )

You will need to replace the URLs accordingly. I am checking if the existing plugin is my plugin or not. If indeed, I am building an array acquiring new back links. Then I merge the authentic back links wit the new kinds and return the finish established of back links.

That’ it. Now you need to see 3 a lot more back links just underneath your plugin facts on plugins listing website page. Delighted Coding

Leave a Reply

Your email address will not be published. Required fields are marked *