Skip to content

Commit

Permalink
- Fatal error on the Status column in the Content Overview screen whe…
Browse files Browse the repository at this point in the history
…n a post is displayed #1509
  • Loading branch information
olatechpro committed Dec 20, 2023
1 parent 9fdd188 commit 7184a2c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions common/php/class-module.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ protected function get_core_post_statuses()
* @since 4.0
*/
public function get_custom_status_by($field, $value) {
global $publishpres;
global $publishpress;

return $publishpress->getPostStatusBy($field, $value);
}
Expand Down Expand Up @@ -269,8 +269,7 @@ public function get_post_status_friendly_name($status)

// Custom statuses only handles workflow statuses
if (!in_array($status, ['publish', 'future', 'private', 'trash'])) {

$status_object = $publishpress->getStatusBy('slug', $status);
$status_object = $publishpress->getPostStatusBy('slug', $status);

if ($status_object && !is_wp_error($status_object)) {
$status_friendly_name = $status_object->label;
Expand Down

0 comments on commit 7184a2c

Please sign in to comment.