Skip to content

Commit

Permalink
fixed deprecated issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Janvi committed Apr 1, 2024
1 parent f014149 commit 9554abd
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 6 deletions.
1 change: 1 addition & 0 deletions core/class-fire-placeholders.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
*/
if ( ! class_exists( 'CZR_placeholders' ) ) :
#[\AllowDynamicProperties]
class CZR_placeholders {
//Access any method or var of the class with classname::$instance -> var or method():
static $instance;
Expand Down
1 change: 1 addition & 0 deletions core/class-fire-resources_scripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* @package Customizr
*/
if ( !class_exists( 'CZR_resources_scripts' ) ) :
#[\AllowDynamicProperties]
class CZR_resources_scripts {
//Access any method or var of the class with classname::$instance->var or method():
static $instance;
Expand Down
1 change: 1 addition & 0 deletions core/class-fire-resources_styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @package Customizr
*/
if ( !class_exists( 'CZR_resources_styles' ) ) :
#[\AllowDynamicProperties]
class CZR_resources_styles {
//Access any method or var of the class with classname::$instance->var or method():
static $instance;
Expand Down
13 changes: 8 additions & 5 deletions core/fmk-ccat.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@


if ( ! class_exists( 'CZR_Model' ) ) :
#[\AllowDynamicProperties]
class CZR_Model {
static $instance;

Expand Down Expand Up @@ -1049,11 +1050,13 @@ public function czr_fn_maybe_render() {
//ADD ATTRIBUTES TO THE WRAPPER
if ( is_user_logged_in() ) {
/* Maybe merge debug info into the model element attributes */
$this -> model -> element_attributes = is_array( $this -> model -> element_attributes ) ? $this -> model -> element_attributes : explode( ' ', $this -> model -> element_attributes );
$this -> model -> element_attributes = join( ' ', array_filter( array_unique( array_merge( $this -> model -> element_attributes, array(
'data-czr-model_id="'. $this -> model -> id .'"',
isset( $this -> model -> template ) ? 'data-czr-template="templates/parts/'. $this -> model -> template .'"' : ''
)))) );
if($this -> model -> element_attributes !== null){
$this -> model -> element_attributes = is_array( $this -> model -> element_attributes ) ? $this -> model -> element_attributes : explode( ' ', $this -> model -> element_attributes );
$this -> model -> element_attributes = join( ' ', array_filter( array_unique( array_merge( $this -> model -> element_attributes, array(
'data-czr-model_id="'. $this -> model -> id .'"',
isset( $this -> model -> template ) ? 'data-czr-template="templates/parts/'. $this -> model -> template .'"' : ''
)))) );
}
}

$this -> czr_fn_render();
Expand Down
1 change: 1 addition & 0 deletions core/front/models/class-model-header.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
#[\AllowDynamicProperties]
class CZR_header_model_class extends CZR_Model {

public $primary_nbwrapper_class;
Expand Down
2 changes: 1 addition & 1 deletion core/front/models/class-model-main_content.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function czr_fn_process_singular_thumbnail() {
//__before_main_wrapper, 200
//__before_regular_{post|page}_heading_title
//__after_regular_{post|page}_heading_title
$_singular_thumb_option = czr_fn_opt( "tc_single_${context}_thumb_location" );
$_singular_thumb_option = czr_fn_opt( "tc_single_{$context}_thumb_location" );

//nothing to do:
if ( ! ( $_singular_thumb_option && 'hide' !== $_singular_thumb_option ) ) {
Expand Down

0 comments on commit 9554abd

Please sign in to comment.