Twenty Fourteen: Avoid a PHP notice in Ephemera widget.
props jartes. fixes #28055. Built from https://develop.svn.wordpress.org/trunk@28248 git-svn-id: http://core.svn.wordpress.org/trunk@28076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a5366db845
commit
9998560152
|
@ -47,7 +47,7 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget {
|
||||||
* @param array $instance An array of settings for this widget instance.
|
* @param array $instance An array of settings for this widget instance.
|
||||||
*/
|
*/
|
||||||
public function widget( $args, $instance ) {
|
public function widget( $args, $instance ) {
|
||||||
$format = $instance['format'];
|
$format = isset( $instance['format'] ) && in_array( $instance['format'], $this->formats ) ? $instance['format'] : 'aside';
|
||||||
|
|
||||||
switch ( $format ) {
|
switch ( $format ) {
|
||||||
case 'image':
|
case 'image':
|
||||||
|
|
Loading…
Reference in New Issue