当前位置: 首页>>代码示例>>PHP>>正文


PHP get_importers函数代码示例

本文整理汇总了PHP中get_importers函数的典型用法代码示例。如果您正苦于以下问题:PHP get_importers函数的具体用法?PHP get_importers怎么用?PHP get_importers使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_importers函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: test_ordering_of_importers

 function test_ordering_of_importers()
 {
     global $wp_importers;
     $_wp_importers = $wp_importers;
     // Preserve global state
     $wp_importers = array('xyz1' => array('xyz1'), 'XYZ2' => array('XYZ2'), 'abc2' => array('abc2'), 'ABC1' => array('ABC1'), 'def1' => array('def1'));
     $this->assertEquals(array('ABC1' => array('ABC1'), 'abc2' => array('abc2'), 'def1' => array('def1'), 'xyz1' => array('xyz1'), 'XYZ2' => array('XYZ2')), get_importers());
     $wp_importers = $_wp_importers;
     // Restore global state
 }
开发者ID:boonebgorges,项目名称:wp,代码行数:10,代码来源:import.php

示例2: _e

    _e('ERROR:');
    ?>
</strong> <?php 
    printf(__('The <strong>%s</strong> importer is invalid or is not installed.'), esc_html($_GET['invalid']));
    ?>
                </p></div>
        <?php 
}
?>
        <p><?php 
_e('If you have posts or comments in another system, WordPress can import those into this site. To get started, choose a system to import from below:');
?>
</p>

        <?php 
$importers = get_importers();
// If a popular importer is not registered, create a dummy registration that links to the plugin installer.
foreach ($popular_importers as $pop_importer => $pop_data) {
    if (isset($importers[$pop_importer])) {
        continue;
    }
    if (isset($importers[$pop_data['importer-id']])) {
        continue;
    }
    $importers[$pop_data['importer-id']] = array($pop_data['name'], $pop_data['description'], 'install' => $pop_data['plugin-slug']);
}
if (empty($importers)) {
    echo '<p>' . __('No importers are available.') . '</p>';
    // TODO: make more helpful
} else {
    uasort($importers, '_usort_by_first_member');
开发者ID:ajspencer,项目名称:NCSSM-SG-WordPress,代码行数:31,代码来源:import.php

示例3: register_exporting_handler

    }
}
register_exporting_handler(new MW_CLIExportingHandler());
miniwiki_boot();
if ($argc < 2) {
    echo MW_NAME, ' ', MW_VERSION, ' (c)2005,2006 Stepan Roh <src@srnet.cz>', "\n";
    ?>

Usage: <?php 
    echo $argv[0];
    ?>
 [--omit-history] [--force-import] file dataspace[:resource_prefix]*

Available formats:
<?php 
    foreach (get_importers() as $importer) {
        echo '  ' . $importer->get_format() . "\n";
    }
    exit;
}
array_shift($argv);
$with_history = true;
$force_import = false;
if ($argv[0] === '--omit-history') {
    $with_history = false;
    array_shift($argv);
}
if ($argv[0] === '--force-import') {
    $force_import = true;
    array_shift($argv);
}
开发者ID:SnowyYANG,项目名称:miniwiki,代码行数:31,代码来源:import.php


注:本文中的get_importers函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。