@@ -811,7 +811,7 @@ |
||
811 | 811 | /** |
812 | 812 | * Output the JS for building the dynamic Guntenberg block. |
813 | 813 | * |
814 | - * @return mixed |
|
814 | + * @return string |
|
815 | 815 | */ |
816 | 816 | public function block() { |
817 | 817 | ob_start(); |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | <?php |
199 | 199 | if(!empty($insert_shortcode_function)){ |
200 | 200 | echo $insert_shortcode_function; |
201 | - }else{ |
|
201 | + } else{ |
|
202 | 202 | |
203 | 203 | /** |
204 | 204 | * Function for super duper insert shortcode. |
@@ -673,7 +673,7 @@ discard block |
||
673 | 673 | } |
674 | 674 | $output .= $main_content; |
675 | 675 | $output .= '</div>'; |
676 | - }elseif($main_content && $no_wrap){ |
|
676 | + } elseif($main_content && $no_wrap){ |
|
677 | 677 | $output .= $main_content; |
678 | 678 | } |
679 | 679 | |
@@ -892,7 +892,7 @@ discard block |
||
892 | 892 | $type = 'array'; |
893 | 893 | if(is_array($args['default'])){ |
894 | 894 | $default = isset( $args['default'] ) ? "['" . implode("','", $args['default']) . "']" : "[]"; |
895 | - }else{ |
|
895 | + } else{ |
|
896 | 896 | $default = isset( $args['default'] ) ? "'" . $args['default'] . "'" : "''"; |
897 | 897 | } |
898 | 898 | } elseif ( $args['type'] == 'multiselect' ) { |
@@ -1070,7 +1070,7 @@ discard block |
||
1070 | 1070 | // If the user sets block-output array then build it |
1071 | 1071 | if ( ! empty( $this->options['block-output'] ) ) { |
1072 | 1072 | $this->block_element( $this->options['block-output'] ); |
1073 | - }else{ |
|
1073 | + } else{ |
|
1074 | 1074 | // if no block-output is set then we try and get the shortcode html output via ajax. |
1075 | 1075 | ?> |
1076 | 1076 | el('div', { |
@@ -1160,7 +1160,7 @@ discard block |
||
1160 | 1160 | foreach($custom_attributes as $key => $val){ |
1161 | 1161 | $attributes .= " $key='$val' "; |
1162 | 1162 | } |
1163 | - }else{ |
|
1163 | + } else{ |
|
1164 | 1164 | foreach($custom_attributes as $key => $val){ |
1165 | 1165 | $attributes .= "'$key': '$val',"; |
1166 | 1166 | } |
@@ -1527,7 +1527,7 @@ discard block |
||
1527 | 1527 | // print_r($value); |
1528 | 1528 | // echo '@@@'.print_r($val,true),'@@@'; |
1529 | 1529 | // echo '###'.$value.'###'; |
1530 | - if ($multiple) {$selected = in_array($val,$value) ? 'selected="selected"' : ''; }else{$selected = selected( $value, $val, false );} |
|
1530 | + if ($multiple) {$selected = in_array($val,$value) ? 'selected="selected"' : ''; } else{$selected = selected( $value, $val, false );} |
|
1531 | 1531 | echo "<option value='$val' " . $selected . ">$label</option>"; |
1532 | 1532 | } |
1533 | 1533 | } |
@@ -28,6 +28,9 @@ |
||
28 | 28 | 'WP_Super_Duper' => __DIR__ . '/..' . '/ayecode/wp-super-duper/wp-super-duper.php', |
29 | 29 | ); |
30 | 30 | |
31 | + /** |
|
32 | + * @return callable |
|
33 | + */ |
|
31 | 34 | public static function getInitializer(ClassLoader $loader) |
32 | 35 | { |
33 | 36 | return \Closure::bind(function () use ($loader) { |
@@ -367,6 +367,10 @@ |
||
367 | 367 | return $file; |
368 | 368 | } |
369 | 369 | |
370 | + /** |
|
371 | + * @param string $class |
|
372 | + * @param string $ext |
|
373 | + */ |
|
370 | 374 | private function findFileWithExtension($class, $ext) |
371 | 375 | { |
372 | 376 | // PSR-4 lookup |