Transform
into
<?php | |
add_filter('display_post_states', function($states){ | |
$translate = array( | |
'/SiteOrigin Page Builder/' => '<span class="dashicons dashicons-editor-table" title="SiteOrigin Page Builder"> </span>', | |
'/Block Editor/' => '<span class="dashicons dashicons-grid-view" title="Gutenberg Editor"> </span>', | |
'/Classic Editor/' => '<span class="dashicons dashicons-edit" title="Classic Editor"> </span>', | |
); | |
foreach ($states as $key => &$state) { | |
foreach ($translate as $pattern => $new_value) { | |
if (preg_match($pattern, $state)) { | |
$state = $new_value; | |
} | |
} | |
} | |
return $states; | |
}, PHP_INT_MAX); |