Admin::add_elementor_post_state( array $post_states, WP_Post $post )
Add Elementor post state.
Description
Adds a new "Elementor" post state to the post table.
Fired by display_post_states
filter.
Parameters
Name | Type | Required | Description |
---|---|---|---|
$post_states | array |
Required | An array of post display states. |
$post | WP_Post |
Required | The current post object. |
Return
(array) A filtered array of post display states.
Changelog
Version | Description |
---|---|
1.8.0 | Introduced. |
Source
includes/admin.php
public function add_elementor_post_state( $post_states, $post ) { if ( User::is_current_user_can_edit( $post->ID ) && Plugin::$instance->db->is_built_with_elementor( $post->ID ) ) { $post_states['elementor'] = __( 'Elementor', 'elementor' ); } return $post_states; }