Skip to content

Instantly share code, notes, and snippets.

@JulioPotier
Last active December 24, 2015 23:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JulioPotier/6881587 to your computer and use it in GitHub Desktop.
Save JulioPotier/6881587 to your computer and use it in GitHub Desktop.
add_filter( 'plugin_row_meta', 'pastacode_plugin_row_meta', 10, 2 );
function pastacode_plugin_row_meta( $plugin_meta, $plugin_file )
{
if( plugin_basename( __FILE__ ) == $plugin_file ){
$last = end( $plugin_meta );
$plugin_meta = array_slice( $plugin_meta, 0, -2 );
$a = array();
$authors = array(
array( 'name'=>'Willy Bahaud', 'url'=>'http://www.wabeo.fr' ),
array( 'name'=>'Julio Potier', 'url'=>'http://www.boiteaweb.fr' ),
);
foreach( $authors as $author )
$a[] = '<a href="' . $author['url'] . '" title="' . esc_attr__( 'Visit author homepage' ) . '">' . $author['name'] . '</a>';
$a = sprintf( __( 'By %s' ), wp_sprintf( '%l', $a ) );
$plugin_meta[] = $a;
$plugin_meta[] = $last;
}
return $plugin_meta;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment