hook) { wp_enqueue_style('dashboard'); wp_enqueue_style('thickbox'); wp_enqueue_style('global'); wp_enqueue_style('wp-admin'); wp_enqueue_style('blogicons-admin-css', WP_CONTENT_URL . '/plugins/' . plugin_basename(dirname(__FILE__)). '/amr_plugin_tools.css'); } } function register_settings_page() { add_submenu_page( $this->parent_slug, $this->shortname, $this->shortname, $this->accesslvl, $this->hook, array(&$this,'config_page')); } function plugin_options_url() { return admin_url( 'options-general.php?page='.$this->hook ); } /** * Add a link to the settings page to the plugins list */ function add_action_link( $links, $file ) { static $this_plugin; if( empty($this_plugin) ) $this_plugin = $this->filename; if ( $file == $this_plugin ) { $settings_link = '' . __('Settings') . ''; array_unshift( $links, $settings_link ); } return $links; } function config_page() { } function config_page_scripts() { if (isset($_GET['page']) && $_GET['page'] == $this->hook) { wp_enqueue_script('postbox'); wp_enqueue_script('dashboard'); wp_enqueue_script('thickbox'); wp_enqueue_script('media-upload'); } } /** * Create a Checkbox input field */ function radiobutton($id, $label, $value, $selected) { $sel = checked($value,$selected, false); return " ".$label."
"; } /** * Create a Checkbox input field */ function checkbox($id, $label, $value) { return ' 
'; } /** * Create a Dropdown input field */ function dropdown($id, $label, $options, $selected) { // $html = '
' .''; return ($html); } /** * Create a Text input field */ function textinput($id, $label, $value, $length='45') { return '


'; } /** * Create a Text area field */ function textarea($id, $label, $value, $cols='45', $rows='10') { return '
' .'

'; } /** * Create a postbox widget */ function postbox($id, $title, $content) { ?>

'; foreach ($rows as $row) { $content .= ''; if (isset($row['id']) && $row['id'] != '') $content .= ''; else $content .= $row['label']; if (isset($row['desc']) && $row['desc'] != '') $content .= '
'.$row['desc'].''; $content .= ''; $content .= $row['content']; $content .= ''; } $content .= ''; return $content; } /** * Create a "plugin like" box. */ function plugin_like() { $content = '

'.__('Why not do any or all of the following:','amr-ical-events-list').'

'; $content .= ''; $this->postbox($this->hook.'like', 'Like this plugin?', $content); } /** * Info box with link to the support forums. */ function plugin_support() { $content = '

'.__('If you have any problems with this plugin or good ideas for improvements or new features, please talk about them in the','amr-ical-events-list').' '.__("Support forums",'amr-ical-events-list').'.

'; $this->postbox($this->hook.'support', 'Need support?', $content); } /** * Box with latest news from amr.com */ function news() { require_once(ABSPATH.WPINC.'/rss.php'); if ( $rss = fetch_rss( 'http://icalevents.com/feed' ) ) { $content = '