Example #1
0
 /**
  * Registers the plugin in the admin menu system
  * @static
  */
 static function RegisterAdminPage()
 {
     if (function_exists('add_options_page')) {
         add_options_page(__('Mixcloud Embed Options', 'mixcloud-embed'), __('Mixcloud-Embed', 'mixcloud'), 'level_10', MixcloudEmbed::GetBaseName(), array('MixcloudEmbed', 'CallHtmlShowOptionsPage'));
     }
 }
Example #2
0
 /**
  * Returns a link pointing back to the plugin page in WordPress
  *
  * @since 1.5
  * @return string The full url
  */
 function GetBackLink()
 {
     global $wp_version;
     //admin_url was added in WP 2.6.0
     if (function_exists("admin_url")) {
         $url = admin_url("options-general.php?page=" . MixcloudEmbed::GetBaseName());
     } else {
         $url = $_SERVER['PHP_SELF'] . "?page=" . MixcloudEmbed::GetBaseName();
     }
     //Some browser cache the page... great! So lets add some no caching params depending on the WP and plugin version
     $url .= '&me_wpv=' . $wp_version . '&me_pv=' . MixcloudEmbed::GetVersion();
     return $url;
 }