Please enter Aspose SID and Key on plugin settings page.

'; // return; } if(isset($_POST['apc_generate_short_code'])) { $post_params = $_POST; require_once('apc-sdk-calls.php'); } require_once('aspose-cloud-excel-to-form-admin-main.php'); } add_action( 'admin_menu', 'register_aspose_excel_to_form_menu_page' ); function apc_excel_to_form_builder_enqueue_scripts() { // using thickbox for media uploader popup wp_enqueue_script('thickbox'); wp_enqueue_style('thickbox'); // register plugin script file // wp_register_script( 'apc_excel_to_form_builder_script', plugins_url( 'js/script.js', __FILE__ ), array('jquery') ); // wp_enqueue_script( 'apc_excel_to_form_builder_script' ); } add_action('admin_init', 'apc_excel_to_form_builder_enqueue_scripts'); /** * Pluing settings page * @param no-param * @return no-return */ function AsposeExcelToFormAdminContent() { // Creating the admin configuration interface ?>


If you don't have an account with Aspose Cloud, Click here to Sign Up.

' . __('Settings', 'aspose-cloud-excel-to-form-builder') . ''; array_unshift($links, $settings_link); } return $links; } /** * For removing options * @param no-param * @return no-return */ function UnsetOptionsAsposePostsExporter() { // Deleting the added options on plugin uninstall delete_option('aspose_cloud_excel_to_form_app_sid'); delete_option('aspose_cloud_excel_to_form_app_key'); } register_uninstall_hook(__FILE__, 'UnsetOptionsAsposePostsExporter'); function AsposePostsExporterAdminRegisterSettings() { global $wpdb; $create_new_table = ' CREATE TABLE IF NOT EXISTS `'.$wpdb->prefix.'apc_shortcodes` ( `id` int(11) NOT NULL, `filename` text NOT NULL, `head_row` text NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1; '; $wpdb->query($create_new_table); // Registering the settings register_setting('aspose_posts_exporter_options', 'aspose_cloud_excel_to_form_app_sid'); register_setting('aspose_posts_exporter_options', 'aspose_cloud_excel_to_form_app_key'); } add_action('admin_init', 'AsposePostsExporterAdminRegisterSettings'); if (check_upload_aspose_excel_context('APC-Select-Excel-File')) { add_filter('media_upload_tabs', 'apc_excel_to_form_builder_uploader_tabs', 10, 1); add_filter('attachment_fields_to_edit', 'apc_excel_to_form_builder_uploader_action_button', 20, 2); add_filter('media_send_to_editor', 'apc_excel_to_form_builder_uploader_file_selected', 10, 3); // add_filter('upload_mimes', 'apc_excel_to_form_builder_uploader_upload_mimes', 10, 3); } function apc_excel_to_form_builder_uploader_tabs($_default_tabs) { unset($_default_tabs['type_url']); return($_default_tabs); } function apc_excel_to_form_builder_uploader_upload_mimes ( $existing_mimes=array() ) { $existing_mimes = array(); $existing_mimes['doc'] = 'application/msword'; $existing_mimes['docx'] = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; return $existing_mimes; } function apc_excel_to_form_builder_uploader_action_button($form_fields, $post) { $send = ""; $form_fields['buttons'] = array('tr' => "\t\t$send\n"); $form_fields['context'] = array( 'input' => 'hidden', 'value' => 'APC-Select-Excel-File' ); return $form_fields; } function apc_excel_to_form_builder_uploader_file_selected($html, $send_id) { $file_url = wp_get_attachment_url($send_id); $file_url = basename($file_url); ?>