diff --git a/inc/admin/struttura.php b/inc/admin/struttura.php index 3fbb69217..f7b5e8bb5 100644 --- a/inc/admin/struttura.php +++ b/inc/admin/struttura.php @@ -457,5 +457,4 @@ function dsi_struttura_admin_script() { global $post_type; if( 'struttura' == $post_type ) wp_enqueue_script( 'struttura-admin-script', get_template_directory_uri() . '/inc/admin-js/struttura.js' ); -} } \ No newline at end of file diff --git a/inc/cmb2.php b/inc/cmb2.php index 6f6e82266..bf85833a2 100755 --- a/inc/cmb2.php +++ b/inc/cmb2.php @@ -12,7 +12,8 @@ function dsi_get_user_options( $query_args = false) { - + if(!is_array($query_args)) $query_args = []; + if(!$query_args) $query_args['fields'] = array( 'ID', 'display_name' ); diff --git a/inc/vendor/CMB2-field-Leaflet-Geocoder/cmb-field-leaflet-map.php b/inc/vendor/CMB2-field-Leaflet-Geocoder/cmb-field-leaflet-map.php index 4e1b843c1..07837d5cb 100755 --- a/inc/vendor/CMB2-field-Leaflet-Geocoder/cmb-field-leaflet-map.php +++ b/inc/vendor/CMB2-field-Leaflet-Geocoder/cmb-field-leaflet-map.php @@ -137,7 +137,8 @@ protected function localize_script( $args ) { * * @internal param array $args */ - protected function render_input( $field_name = '', CMB2_Field $field, $field_escaped_value, CMB2_Types $field_type_object ) { + protected function render_input( $field_name, CMB2_Field $field, $field_escaped_value, CMB2_Types $field_type_object ) { + if (is_null($field_name)) $field_name = ''; $attrs = $field_type_object->concat_attrs( [ 'id' => "{$field->args( 'id' )}_{$field_name}", 'type' => 'hidden', diff --git a/inc/vendor/CMB2/includes/rest-api/CMB2_REST.php b/inc/vendor/CMB2/includes/rest-api/CMB2_REST.php index fabb7b8ba..517bf5399 100644 --- a/inc/vendor/CMB2/includes/rest-api/CMB2_REST.php +++ b/inc/vendor/CMB2/includes/rest-api/CMB2_REST.php @@ -761,7 +761,8 @@ public function field_can_edit( $field_id, $return_object = false ) { * * @return mixed False if field can't be read or edited or true|CMB2_Field object. */ - protected function field_can( $type = 'read_fields', $field_id, $return_object = false ) { + protected function field_can( $type, $field_id, $return_object = false ) { + if (is_null($type)) $type = 'read_fields'; if ( ! in_array( $field_id instanceof CMB2_Field ? $field_id->id() : $field_id, $this->{$type}, true ) ) { return false; } diff --git a/inc/vendor/CMB2/includes/types/CMB2_Type_Multi_Base.php b/inc/vendor/CMB2/includes/types/CMB2_Type_Multi_Base.php index 652c92c41..d01d98c38 100644 --- a/inc/vendor/CMB2/includes/types/CMB2_Type_Multi_Base.php +++ b/inc/vendor/CMB2/includes/types/CMB2_Type_Multi_Base.php @@ -31,7 +31,8 @@ public function select_option( $args = array() ) { * @param int $i Iterator value * @return string Gnerated list item html */ - public function list_input( $args = array(), $i ) { + public function list_input( $args, $i ) { + if (is_null($args)) $args = array(); $a = $this->parse_args( 'list_input', array( 'type' => 'radio', 'class' => 'cmb2-option', diff --git a/inc/vendor/cmb-field-select2-master/cmb-field-select2.php b/inc/vendor/cmb-field-select2-master/cmb-field-select2.php index b1d1d353b..2a983d5c3 100755 --- a/inc/vendor/cmb-field-select2-master/cmb-field-select2.php +++ b/inc/vendor/cmb-field-select2-master/cmb-field-select2.php @@ -80,7 +80,8 @@ public function render_pw_multiselect( $field, $field_escaped_value, $field_obje * Return the list of options, with selected options at the top preserving their order. This also handles the * removal of selected options which no longer exist in the options array. */ - public function get_pw_multiselect_options( $field_escaped_value = array(), $field_type_object ) { + public function get_pw_multiselect_options( $field_escaped_value, $field_type_object ) { + if (is_null($field_escaped_value)) $field_escaped_value = array(); $options = (array) $field_type_object->field->options(); // If we have selected items, we need to preserve their order diff --git a/template-parts/autore/card-insegnante.php b/template-parts/autore/card-insegnante.php index 68351858b..55b274b31 100755 --- a/template-parts/autore/card-insegnante.php +++ b/template-parts/autore/card-insegnante.php @@ -1,5 +1,6 @@ ID); if($foto_url) $image_id = attachment_url_to_postid($foto_url); diff --git a/template-parts/autore/card.php b/template-parts/autore/card.php index 4dbffbc25..bd48a621b 100755 --- a/template-parts/autore/card.php +++ b/template-parts/autore/card.php @@ -1,5 +1,6 @@ ID); if($foto_url) $image_id = attachment_url_to_postid($foto_url); diff --git a/template-parts/single/bottom.php b/template-parts/single/bottom.php index 58c0db4cf..2bfd60288 100755 --- a/template-parts/single/bottom.php +++ b/template-parts/single/bottom.php @@ -10,7 +10,7 @@ echo $date_update->format('d.m.Y'); ?>