]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-content/themes/twentyfourteen/inc/widgets.php
WordPress 4.0
[autoinstalls/wordpress.git] / wp-content / themes / twentyfourteen / inc / widgets.php
index 61c1160ae6303afe3fcfaf63b1677827c2da6632..9bd1e79efd4b194433324b3df8af53db433792a3 100644 (file)
@@ -47,7 +47,7 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget {
         * @param array $instance An array of settings for this widget instance.
         */
        public function widget( $args, $instance ) {
         * @param array $instance An array of settings for this widget instance.
         */
        public function widget( $args, $instance ) {
-               $format = $instance['format'];
+               $format = isset( $instance['format'] ) && in_array( $instance['format'], $this->formats ) ? $instance['format'] : 'aside';
 
                switch ( $format ) {
                        case 'image':
 
                switch ( $format ) {
                        case 'image':