| @@ -359,22 +359,11 @@ | ||
| 359 | 359 | * |
| 360 | 360 | * @return string A URL for creating new post using Elementor. |
| 361 | 361 | */ |
| 362 | 362 | public static function get_create_new_post_url( $post_type = 'page', $template_type = null ) { |
| 363 | - $query_args = [ | |
| 364 | - 'action' => 'elementor_new_post', | |
| 365 | - 'post_type' => $post_type, | |
| 366 | - ]; | |
| 363 | + Plugin::$instance->modules_manager->get_modules( 'dev-tools' )->deprecation->deprecated_function( __FUNCTION__, '3.3.0', 'Plugin::$instance->documents->get_create_new_post_url()' ); | |
| 367 | 364 | |
| 368 | - if ( $template_type ) { | |
| 369 | - $query_args['template_type'] = $template_type; | |
| 370 | - } | |
| 371 | - | |
| 372 | - $new_post_url = add_query_arg( $query_args, admin_url( 'edit.php' ) ); | |
| 373 | - | |
| 374 | - $new_post_url = add_query_arg( '_wpnonce', wp_create_nonce( 'elementor_action_new_post' ), $new_post_url ); | |
| 375 | - | |
| 376 | - return $new_post_url; | |
| 365 | + return Plugin::$instance->documents->get_create_new_post_url( $post_type, $template_type ); | |
| 377 | 366 | } |
| 378 | 367 | |
| 379 | 368 | /** |
| 380 | 369 | * Get post autosave. |