items) ) { echo 'AtariAge.com'; echo ''; } else { echo '

' . __( 'This dashboard widget queries AtariAge for their latest RSS (Really Simple Syndication) feed. Oddly enough, it hasn\'t found any... yet. It\'s okay - Albert is surely working on it.', 'dashboard_AtariAge' ) . "

"; } echo '

'.__('View all').'

'; } /* add Dashboard Widget via function wp_add_dashboard_widget() */ function dashboard_AtariAge_Init() { wp_add_dashboard_widget( 'dashboard_AtariAge', __( 'AtariAge Dashboard Feed' ), 'dashboard_AtariAge', 'dashboard_AtariAge_Setup'); add_action('admin_head', 'AtariAge_head', 999); } function AtariAge_head() { echo ''."\n"; } function dashboard_AtariAge_Options() { $defaults = array( 'items' => 5, 'showtime' => 1, 'showURL' => 1, 'showexcerpt' => 1); if ( ( !$options = get_option( 'dashboard_AtariAge' ) ) || !is_array($options) ) $options = array(); return array_merge( $defaults, $options ); } function dashboard_AtariAge_Setup() { $options = dashboard_AtariAge_Options(); if ( 'post' == strtolower($_SERVER['REQUEST_METHOD']) && isset( $_POST['widget_id'] ) && 'dashboard_AtariAge' == $_POST['widget_id'] ) { foreach ( array( 'items', 'showtime', 'showurl', 'showexcerpt' ) as $key ) $options[$key] = $_POST[$key]; update_option( 'dashboard_AtariAge', $options ); } ?>