Admin::admin_action_new_post()
Admin action new post.
Description
When a new post action is fired the title is set to ‘Elementor’ and the post ID.
Fired by admin_action_elementor_new_post
action.
Changelog
Version | Description |
---|---|
1.9.0 | Introduced. |
Source
includes/admin.php
/** * Admin action new post. * * When a new post action is fired the title is set to 'Elementor' and the post ID. * * Fired by `admin_action_elementor_new_post` action. * * @since 1.9.0 * @access public */ public function admin_action_new_post() { check_admin_referer( 'elementor_action_new_post' ); if ( empty( $_GET['post_type'] ) ) { $post_type = 'post'; } else { $post_type = $_GET['post_type']; } if ( ! User::is_current_user_can_edit_post_type( $post_type ) ) { return; } if ( empty( $_GET['template_type'] ) ) { $type = 'post'; } else { $type = $_GET['template_type']; // XSS ok.