ID; wp_nonce_field( basename( __FILE__) , 'amp_content_editor_nonce' ); $content = get_post_meta ( $amp_current_post_id, 'ampforwp_custom_content_editor', true ); $editor_id = 'ampforwp_custom_content_editor'; //wp_editor( $content, $editor_id ); if(empty($content)){ echo "
Beta Feature Video Tutorial Rate
"; } //echo ""; /*echo "
"; echo html_entity_decode($content); echo "
";*/ wp_enqueue_script( 'jquery-ui-dialog' ); // jquery and jquery-ui should be dependencies, didn't check though... wp_enqueue_style( 'wp-jquery-ui-dialog' ); call_page_builder(); } /* Add page builder form after editor */ function call_page_builder(){ global $post; global $moduleTemplate; add_thickbox(); $previousData = get_post_meta($post->ID,'amp-page-builder'); $ampforwp_pagebuilder_enable = get_post_meta($post->ID,'ampforwp_page_builder_enable', true); $previousData = isset($previousData[0])? $previousData[0]: null; //$previousData = wp_slash($previousData); $previousData = (str_replace("'", "", $previousData)); $totalRows = 1; $totalmodules = 1; if(!empty($previousData)){ //echo ' sdcds '.json_encode($previousData);die; $jsonData = json_decode($previousData,true); if(count($jsonData['rows'])>0){ $totalRows = $jsonData['totalrows']; $totalmodules = $jsonData['totalmodules']; $previousData = json_encode($jsonData); }else{ $jsonData['rows'] = array(); $jsonData['totalrows']=1; $jsonData['totalmodules'] = 1; $previousData = json_encode($jsonData); } } ?>

Welcome to AMP Page Builder.

1 Column 2 Columns
$module) { echo ''.$module['label'].''; } ?>
0){ foreach($get_ids as $id){ $image = wp_get_attachment_image( $id, 'medium', false, array( 'id' => 'ampforwp-preview-image' ) ); $image_src = wp_get_attachment_image_src($id, 'medium', false); $data[] = array( 'image' => $image, 'detail' => $image_src ); } } }else{ $image = wp_get_attachment_image( filter_input( INPUT_GET, 'id', FILTER_VALIDATE_INT ), 'medium', false, array( 'id' => 'ampforwp-preview-image' ) ); $data = array( 'image' => $image, ); } wp_send_json_success( $data ); } else { wp_send_json_error(); } } require_once AMP_PAGE_BUILDER.'functions.php';