'New Widget', 'slug' => 'new-widget'); $selected_widget = 'new-widget'; } if( isset($_POST['save-widget']) ){ check_admin_referer('dda_widget-update'); echo '

Your Widget settings have been saved

'; $widget = array(); $widget['name'] = $_POST['widget']['name']; $widget['slug'] = !empty($_POST['widget']['slug']) ? $_POST['widget']['slug'] : sanitize_title_with_dashes($widget['name']); if( 'rss' == $_POST['widget']['type'] ){ $widget['user'] = false; $widget['fav'] = false; $widget['search'] = false; $widget['type'] = 'rss'; $widget['feed'] = $_POST['widget']['feed']; } else { //Query $widget['type'] = 'query'; $widget['user'] = ('by' == $_POST['widget']['query-type']); $widget['fav'] = ('favby' == $_POST['widget']['query-type']); $widget['search'] = ('search' == $_POST['widget']['query-type']); $widget['term'] = $_POST['widget']['query-term']; $widget['order'] = $_POST['widget']['order']; $widget['scraps'] = !isset($_POST['widget']['scraps']) ? false : ( 'on' == $_POST['widget']['scraps']); $widget['mature'] = !isset($_POST['widget']['mature']) ? false : ( 'on' == $_POST['widget']['mature']); } $widget['random'] = !isset($_POST['widget']['random']) ? false : ( 'on' == $_POST['widget']['random']); $widget['number'] = (int)$_POST['widget']['number']; $widget['library'] = !isset($_POST['widget']['library']) ? false : ( 'on' == $_POST['widget']['library']); if( $widget['library'] ) $widget['size'] = $_POST['widget']['size']; if( isset($_POST['widget']['customhtml']) && 'on' == $_POST['widget']['customhtml'] ) if( ! empty($_POST['widget']['html']) ) $widget['html'] = $_POST['widget']['html']; $widgets[ $widget['slug'] ] = $widget; update_option('dda_widgets', $widgets); $selected_widget = $widget['slug']; } if( empty($selected_widget) ){ $lw = array_keys($widgets); $selected_widget = $widgets[ $lw[0] ]['slug']; } ?>

dDeviantArt Settings

Widget Settings


/> />
>
> Deviation is..
/> /> />

Order Deviations by..
/>
/>
/>
/>
/>
/>

/> />

/> /> />
> Maximum image size (Note: Only is effective when storing in the Media library, And if using the %image token tag if using the customised HTML option)
>
Available Tags:
%link% = Link to the Deviation
%title% = The Deviation Title
%category% = The Category of the Deviation
%symbol%, %author% = The Authors Deviantart Symbol, & Username
%time% = The Submission time
%id% = The Deviation Id
%image% = The Local thumbnail of widget size
%image150% = The URL of the 150px Thumbnail on the DeviantArt servers.
%image300% = The URL of the 300px Thumbnail on the DeviantArt servers.
%imagefull% = The URL of the fullsize on the DeviantArt servers.

General Settings

'dd32')) )); //var_dump( array('Deviation', DeviantArt::getDeviation(81210993) )); ?>