function import_views_from_theme() { global $wpv_theme_import_xml; global $import_errors, $import_messages; if (isset($_POST['import']) && $_POST['import'] == __('Import', 'wpv-views') && wp_verify_nonce($_POST['wpv-import-nonce'], 'wpv-import-nonce') && !$import_errors) { ?> <div class="wrap"> <div id="icon-views" class="icon32"><br /></div> <h2><?php _e('Views Import', 'wpv-views'); ?> </h2> <br /> <h3><?php _e('Views import complete', 'wpv-views'); ?> </h3> </div> <?php } else { ?> <div class="wrap"> <div id="icon-views" class="icon32"><br /></div> <h2><?php _e('Views Import', 'wpv-views'); ?> </h2> <br /> <?php wpv_admin_import_form($wpv_theme_import_xml); ?> </div> <?php } }
/** * legacy_import_views_from_theme * * Content of the Options page for legacy theme data import * * @since 1.8.0 */ function legacy_import_views_from_theme() { if ( ! current_user_can( 'manage_options' ) ) { return; } if ( isset( $_POST['import'] ) && ( $_POST['import'] == __( 'Import', 'wpv-views' ) || $_POST['import'] == 'wpv-import' ) && wp_verify_nonce( $_POST['wpv-import-nonce'], 'wpv-import-nonce' ) && ! $this->import_errors ) { ?> <div class="wrap"> <div id="icon-views" class="icon32"><br /></div> <h2><?php _e( 'Views Import' , 'wpv-views' ); ?></h2> <br /> <h3><?php _e( 'Views import complete', 'wpv-views' ) ?></h3> </div> <?php } else { ?> <div class="wrap"> <div id="icon-views" class="icon32"><br /></div> <h2><?php _e( 'Views Import', 'wpv-views' ); ?></h2> <br /> <?php wpv_admin_import_form( $this->legacy_import_xml ); ?> </div> <?php } }
function wpv_admin_menu_import_export() { ?> <div class="wrap"> <div id="icon-views" class="icon32"><br /></div> <h2><?php _e('Views Import / Export', 'wpv-views'); ?> </h2> <br /> <form name="View_export" action="<?php echo admin_url('edit.php'); ?> " method="post"> <h2><?php _e('Export Views and View Templates', 'wpv-views'); ?> </h2> <p><?php _e('Download all Views and View Templates', 'wpv-views'); ?> </p> <p><strong><?php _e('When importing to theme:', 'wpv-views'); ?> </strong></p> <ul style="margin-left:10px"> <li> <input id="radio-1" type="radio" value="ask" name="import-mode" checked="checked" /> <label for="radio-1"><?php _e('ask user for approval', 'wpv-views'); ?> </label> </li> <li> <input id="radio-2" type="radio" value="auto" name="import-mode" /> <label for="radio-2"><?php _e('import automatically', 'wpv-views'); ?> </label> </li> </ul> <p><strong><?php _e('Affiliate details for theme designers:', 'wpv-views'); ?> </strong></p> <table style="margin-left:10px"> <tr> <td><?php _e('Affiliate ID:', 'wpv-views'); ?> </td><td><input type="text" name="aid" id="aid" style="width:200px;" /></td> </tr> <tr> <td><?php _e('Affiliate Key:', 'wpv-views'); ?> </td><td><input type="text" name="akey" id="akey" style="width:200px;" /></td> </tr> </table> <p style="margin-left:10px"> <?php _e('You only need to enter affiliate settings if you are a theme designer and want to receive affiliate commission.', 'wpv-views'); ?> <br /> <?php echo sprintf(__('Log into your account at <a href="%s">%s</a> and go to <a href="%s">%s</a> for details.', 'wpv-views'), 'http://wp-types.com', 'http://wp-types.com', 'http://wp-types.com/shop/account/?acct=affiliate', 'http://wp-types.com/shop/account/?acct=affiliate'); ?> </p> <br /> <input id="wpv-export" class="button-primary" type="submit" value="<?php _e('Export', 'wpv-views'); ?> " name="export" /> <?php wp_nonce_field('wpv-export-nonce', 'wpv-export-nonce'); ?> </form> <hr /> <?php wpv_admin_import_form(''); ?> </div> <?php }
function wpv_admin_menu_import_export() { ?> <div class="wrap"> <div id="icon-views" class="icon32"><br /></div> <h2><?php _e('Views Import / Export', 'wpv-views'); ?> </h2> <div class="wpv-setting-container"> <div class="wpv-settings-header"> <h3><?php _e('Export Views and Content Templates', 'wpv-views'); ?> </h3> </div> <div class="wpv-setting"> <form name="View_export" action="<?php echo admin_url('edit.php'); ?> " method="post"> <h4><?php _e('Download all Views and Content Templates', 'wpv-views'); ?> </h4> <p><?php _e('When importing to theme:', 'wpv-views'); ?> </p> <p> <input id="radio-1" type="radio" value="ask" name="import-mode" checked="checked" /> <label for="radio-1"><?php _e('ask user for approval', 'wpv-views'); ?> </label> </p> <p> <input id="radio-2" type="radio" value="auto" name="import-mode" /> <label for="radio-2"><?php _e('import automatically', 'wpv-views'); ?> </label> </p> <h4><?php _e('Affiliate details for theme designers:', 'wpv-views'); ?> </h4> <p> <label for="aid"><?php _e('Affiliate ID:', 'wpv-views'); ?> </label><br> <input type="text" name="aid" id="aid" /> </p> <p> <label for="akey"><?php _e('Affiliate Key:', 'wpv-views'); ?> </label><br> <input type="text" name="akey" id="akey" /> </p> <p> <?php _e('You only need to enter affiliate settings if you are a theme designer and want to receive affiliate commission.', 'wpv-views'); ?> <?php echo sprintf(__('Log into <a href="%s">your account</a> and go to <a href="%s">affiliate settings</a> for details.', 'wpv-views'), 'http://wp-types.com', 'http://wp-types.com/shop/account/?acct=affiliate'); ?> </p> <p class="update-button-wrap"> <input id="wpv-export" class="button-primary" type="submit" value="<?php _e('Export', 'wpv-views'); ?> " name="export" /> </p> <?php wp_nonce_field('wpv-export-nonce', 'wpv-export-nonce'); ?> </form> </div> </div> <!-- .wpv-setting-container --> <?php wpv_admin_import_form(''); ?> </div> <!-- .wrap --> <?php }