| @@ -25,8 +25,9 @@ | ||
| 25 | 25 | $platform = $this->get_param( 'platform', 'elementor' ); |
| 26 | 26 | $origin = $this->get_param( 'origin', 'remote' ); |
| 27 | 27 | $id = $this->get_param( 'id', 0, 'intval' ); |
| 28 | 28 | $postId = $this->get_param( 'postId', 0, 'intval' ); |
| 29 | + $settings = $this->get_param( 'settings', [], null ); | |
| 29 | 30 | |
| 30 | 31 | if( $id <= 0 || $id == null ) { |
| 31 | 32 | return $this->error('invalid_item_id', __( 'Invalid ID is provided.', 'templately' ), 'get_content', 404 ); |
| 32 | 33 | } |
| @@ -73,9 +74,9 @@ | ||
| 73 | 74 | 'insert', 404 |
| 74 | 75 | ); |
| 75 | 76 | } |
| 76 | 77 | |
| 77 | - return $this->platform( $platform )->insert( $template_data, $postId ); | |
| 78 | + return $this->platform( $platform )->insert( $template_data, $postId, $settings ); | |
| 78 | 79 | } |
| 79 | 80 | |
| 80 | 81 | private function get_cloud_content( $id = null, $platform = 'elementor' ){ |
| 81 | 82 | $response = $this->http()->query( |
| @@ -207,5 +208,5 @@ | ||
| 207 | 208 | Utils::add_gd_editor_filter(); |
| 208 | 209 | |
| 209 | 210 | return $this->platform( $platform )->create_page( $id, $title, $this, $settings ); |
| 210 | 211 | } |
| 211 | -} | |
| 212 | +} | |