/wp-content/plugins/wordpress-seo/admin/views/tabs/tool/wpseo-import.php

https://bitbucket.org/carloskikea/helpet · PHP · 41 lines · 28 code · 4 blank · 9 comment · 1 complexity · d74447376c21b7c08ba13fcf99680d8e MD5 · raw file

  1. <?php
  2. /**
  3. * WPSEO plugin file.
  4. *
  5. * @package WPSEO\Admin\Views
  6. */
  7. /**
  8. * @var Yoast_Form $yform
  9. */
  10. if ( ! defined( 'WPSEO_VERSION' ) ) {
  11. header( 'Status: 403 Forbidden' );
  12. header( 'HTTP/1.1 403 Forbidden' );
  13. exit();
  14. }
  15. ?>
  16. <p>
  17. <?php
  18. printf(
  19. /* translators: 1: emphasis opener; 2: emphasis closer. */
  20. esc_html__( 'Import settings by locating %1$ssettings.zip%2$s and clicking "Import settings"', 'wordpress-seo' ),
  21. '<em>',
  22. '</em>'
  23. );
  24. ?>
  25. </p>
  26. <form
  27. action="<?php echo esc_url( admin_url( 'admin.php?page=wpseo_tools&tool=import-export#top#wpseo-import' ) ); ?>"
  28. method="post" enctype="multipart/form-data"
  29. accept-charset="<?php echo esc_attr( get_bloginfo( 'charset' ) ); ?>">
  30. <?php wp_nonce_field( 'wpseo-import-file', '_wpnonce', true, true ); ?>
  31. <label class="screen-reader-text" for="settings-import-file"><?php esc_html_e( 'Choose your settings.zip file', 'wordpress-seo' ); ?></label>
  32. <input type="file" name="settings_import_file" id="settings-import-file"
  33. accept="application/x-zip,application/x-zip-compressed,application/zip"/>
  34. <input type="hidden" name="action" value="wp_handle_upload"/><br/>
  35. <br/>
  36. <input type="submit" class="button button-primary" value="<?php esc_attr_e( 'Import settings', 'wordpress-seo' ); ?>"/>
  37. </form>