tag and attributes. $allowedposttags['style'] = array(); } return $allowedposttags; } /** * Update post meta. * * @param integer $post_id Post ID. * @return void */ public function import_single_post( $post_id = 0 ) { if ( CARTFLOWS_STEP_POST_TYPE !== get_post_type( $post_id ) ) { return; } // Allow the SVG tags in batch update process. add_filter( 'wp_kses_allowed_html', array( $this, 'allowed_tags_and_attributes' ), 10, 2 ); // Download and replace images. $content = get_post_meta( $post_id, 'divi_content', true ); if ( empty( $content ) ) { wcf()->logger->import_log( '(✕) Not have "Divi" Data. Post content is empty!' ); } else { wcf()->logger->import_log( '(✓) Processing Request..' ); // Update hotlink images. $content = CartFlows_Importer::get_instance()->get_content( $content ); // Update post content. wp_update_post( array( 'ID' => $post_id, 'post_content' => $content, ) ); // Delete temporary meta key. delete_post_meta( $post_id, 'divi_content' ); wcf()->logger->import_log( '(✓) Process Complete' ); } } } /** * Initialize class object with 'get_instance()' method */ CartFlows_Importer_Divi::get_instance(); endif;