<!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" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { 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, #msg p { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul { overflow: auto; }
#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>
<title>[11916] branches/2.8/wp-admin/import/jkw.php: Retire Jerome'
s keywords importer</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/11916">11916</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2009-09-11 17:55:18 +0000 (Fri, 11 Sep 2009)</dd>
</dl>
<h3>Log Message</h3>
<pre>Retire Jerome's keywords importer</pre>
<h3>Removed Paths</h3>
<ul>
<li><a href="#branches28wpadminimportjkwphp">branches/2.8/wp-admin/import/jkw.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="branches28wpadminimportjkwphp"></a>
<div class="delfile"><h4>Deleted: branches/2.8/wp-admin/import/jkw.php (11915 => 11916)</h4>
<pre class="diff"><span>
<span class="info">--- branches/2.8/wp-admin/import/jkw.php        2009-09-11 17:53:39 UTC (rev 11915)
+++ branches/2.8/wp-admin/import/jkw.php        2009-09-11 17:55:18 UTC (rev 11916)
</span><span class="lines">@@ -1,192 +0,0 @@
</span><del>-<?php
-/**
- * Jeromes Keyword Plugin Importer
- *
- * @package WordPress
- * @subpackage Importer
- */
-
-/**
- * Jeromes Keyword Plugin Importer class
- *
- * Will convert Jeromes Keyword Plugin tags to WordPress taxonomy tags.
- *
- * @since 2.3
- */
-class JeromesKeyword_Import {
-
-        function header() {
-                echo '<div class="wrap">';
-                screen_icon();
-                echo '<h2>'.__('Import Jerome&#8217;s Keywords').'</h2>';
-                echo '<p>'.__('Steps may take a few minutes depending on the size of your database. Please be patient.').'<br /><br /></p>';
-        }
-
-        function footer() {
-                echo '</div>';
-        }
-
-        function greet() {
-                echo '<div class="narrow">';
-                echo '<p>'.__('Howdy! This imports tags from Jerome&#8217;s Keywords into WordPress tags.').'</p>';
-                echo '<p>'.__('This is suitable for Jerome&#8217;s Keywords version 1.x and 2.0a.').'</p>';
-                echo '<p><strong>'.__('All existing Jerome&#8217;s Keywords will be removed after import.').'</strong></p>';
-                echo '<p><strong>'.__('Don&#8217;t be stupid - backup your database before proceeding!').'</strong></p>';
-                echo '<form action="admin.php?import=jkw&amp;step=1" method="post">';
-                wp_nonce_field('import-jkw');
-                echo '<p class="submit"><input type="submit" name="submit" class="button" value="'.esc_attr__('Import Version 1.x').'" /></p>';
-                echo '</form>';
-                echo '<form action="admin.php?import=jkw&amp;step=3" method="post">';
-                wp_nonce_field('import-jkw');
-                echo '<p class="submit"><input type="submit" name="submit" class="button" value="'.esc_attr__('Import Version 2.0a').'" /></p>';
-                echo '</form>';
-                echo '</div>';
-        }
-
-        function dispatch() {
-                if ( empty($_GET['step']) )
-                        $step = 0;
-                else
-                        $step = absint($_GET['step']);
-
-                // load the header
-                $this->header();
-
-                switch ( $step ) {
-                        case 0 :
-                                $this->greet();
-                                break;
-                        case 1 :
-                                check_admin_referer('import-jkw');
-                                $this->check_V1_post_keyword( true );
-                                break;
-                        case 2 :
-                                check_admin_referer('import-jkw');
-                                $this->check_V1_post_keyword( false );
-                                break;
-                        case 3 :
-                                check_admin_referer('import-jkw');
-                                $this->check_V2_post_keyword( true );
-                                break;
-                        case 4 :
-                                check_admin_referer('import-jkw');
-                                $this->check_V2_post_keyword( false );
-                                break;
-                        case 5:
-                                check_admin_referer('import-jkw');
-                                $this->cleanup_V2_import();
-                                break;
-                        case 6:
-                                $this->done();
-                                break;
-                }
-
-                // load the footer
-                $this->footer();
-        }
-
-        function check_V1_post_keyword($precheck = true) {
-                global $wpdb;
-
-                echo '<div class="narrow">';
-                echo '<p><h3>'.__('Reading Jerome&#8217;s Keywords Tags&#8230;').'</h3></p>';
-
-                // import Jerome's Keywords tags
-                $metakeys = $wpdb->get_results("SELECT post_id, meta_id, meta_key, meta_value FROM $wpdb->postmeta WHERE $wpdb->postmeta.meta_key = 'keywords'");
-                if ( !is_array($metakeys)) {
-                        echo '<p>' . __('No Tags Found!') . '</p>';
-                        return false;
-                } else {
-                        $count = count($metakeys);
-                        echo '<p>' . sprintf( _n('Done! <strong>%s</strong> post with tags were read.', 'Done! <strong>%s</strong> posts with tags were read.', $count), $count ) . '<br /></p>';
-                        echo '<ul>';
-                        foreach ( $metakeys as $post_meta ) {
-                                if ( $post_meta->meta_value != '' ) {
-                                        $post_keys = explode(',', $post_meta->meta_value);
-                                        foreach ( $post_keys as $keyword ) {
-                                                $keyword = addslashes(trim($keyword));
-                                                if ( '' != $keyword ) {
-                                                        echo '<li>' . $post_meta->post_id . '&nbsp;-&nbsp;' . $keyword . '</li>';
-                                                        if ( !$precheck )
-                                                                wp_add_post_tags($post_meta->post_id, $keyword);
-                                                }
-                                        }
-                                }
-                                if ( !$precheck )
-                                        delete_post_meta($post_meta->post_id, 'keywords');
-                        }
-                        echo '</ul>';
-                }
-
-                echo '<form action="admin.php?import=jkw&amp;step='.($precheck? 2:6).'" method="post">';
-                wp_nonce_field('import-jkw');
-                echo '<p class="submit"><input type="submit" name="submit" class="button" value="'.esc_attr__('Next').'" /></p>';
-                echo '</form>';
-                echo '</div>';
-        }
-
-        function check_V2_post_keyword($precheck = true) {
-                global $wpdb;
-
-                echo '<div class="narrow">';
-                echo '<p><h3>'.__('Reading Jerome&#8217;s Keywords Tags&#8230;').'</h3></p>';
-
-                // import Jerome's Keywords tags
-                $tablename = $wpdb->prefix . substr(get_option('jkeywords_keywords_table'), 1, -1);
-                $metakeys = $wpdb->get_results("SELECT post_id, tag_name FROM $tablename");
-                if ( !is_array($metakeys) ) {
-                        echo '<p>' . __('No Tags Found!') . '</p>';
-                        return false;
-                } else {
-                        $count = count($metakeys);
-                        echo '<p>' . sprintf( _n('Done! <strong>%s</strong> tag were read.', 'Done! <strong>%s</strong> tags were read.', $count), $count ) . '<br /></p>';
-                        echo '<ul>';
-                        foreach ( $metakeys as $post_meta ) {
-                                $keyword = addslashes(trim($post_meta->tag_name));
-                                if ( $keyword != '' ) {
-                                        echo '<li>' . $post_meta->post_id . '&nbsp;-&nbsp;' . $keyword . '</li>';
-                                        if ( !$precheck )
-                                                wp_add_post_tags($post_meta->post_id, $keyword);
-                                }
-                        }
-                echo '</ul>';
-                }
-                echo '<form action="admin.php?import=jkw&amp;step='.($precheck? 4:5).'" method="post">';
-                wp_nonce_field('import-jkw');
-                echo '<p class="submit"><input type="submit" name="submit" class="button" value="'.esc_attr__('Next').'" /></p>';
-                echo '</form>';
-                echo '</div>';
-        }
-
-        function cleanup_V2_import() {
-                global $wpdb;
-
-                /* options from V2.0a (jeromes-keywords.php) */
-                $options = array('version', 'keywords_table', 'query_varname', 'template', 'meta_always_include', 'meta_includecats', 'meta_autoheader', 'search_strict', 'use_feed_cats', 'post_linkformat', 'post_tagseparator', 'post_includecats', 'post_notagstext', 'cloud_linkformat', 'cloud_tagseparator', 'cloud_includecats', 'cloud_sortorder', 'cloud_displaymax', 'cloud_displaymin', 'cloud_scalemax', 'cloud_scalemin');
-
-                $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . substr(get_option('jkeywords_keywords_table'), 1, -1));
-
-                foreach ( $options as $o )
-                        delete_option('jkeywords_' . $o);
-
-                $this->done();
-        }
-
-        function done() {
-                echo '<div class="narrow">';
-                echo '<p><h3>'.__('Import Complete!').'</h3></p>';
-                echo '</div>';
-        }
-
-        function JeromesKeyword_Import() {
-        }
-
-}
-
-// create the import object
-$jkw_import = new JeromesKeyword_Import();
-
-// add it to the import page!
-register_importer('jkw', 'Jerome&#8217;s Keywords', __('Import Jerome&#8217;s Keywords into WordPress tags.'), array($jkw_import, 'dispatch'));
-
-?>
</del></span></pre>
</div>
</div>
</body>
</html>