$pluginPath ) {
// If we are the first one to load already, don't do anything
if ( strpos( $pluginPath, $tfFileName ) !== false && $key == 0 ) {
break;
// If we aren't the first one, force it!
} else if ( strpos( $pluginPath, $tfFileName ) !== false ) {
array_splice( $plugins, $key, 1 );
array_unshift( $plugins, $pluginPath );
update_option( 'active_plugins', $plugins );
break;
}
}
}
}
/**
* Adds links to the docs and GitHub
*
* @access public
* @param array $plugin_meta The current array of links
* @param string $plugin_file The plugin file
* @return array The current array of links together with our additions
* @since 1.1.1
**/
public function pluginLinks( $plugin_meta, $plugin_file ) {
if ( $plugin_file == plugin_basename( __FILE__ ) ) {
$plugin_meta[] = sprintf( "%s",
"http://www.titanframework.net/docs",
__( "Documentation", 'titan-framework' )
);
$plugin_meta[] = sprintf( "%s",
"https://github.com/gambitph/Titan-Framework",
__( "GitHub Repo", 'titan-framework' )
);
$plugin_meta[] = sprintf( "%s",
"https://github.com/gambitph/Titan-Framework/issues",
__( "Issue Tracker", 'titan-framework' )
);
}
return $plugin_meta;
}
}
new TitanFrameworkPlugin();