<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[3328] sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli: Plugin Directory: Import tags and map them to categories.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://meta.trac.wordpress.org/changeset/3328">3328</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://meta.trac.wordpress.org/changeset/3328","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>obenland</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2016-06-11 08:43:06 +0000 (Sat, 11 Jun 2016)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Plugin Directory: Import tags and map them to categories.
Maps existing tags, that are part of the top 1000 most used tags, to their new
categories. Mapping only occurs for up to three categories and only if there
are no categories set yet.
H/t samuelsidler for putting together the tag/category spreadsheet.
See <a href="http://meta.trac.wordpress.org/ticket/1573">#1573</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectorycliclassimportphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-import.php</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectorycliclasstagtocategoryphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-tag-to-category.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectorycliclassimportphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-import.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-import.php 2016-06-09 23:03:34 UTC (rev 3327)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-import.php 2016-06-11 08:43:06 UTC (rev 3328)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -78,7 +78,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $status = 'disabled';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $plugin ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! $plugin ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $plugin = Plugin_Directory::create_plugin_post( array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'slug' => $plugin_slug,
</span><span class="cx" style="display: block; padding: 0 10px"> 'status' => $status,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -131,6 +131,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> wp_update_post( $plugin );
</span><span class="cx" style="display: block; padding: 0 10px"> remove_filter( 'wp_insert_post_data', array( $this, 'filter_wp_insert_post_data' ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Set categories if there aren't any yet. wp-admin takes precedent.
+ if ( ! wp_get_post_terms( $plugin->ID, 'plugin_category', array( 'fields' => 'ids' ) ) ) {
+ wp_set_post_terms( $plugin->ID, Tag_To_Category::map( $readme->tags ), 'plugin_category' );
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $this->readme_fields as $readme_field ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // Don't change the tested version if a newer version was specified through wp-admin
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'tested' == $readme_field && version_compare( get_post_meta( $plugin->ID, 'tested', true ), $readme->$readme_field, '>' ) ) {
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectorycliclasstagtocategoryphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-tag-to-category.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-tag-to-category.php (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-tag-to-category.php 2016-06-11 08:43:06 UTC (rev 3328)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,578 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+namespace WordPressdotorg\Plugin_Directory\CLI;
+
+/**
+ * The functionality to map tags to Plugin Categories.
+ *
+ * @package WordPressdotorg\Plugin_Directory\CLI
+ */
+class Tag_To_Category {
+
+ /**
+ * @static
+ *
+ * @var array
+ */
+ public static $map = array(
+ 'accessibility' => 'accessibility',
+ 'accessible' => 'accessibility',
+ 'ads' => 'advertising',
+ 'affiliate' => 'advertising',
+ 'advertising' => 'advertising',
+ 'adsense' => 'advertising',
+ 'ad' => 'advertising',
+ 'advertisement' => 'advertising',
+ 'monetization' => 'advertising',
+ 'affiliates' => 'advertising',
+ 'affiliate-marketing' => 'advertising',
+ 'google-adsense' => 'advertising',
+ 'advertise' => 'advertising',
+ 'analytics' => 'analytics',
+ 'stats' => 'analytics',
+ 'statistics' => 'analytics',
+ 'tracking' => 'analytics',
+ 'google-analytics' => 'analytics',
+ 'counter' => 'analytics',
+ 'visits' => 'analytics',
+ 'referrer' => 'analytics',
+ 'hits' => 'analytics',
+ 'statistic' => 'analytics',
+ 'stat' => 'analytics',
+ 'sports' => 'arts-and-entertainment',
+ 'games' => 'arts-and-entertainment',
+ 'football' => 'arts-and-entertainment',
+ 'game' => 'arts-and-entertainment',
+ 'soccer' => 'arts-and-entertainment',
+ 'movies' => 'arts-and-entertainment',
+ 'christmas' => 'arts-and-entertainment',
+ 'sport' => 'arts-and-entertainment',
+ 'login' => 'authentication',
+ 'authentication' => 'authentication',
+ 'register' => 'authentication',
+ 'recaptcha' => 'authentication',
+ 'oauth' => 'authentication',
+ 'logout' => 'authentication',
+ 'custom-login' => 'authentication',
+ 'username' => 'authentication',
+ 'wp-login' => 'authentication',
+ 'auth' => 'authentication',
+ 'openid' => 'authentication',
+ 'real-estate' => 'business',
+ 'business' => 'business',
+ 'travel' => 'business',
+ 'restaurant' => 'business',
+ 'food' => 'business',
+ 'jobs' => 'business',
+ 'church' => 'business',
+ 'idx' => 'business',
+ 'events' => 'calendar-and-events',
+ 'calendar' => 'calendar-and-events',
+ 'event' => 'calendar-and-events',
+ 'schedule' => 'calendar-and-events',
+ 'booking' => 'calendar-and-events',
+ 'countdown' => 'calendar-and-events',
+ 'scheduling' => 'calendar-and-events',
+ 'event-calendar' => 'calendar-and-events',
+ 'booking-calendar' => 'calendar-and-events',
+ 'ticketing' => 'calendar-and-events',
+ 'clock' => 'calendar-and-events',
+ 'appointment' => 'calendar-and-events',
+ 'event-management' => 'calendar-and-events',
+ 'events-calendar' => 'calendar-and-events',
+ 'dates' => 'calendar-and-events',
+ 'bookings' => 'calendar-and-events',
+ 'meeting' => 'calendar-and-events',
+ 'conference' => 'calendar-and-events',
+ 'availability-calendar' => 'calendar-and-events',
+ 'booking-system' => 'calendar-and-events',
+ 'email' => 'communication',
+ 'mail' => 'communication',
+ 'chat' => 'communication',
+ 'subscribe' => 'communication',
+ 'subscription' => 'communication',
+ 'mailchimp' => 'communication',
+ 'email-marketing' => 'communication',
+ 'message' => 'communication',
+ 'live-chat' => 'communication',
+ 'sms' => 'communication',
+ 'mailing-list' => 'communication',
+ 'subscribers' => 'communication',
+ 'e-mail' => 'communication',
+ 'smtp' => 'communication',
+ 'aweber' => 'communication',
+ 'email-form' => 'communication',
+ 'livechat' => 'communication',
+ 'subscriptions' => 'communication',
+ 'newsletters' => 'communication',
+ 'gmail' => 'communication',
+ 'messaging' => 'communication',
+ 'wp_mail' => 'communication',
+ 'online-chat' => 'communication',
+ 'emails' => 'communication',
+ 'messages' => 'communication',
+ 'live-chat-software' => 'communication',
+ 'subscriber' => 'communication',
+ 'wordpress-chat' => 'communication',
+ 'free-chat' => 'communication',
+ 'magazine' => 'communication',
+ 'chat-online' => 'communication',
+ 'form' => 'contact-forms',
+ 'contact-form' => 'contact-forms',
+ 'contact' => 'contact-forms',
+ 'newsletter' => 'contact-forms',
+ 'forms' => 'contact-forms',
+ 'feedback' => 'contact-forms',
+ 'contact-form-7' => 'contact-forms',
+ 'gravity-forms' => 'contact-forms',
+ 'survey' => 'contact-forms',
+ 'form-builder' => 'contact-forms',
+ 'contact-us' => 'contact-forms',
+ 'contact-forms' => 'contact-forms',
+ 'contact-form-plugin' => 'contact-forms',
+ 'cf7' => 'contact-forms',
+ 'feedback-form' => 'contact-forms',
+ 'gravityforms' => 'contact-forms',
+ 'gravity' => 'contact-forms',
+ 'widget' => 'customization',
+ 'shortcode' => 'customization',
+ 'sidebar' => 'customization',
+ 'widgets' => 'customization',
+ 'menu' => 'customization',
+ 'navigation' => 'customization',
+ 'shortcodes' => 'customization',
+ 'profile' => 'customization',
+ 'template' => 'customization',
+ 'themes' => 'customization',
+ 'customize' => 'customization',
+ 'portfolio' => 'customization',
+ 'genesis' => 'customization',
+ 'menus' => 'customization',
+ 'customizer' => 'customization',
+ 'accordion' => 'customization',
+ 'templates' => 'customization',
+ 'woothemes' => 'customization',
+ 'customization' => 'customization',
+ 'genesiswp' => 'customization',
+ 'sidebars' => 'customization',
+ 'short-code' => 'customization',
+ 'customizable' => 'customization',
+ 'font-awesome' => 'customization',
+ 'page-builder' => 'customization',
+ 'studiopress' => 'customization',
+ 'configurable' => 'customization',
+ 'typography' => 'customization',
+ 'sidebar-widget' => 'customization',
+ 'comments' => 'discussions-and-community',
+ 'buddypress' => 'discussions-and-community',
+ 'comment' => 'discussions-and-community',
+ 'captcha' => 'discussions-and-community',
+ 'bbpress' => 'discussions-and-community',
+ 'community' => 'discussions-and-community',
+ 'avatar' => 'discussions-and-community',
+ 'forum' => 'discussions-and-community',
+ 'groups' => 'discussions-and-community',
+ 'gravatar' => 'discussions-and-community',
+ 'profiles' => 'discussions-and-community',
+ 'forums' => 'discussions-and-community',
+ 'discussion' => 'discussions-and-community',
+ 'moderation' => 'discussions-and-community',
+ 'trackback' => 'discussions-and-community',
+ 'pingback' => 'discussions-and-community',
+ 'disqus' => 'discussions-and-community',
+ 'commenting' => 'discussions-and-community',
+ 'woocommerce' => 'ecommerce',
+ 'ecommerce' => 'ecommerce',
+ 'e-commerce' => 'ecommerce',
+ 'shop' => 'ecommerce',
+ 'paypal' => 'ecommerce',
+ 'payment' => 'ecommerce',
+ 'store' => 'ecommerce',
+ 'amazon' => 'ecommerce',
+ 'products' => 'ecommerce',
+ 'cart' => 'ecommerce',
+ 'payment-gateway' => 'ecommerce',
+ 'commerce' => 'ecommerce',
+ 'sales' => 'ecommerce',
+ 'shipping' => 'ecommerce',
+ 'checkout' => 'ecommerce',
+ 'shopping' => 'ecommerce',
+ 'shopping-cart' => 'ecommerce',
+ 'sell' => 'ecommerce',
+ 'money' => 'ecommerce',
+ 'wp-e-commerce' => 'ecommerce',
+ 'easy-digital-downloads' => 'ecommerce',
+ 'wordpress-ecommerce' => 'ecommerce',
+ 'edd' => 'ecommerce',
+ 'monetize' => 'ecommerce',
+ 'donate' => 'ecommerce',
+ 'payments' => 'ecommerce',
+ 'donation' => 'ecommerce',
+ 'revenue' => 'ecommerce',
+ 'donations' => 'ecommerce',
+ 'bitcoin' => 'ecommerce',
+ 'make-money' => 'ecommerce',
+ 'tax' => 'ecommerce',
+ 'price' => 'ecommerce',
+ 'digital-downloads' => 'ecommerce',
+ 'coupon' => 'ecommerce',
+ 'currency' => 'ecommerce',
+ 'inventory' => 'ecommerce',
+ 'wp-ecommerce' => 'ecommerce',
+ 'credit-card' => 'ecommerce',
+ 'stripe' => 'ecommerce',
+ 'eshop' => 'ecommerce',
+ 'coupons' => 'ecommerce',
+ 'selling' => 'ecommerce',
+ 'online-store' => 'ecommerce',
+ 'discount' => 'ecommerce',
+ 'earn-money' => 'ecommerce',
+ 'campaign' => 'ecommerce',
+ 'woo-commerce' => 'ecommerce',
+ 'charity' => 'ecommerce',
+ 'ebay' => 'ecommerce',
+ 'woo' => 'ecommerce',
+ 'billing' => 'ecommerce',
+ 'fundraising' => 'ecommerce',
+ 'invoice' => 'ecommerce',
+ 'jigoshop' => 'ecommerce',
+ 'shopp' => 'ecommerce',
+ 'e-downloads' => 'ecommerce',
+ 'editor' => 'editor-and-writing',
+ 'tinymce' => 'editor-and-writing',
+ 'formatting' => 'editor-and-writing',
+ 'wysiwyg' => 'editor-and-writing',
+ 'visual-editor' => 'editor-and-writing',
+ 'writing' => 'editor-and-writing',
+ 'editing' => 'editor-and-writing',
+ 'customer-support' => 'education-and-support',
+ 'education' => 'education-and-support',
+ 'live-support' => 'education-and-support',
+ 'helpdesk' => 'education-and-support',
+ 'help-desk' => 'education-and-support',
+ 'online-support' => 'education-and-support',
+ 'wiki' => 'education-and-support',
+ 'live-help' => 'education-and-support',
+ 'customer-service' => 'education-and-support',
+ 'wikipedia' => 'education-and-support',
+ 'dictionary' => 'education-and-support',
+ 'language' => 'language-tools',
+ 'translation' => 'language-tools',
+ 'multilingual' => 'language-tools',
+ 'i18n' => 'language-tools',
+ 'localization' => 'language-tools',
+ 'wpml' => 'language-tools',
+ 'multilanguage' => 'language-tools',
+ 'l10n' => 'language-tools',
+ 'languages' => 'language-tools',
+ 'international' => 'language-tools',
+ 'bilingual' => 'language-tools',
+ 'maps' => 'maps-and-location',
+ 'map' => 'maps-and-location',
+ 'google-maps' => 'maps-and-location',
+ 'location' => 'maps-and-location',
+ 'geo' => 'maps-and-location',
+ 'google-map' => 'maps-and-location',
+ 'geolocation' => 'maps-and-location',
+ 'address' => 'maps-and-location',
+ 'latitude' => 'maps-and-location',
+ 'mapping' => 'maps-and-location',
+ 'longitude' => 'maps-and-location',
+ 'gps' => 'maps-and-location',
+ 'geocoding' => 'maps-and-location',
+ 'foursquare' => 'maps-and-location',
+ 'images' => 'media',
+ 'image' => 'media',
+ 'gallery' => 'media',
+ 'media' => 'media',
+ 'video' => 'media',
+ 'photo' => 'media',
+ 'photos' => 'media',
+ 'slideshow' => 'media',
+ 'picture' => 'media',
+ 'pictures' => 'media',
+ 'thumbnail' => 'media',
+ 'upload' => 'media',
+ 'music' => 'media',
+ 'audio' => 'media',
+ 'thumbnails' => 'media',
+ 'icons' => 'media',
+ 'carousel' => 'media',
+ 'player' => 'media',
+ 'icon' => 'media',
+ 'mp3' => 'media',
+ 'videos' => 'media',
+ 'image-slider' => 'media',
+ 'pdf' => 'media',
+ 'animation' => 'media',
+ 'attachment' => 'media',
+ 'featured-image' => 'media',
+ 'attachments' => 'media',
+ 'image-gallery' => 'media',
+ 'album' => 'media',
+ 'playlist' => 'media',
+ 'responsive-slider' => 'media',
+ 'photo-gallery' => 'media',
+ 'photography' => 'media',
+ 'galleries' => 'media',
+ 'media-library' => 'media',
+ 'picasa' => 'media',
+ 'photo-albums' => 'media',
+ 'nextgen' => 'media',
+ 'favicon' => 'media',
+ 'wordpress-slider' => 'media',
+ 'nextgen-gallery' => 'media',
+ 'slides' => 'media',
+ 'video-gallery' => 'media',
+ 'animated' => 'media',
+ 'rotate' => 'media',
+ 'radio' => 'media',
+ 'video-player' => 'media',
+ 'responsive-slideshow' => 'media',
+ 'slide-show' => 'media',
+ 'mp4' => 'media',
+ 'streaming' => 'media',
+ 'image-slideshow' => 'media',
+ 'photo-slider' => 'media',
+ 'movie' => 'media',
+ 'swf' => 'media',
+ 'showcase' => 'media',
+ 'wordpress-gallery' => 'media',
+ 'thickbox' => 'media',
+ 'responsive-gallery' => 'media',
+ 'jpg' => 'media',
+ 'albums' => 'media',
+ 'screenshot' => 'media',
+ 'embedding' => 'media',
+ 'facebook-plugin' => 'media',
+ 'photo-album' => 'media',
+ 'post-thumbnail' => 'media',
+ 'multisite' => 'multisite',
+ 'wpmu' => 'multisite',
+ 'network' => 'multisite',
+ 'mu' => 'multisite',
+ 'multi-site' => 'multisite',
+ 'wordpress-mu' => 'multisite',
+ 'cache' => 'performance',
+ 'speed' => 'performance',
+ 'optimize' => 'performance',
+ 'optimization' => 'performance',
+ 'maintenance' => 'performance',
+ 'caching' => 'performance',
+ 'monitor' => 'performance',
+ 'fast' => 'performance',
+ 'rating' => 'ratings-and-reviews',
+ 'reviews' => 'ratings-and-reviews',
+ 'vote' => 'ratings-and-reviews',
+ 'testimonials' => 'ratings-and-reviews',
+ 'review' => 'ratings-and-reviews',
+ 'poll' => 'ratings-and-reviews',
+ 'voting' => 'ratings-and-reviews',
+ 'quiz' => 'ratings-and-reviews',
+ 'testimonial' => 'ratings-and-reviews',
+ 'ratings' => 'ratings-and-reviews',
+ 'polls' => 'ratings-and-reviews',
+ 'recommendations' => 'ratings-and-reviews',
+ 'rate' => 'ratings-and-reviews',
+ 'ranking' => 'ratings-and-reviews',
+ 'security' => 'security-and-spam-protection',
+ 'spam' => 'security-and-spam-protection',
+ 'performance' => 'security-and-spam-protection',
+ 'password' => 'security-and-spam-protection',
+ 'anti-spam' => 'security-and-spam-protection',
+ 'privacy' => 'security-and-spam-protection',
+ 'protection' => 'security-and-spam-protection',
+ 'antispam' => 'security-and-spam-protection',
+ 'secure' => 'security-and-spam-protection',
+ 'protect' => 'security-and-spam-protection',
+ 'ssl' => 'security-and-spam-protection',
+ 'permissions' => 'security-and-spam-protection',
+ 'akismet' => 'security-and-spam-protection',
+ 'https' => 'security-and-spam-protection',
+ 'blacklist' => 'security-and-spam-protection',
+ 'wordpress-security' => 'security-and-spam-protection',
+ 'firewall' => 'security-and-spam-protection',
+ 'ban' => 'security-and-spam-protection',
+ 'monitoring' => 'security-and-spam-protection',
+ 'malware' => 'security-and-spam-protection',
+ 'seo' => 'seo-and-marketing',
+ 'marketing' => 'seo-and-marketing',
+ 'search-engine-optimization' => 'seo-and-marketing',
+ 'sitemap' => 'seo-and-marketing',
+ 'traffic' => 'seo-and-marketing',
+ 'bing' => 'seo-and-marketing',
+ 'conversion' => 'seo-and-marketing',
+ 'search-engine' => 'seo-and-marketing',
+ 'wordpress-seo' => 'seo-and-marketing',
+ 'pagerank' => 'seo-and-marketing',
+ 'robots' => 'seo-and-marketing',
+ 'yandex' => 'seo-and-marketing',
+ 'schemaorg' => 'seo-and-marketing',
+ 'sitemaps' => 'seo-and-marketing',
+ 'lead-generation' => 'seo-and-marketing',
+ 'rank' => 'seo-and-marketing',
+ 'opengraph' => 'seo-and-marketing',
+ 'marketing-automation' => 'seo-and-marketing',
+ 'xml-sitemap' => 'seo-and-marketing',
+ 'schema' => 'seo-and-marketing',
+ 'twitter' => 'social-sharing',
+ 'facebook' => 'social-sharing',
+ 'social' => 'social-sharing',
+ 'youtube' => 'social-sharing',
+ 'share' => 'social-sharing',
+ 'embed' => 'social-sharing',
+ 'social-media' => 'social-sharing',
+ 'sharing' => 'social-sharing',
+ 'linkedin' => 'social-sharing',
+ 'tweet' => 'social-sharing',
+ 'flickr' => 'social-sharing',
+ 'pinterest' => 'social-sharing',
+ 'google-plus' => 'social-sharing',
+ 'yahoo' => 'social-sharing',
+ 'instagram' => 'social-sharing',
+ 'vimeo' => 'social-sharing',
+ 'digg' => 'social-sharing',
+ 'bookmark' => 'social-sharing',
+ 'bookmarks' => 'social-sharing',
+ 'reddit' => 'social-sharing',
+ 'facebook-like' => 'social-sharing',
+ 'social-network' => 'social-sharing',
+ 'stumbleupon' => 'social-sharing',
+ 'social-share' => 'social-sharing',
+ 'tweets' => 'social-sharing',
+ 'tumblr' => 'social-sharing',
+ 'social-bookmarking' => 'social-sharing',
+ 'oembed' => 'social-sharing',
+ 'facebook-share' => 'social-sharing',
+ 'social-sharing' => 'social-sharing',
+ 'myspace' => 'social-sharing',
+ 'follow' => 'social-sharing',
+ 'open-graph' => 'social-sharing',
+ 'social-networks' => 'social-sharing',
+ 'social-networking' => 'social-sharing',
+ 'qr-code' => 'social-sharing',
+ 'podcast' => 'social-sharing',
+ 'share-buttons' => 'social-sharing',
+ 'twitter-widget' => 'social-sharing',
+ 'like-button' => 'social-sharing',
+ 'dailymotion' => 'social-sharing',
+ 'social-icons' => 'social-sharing',
+ 'twitter-share' => 'social-sharing',
+ 'google-buzz' => 'social-sharing',
+ 'stream' => 'social-sharing',
+ 'itunes' => 'social-sharing',
+ 'social-bookmarks' => 'social-sharing',
+ 'addthis' => 'social-sharing',
+ 'social-buttons' => 'social-sharing',
+ 'blogger' => 'social-sharing',
+ 'facebook-like-box' => 'social-sharing',
+ 'facebook-like-button' => 'social-sharing',
+ 'lastfm' => 'social-sharing',
+ 'share-button' => 'social-sharing',
+ 'facebook-widget' => 'social-sharing',
+ 'social-plugin' => 'social-sharing',
+ 'fb' => 'social-sharing',
+ 'social-login' => 'social-sharing',
+ 'friendfeed' => 'social-sharing',
+ 'social-plugins' => 'social-sharing',
+ 'sharethis' => 'social-sharing',
+ 'twitter-feed' => 'social-sharing',
+ 'retweet' => 'social-sharing',
+ 'soundcloud' => 'social-sharing',
+ 'like-box' => 'social-sharing',
+ 'social-widget' => 'social-sharing',
+ 'likes' => 'social-sharing',
+ 'tweet-button' => 'social-sharing',
+ 'vkontakte' => 'social-sharing',
+ 'slider-plugin' => 'social-sharing',
+ 'google-plus-one' => 'social-sharing',
+ 'googleplus' => 'social-sharing',
+ 'facebook-button' => 'social-sharing',
+ 'twitter-button' => 'social-sharing',
+ 'facebook-page' => 'social-sharing',
+ 'msn' => 'social-sharing',
+ 'tags' => 'taxonomy',
+ 'categories' => 'taxonomy',
+ 'tag' => 'taxonomy',
+ 'taxonomy' => 'taxonomy',
+ 'keywords' => 'taxonomy',
+ 'taxonomies' => 'taxonomy',
+ 'terms' => 'taxonomy',
+ 'tagging' => 'taxonomy',
+ 'keyword' => 'taxonomy',
+ 'term' => 'taxonomy',
+ 'custom-taxonomy' => 'taxonomy',
+ 'custom-taxonomies' => 'taxonomy',
+ 'tag-cloud' => 'taxonomy',
+ 'meta-keywords' => 'taxonomy',
+ 'meta-tags' => 'taxonomy',
+ 'registration' => 'user-management',
+ 'members' => 'user-management',
+ 'membership' => 'user-management',
+ 'crm' => 'user-management',
+ 'signup' => 'user-management',
+ 'private' => 'user-management',
+ 'member' => 'user-management',
+ 'contacts' => 'user-management',
+ 'friends' => 'user-management',
+ 'tickets' => 'user-management',
+ 'roles' => 'user-management',
+ 'customer' => 'user-management',
+ 'ticket' => 'user-management',
+ 'team' => 'user-management',
+ 'user-profile' => 'user-management',
+ 'jquery' => 'utilities-and-tools',
+ 'ajax' => 'utilities-and-tools',
+ 'javascript' => 'utilities-and-tools',
+ 'css' => 'utilities-and-tools',
+ 'database' => 'utilities-and-tools',
+ 'import' => 'utilities-and-tools',
+ 'backup' => 'utilities-and-tools',
+ 'export' => 'utilities-and-tools',
+ 'debug' => 'utilities-and-tools',
+ 'related-posts' => 'utilities-and-tools',
+ 'weather' => 'utilities-and-tools',
+ 'tool' => 'utilities-and-tools',
+ 'calculator' => 'utilities-and-tools',
+ 'tools' => 'utilities-and-tools',
+ 'permalinks' => 'utilities-and-tools',
+ 'acf' => 'utilities-and-tools',
+ 'importer' => 'utilities-and-tools',
+ 'cdn' => 'utilities-and-tools',
+ 'mysql' => 'utilities-and-tools',
+ 'feedburner' => 'utilities-and-tools',
+ 'cron' => 'utilities-and-tools',
+ 'offline' => 'utilities-and-tools',
+ 'advanced-custom-fields' => 'utilities-and-tools',
+ 'bitly' => 'utilities-and-tools',
+ 's3' => 'utilities-and-tools',
+ 'mootools' => 'utilities-and-tools',
+ 'maintenance-mode' => 'utilities-and-tools',
+ 'shortlink' => 'utilities-and-tools',
+ 'converter' => 'utilities-and-tools',
+ 'migration' => 'utilities-and-tools',
+ 'dropbox' => 'utilities-and-tools',
+ 'tinyurl' => 'utilities-and-tools',
+ 'url-shortener' => 'utilities-and-tools',
+ 'sql' => 'utilities-and-tools',
+ 'debugging' => 'utilities-and-tools',
+ 'short-url' => 'utilities-and-tools',
+ );
+
+ /**
+ * Maps tags to plugin categories.
+ *
+ * @param array $tags Plugin tags from readme.txt.
+ * @return array
+ */
+ public static function map( $tags ) {
+ $categories = array();
+
+ foreach ( $tags as $tag ) {
+ if ( isset( self::$map[ $tag ] ) ) {
+ $categories[] = get_term_by( 'slug', self::$map[ $tag ], 'plugin_category' )->term_id;
+ }
+ }
+
+ return array_slice( array_unique( $categories ), 0, 3 );
+ }
+}
</ins><span class="cx" style="display: block; padding: 0 10px">Property changes on: sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-tag-to-category.php
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:eol-style</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+native
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span></div>
</body>
</html>