| 1 |
<?php |
| 2 |
/** |
| 3 |
* Gutenberg batch |
| 4 |
* |
| 5 |
* @package WPFunnels\Batch\Gutenberg |
| 6 |
*/ |
| 7 |
|
| 8 |
namespace WPFunnels\Batch\Gutenberg; |
| 9 |
|
| 10 |
use WPFunnels\Importer\Wpfnl_Importer_Helper; |
| 11 |
|
| 12 |
/** |
| 13 |
* Gutenberg batch |
| 14 |
* |
| 15 |
* @since 1.0.0 |
| 16 |
*/ |
| 17 |
class Wpfnl_Gutenberg_Source { |
| 18 |
|
| 19 |
|
| 20 |
/** |
| 21 |
* Import single template contents |
| 22 |
* |
| 23 |
* @param string $step_id Funnel step id. |
| 24 |
* |
| 25 |
* @return array|int|void|\WP_Error |
| 26 |
* @since 1.0.0 |
| 27 |
*/ |
| 28 |
public function import_single_template( $step_id ) { |
| 29 |
$content = Wpfnl_Importer_Helper::get_instance()->get_post_contents( $step_id ); |
| 30 |
wp_update_post( |
| 31 |
array( |
| 32 |
'ID' => $step_id, |
| 33 |
'post_content' => $content, |
| 34 |
) |
| 35 |
); |
| 36 |
} |
| 37 |
} |
| 38 |
|