Skip to content

Commit

Permalink
fix: page loading on places
Browse files Browse the repository at this point in the history
Co-authored-by: Marco Rubin <[email protected]>
  • Loading branch information
sviluppoRobyone and Marco Rubin authored Sep 4, 2023
1 parent 94b9437 commit fc9f31d
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 7 deletions.
1 change: 0 additions & 1 deletion inc/admin/struttura.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
}
}
3 changes: 2 additions & 1 deletion inc/cmb2.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 2 additions & 1 deletion inc/vendor/CMB2/includes/rest-api/CMB2_REST.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion inc/vendor/CMB2/includes/types/CMB2_Type_Multi_Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 2 additions & 1 deletion inc/vendor/cmb-field-select2-master/cmb-field-select2.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions template-parts/autore/card-insegnante.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
global $autore;
$image_id = null;
$foto_url = get_the_author_meta('_dsi_persona_foto', $autore->ID);
if($foto_url)
$image_id = attachment_url_to_postid($foto_url);
Expand Down
1 change: 1 addition & 0 deletions template-parts/autore/card.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
global $autore;
$image_id = null;
$foto_url = get_the_author_meta('_dsi_persona_foto', $autore->ID);
if($foto_url)
$image_id = attachment_url_to_postid($foto_url);
Expand Down
2 changes: 1 addition & 1 deletion template-parts/single/bottom.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
echo $date_update->format('d.m.Y');
?></p>
<p><?php
if(trim($licenza)!= "")
if($licenza && trim($licenza)!= "")
echo $licenza;
else
_e("Eccetto dove diversamente specificato, questo articolo è stato rilasciato sotto Licenza Creative Commons Attribuzione 4.0 Italia.", "design_scuole_italia"); ?></p>
Expand Down

0 comments on commit fc9f31d

Please sign in to comment.