Skip to content

Commit

Permalink
Add PHP 8.2 fixes (#700)
Browse files Browse the repository at this point in the history
* Add PHP 8.2 fixes for dynamic properties error

* Add fix for ${var} string interpolation

* Remove unused dropdown_taxonomies property

* Use `date()` since `strftime()` is deprecated since 8.1

* Add dynamic property attribute
  • Loading branch information
rebeccahum authored Oct 4, 2023
1 parent 8c39de0 commit 113554f
Show file tree
Hide file tree
Showing 6 changed files with 309 additions and 284 deletions.
6 changes: 5 additions & 1 deletion common/php/class-module.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ class EF_Module {
'private',
);

public $module_url;

public $module;

function __construct() {}

/**
Expand Down Expand Up @@ -437,7 +441,7 @@ function timesince( $original ) {
}
}

return sprintf( _n( "1 $name ago", "$count ${name}s ago", $count), $count);
return sprintf( _n( "1 $name ago", "$count {$name}s ago", $count), $count);
}

/**
Expand Down
20 changes: 20 additions & 0 deletions edit_flow.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ function _ef_print_php_version_admin_notice() {
define( 'EDIT_FLOW_SETTINGS_PAGE' , add_query_arg( 'page', 'ef-settings', get_admin_url( null, 'admin.php' ) ) );

// Core class
#[\AllowDynamicProperties]
class edit_flow {

// Unique identified added as a prefix to all options
Expand All @@ -64,6 +65,25 @@ class edit_flow {
*/
private static $instance;

/**
* Active modules.
*
* @var \stdClass
*/
public $modules;

/**
* Number of active modules.
*
* @var int
*/
public $modules_count;

/**
* @var EF_Module
*/
public $helpers;

/**
* Main EditFlow Instance
*
Expand Down
Loading

0 comments on commit 113554f

Please sign in to comment.