制限する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('site_transient_popular_importers_' . get_locale(), function($popular_importers){ | |
if ( is_array( $popular_importers ) && isset($popular_importers['importers']) ) { | |
// 適宜コメントアウトしてください | |
unset($popular_importers['importers']['blogger']); | |
unset($popular_importers['importers']['wpcat2tag']); | |
unset($popular_importers['importers']['livejournal']); | |
unset($popular_importers['importers']['movabletype']); | |
unset($popular_importers['importers']['opml']); | |
unset($popular_importers['importers']['rss']); | |
unset($popular_importers['importers']['tumblr']); | |
unset($popular_importers['importers']['wordpress']); | |
} else { | |
// 適宜コメントアウトしてください | |
$popular_importers = array( | |
'importers' => array( | |
'blogger' => array( | |
'name' => __( 'Blogger' ), | |
'description' => __( 'Install the Blogger importer to import posts, comments, and users from a Blogger blog.' ), | |
'plugin-slug' => 'blogger-importer', | |
'importer-id' => 'blogger', | |
), | |
'wpcat2tag' => array( | |
'name' => __( 'Categories and Tags Converter' ), | |
'description' => __( 'Install the category/tag converter to convert existing categories to tags or tags to categories, selectively.' ), | |
'plugin-slug' => 'wpcat2tag-importer', | |
'importer-id' => 'wp-cat2tag', | |
), | |
'livejournal' => array( | |
'name' => __( 'LiveJournal' ), | |
'description' => __( 'Install the LiveJournal importer to import posts from LiveJournal using their API.' ), | |
'plugin-slug' => 'livejournal-importer', | |
'importer-id' => 'livejournal', | |
), | |
'movabletype' => array( | |
'name' => __( 'Movable Type and TypePad' ), | |
'description' => __( 'Install the Movable Type importer to import posts and comments from a Movable Type or TypePad blog.' ), | |
'plugin-slug' => 'movabletype-importer', | |
'importer-id' => 'mt', | |
), | |
'opml' => array( | |
'name' => __( 'Blogroll' ), | |
'description' => __( 'Install the blogroll importer to import links in OPML format.' ), | |
'plugin-slug' => 'opml-importer', | |
'importer-id' => 'opml', | |
), | |
'rss' => array( | |
'name' => __( 'RSS' ), | |
'description' => __( 'Install the RSS importer to import posts from an RSS feed.' ), | |
'plugin-slug' => 'rss-importer', | |
'importer-id' => 'rss', | |
), | |
'tumblr' => array( | |
'name' => __( 'Tumblr' ), | |
'description' => __( 'Install the Tumblr importer to import posts & media from Tumblr using their API.' ), | |
'plugin-slug' => 'tumblr-importer', | |
'importer-id' => 'tumblr', | |
), | |
'wordpress' => array( | |
'name' => 'WordPress', | |
'description' => __( 'Install the WordPress importer to import posts, pages, comments, custom fields, categories, and tags from a WordPress export file.' ), | |
'plugin-slug' => 'wordpress-importer', | |
'importer-id' => 'wordpress', | |
), | |
), | |
'translated' => true, | |
); | |
} | |
return $popular_importers; | |
}); |
まったく表示しない
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('site_transient_popular_importers_' . get_locale(), function($popular_importers){ | |
return array( | |
'importers' => array(), | |
'translated' => true, | |
); | |
}); |
コメントを残す