PluginProbe
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell / 3.13.3
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell v3.13.3
3.13.3 3.13.2 3.13.1 3.13.0 3.12.13 3.12.12 3.12.11 3.12.10 3.12.9 3.12.8 3.12.7 3.12.6 3.12.5 3.12.4 3.12.3 3.12.1 3.12.2 3.12.0 3.11.1 3.11.0 3.10.9 3.10.8 3.10.7 3.10.6 2.8.16 All 261 releases
wpfunnels / admin / import-export / batch-processing / divi / class-wpfnl-divi-source.php

class-wpfnl-divi-source.php in WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell 3.13.3, at admin/import-export/batch-processing/divi/class-wpfnl-divi-source.php

47 lines 867 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Divi source
4 *
5 * @package WPFunnels\Batch\Divi
6 */
7
8 namespace WPFunnels\Batch\Divi;
9
10 use WPFunnels\Importer\Wpfnl_Importer_Helper;
11
12 /**
13 * Divi source
14 *
15 * @package
16 */
17 class Wpfnl_Divi_Source {
18
19
20 /**
21 * Import single template
22
23 * @param string $step_id Funnel Step Id.
24 *
25 * @return array|int|void|\WP_Error
26 *
27 * @since 1.0.0
28 */
29 public function import_single_template( $step_id ) {
30
31 add_filter( 'wp_kses_allowed_html', array( $this, 'allowed_tags_and_attributes' ), 10, 2 );
32 $content = get_post_field( 'post_content', $step_id );
33 if ( $content ) {
34 $content = Wpfnl_Importer_Helper::get_instance()->get_post_contents( $step_id );
35 wp_update_post(
36 array(
37 'ID' => $step_id,
38 'post_content' => $content,
39 )
40 );
41
42 // Delete temporary meta key.
43 delete_post_meta( $step_id, 'divi_content' );
44 }
45 }
46 }
47