Changeset 6025 for trunk/wp-admin/import/jkw.php
- Timestamp:
- 09/03/2007 11:19:20 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/import/jkw.php
r5984 r6025 2 2 3 3 class JeromesKeyword_Import { 4 4 5 5 function header() { 6 6 echo '<div class="wrap">'; … … 30 30 } 31 31 32 32 33 33 function dispatch () { 34 34 if ( empty( $_GET['step'] ) ) { … … 37 37 $step = (int) $_GET['step']; 38 38 } 39 39 40 40 // load the header 41 41 $this->header(); 42 42 43 43 switch ( $step ) { 44 44 case 0 : … … 69 69 break; 70 70 } 71 71 72 72 // load the footer 73 73 $this->footer(); 74 74 } 75 76 75 76 77 77 function check_V1_post_keyword ( $precheck = true ) { 78 78 global $wpdb; 79 79 80 80 echo '<div class="narrow">'; 81 81 echo '<p><h3>'.__('Reading Jerome’s Keywords Tags…').'</h3></p>'; 82 82 83 83 // import Jerome's Keywords tags 84 84 $qry = "SELECT post_id, meta_id, meta_key, meta_value FROM $wpdb->postmeta WHERE $wpdb->postmeta.meta_key = 'keywords'"; … … 114 114 115 115 } 116 116 117 117 echo '<form action="admin.php?import=jkw&step='.($precheck? 2:6).'" method="post">'; 118 118 wp_nonce_field('import-jkw'); … … 125 125 function check_V2_post_keyword ( $precheck = true ) { 126 126 global $wpdb; 127 127 128 128 echo '<div class="narrow">'; 129 129 echo '<p><h3>'.__('Reading Jerome’s Keywords Tags…').'</h3></p>'; 130 130 131 131 // import Jerome's Keywords tags 132 132 $tablename = $wpdb->prefix . substr(get_option('jkeywords_keywords_table'), 1, -1); … … 140 140 $count = count($metakeys); 141 141 echo '<p>' . sprintf( __('Done! <strong>%s</strong> tags were read.'), $count ) . '<br /></p>'; 142 142 143 143 echo '<ul>'; 144 144 145 145 foreach($metakeys as $post_meta) { 146 146 $keyword = addslashes(trim($post_meta->tag_name)); 147 147 148 148 if ($keyword != ''){ 149 149 echo '<li>' . $post_meta->post_id . ' - ' . $keyword . '</li>'; … … 157 157 158 158 } 159 159 160 160 echo '<form action="admin.php?import=jkw&step='.($precheck? 4:5).'" method="post">'; 161 161 wp_nonce_field('import-jkw'); … … 175 175 'query_varname' => 'tag', // HTTP var name used for tag searches 176 176 'template' => 'keywords.php', // template file to use for displaying tag queries 177 177 178 178 'meta_always_include' => '', // meta keywords to always include 179 179 'meta_includecats' => 'default', // default' => include cats in meta keywords only for home page 180 180 // all' => includes cats on every page, none' => never included 181 181 182 182 'meta_autoheader' => '1', // automatically output meta keywords in header 183 183 'search_strict' => '1', // returns only exact tag matches if true 184 184 'use_feed_cats' => '1', // insert tags into feeds as categories 185 185 186 186 /* post tag options */ 187 187 'post_linkformat' => '', // post tag format (initialized to $link_localsearch) … … 189 189 'post_includecats' => '0', // include categories in post's tag list 190 190 'post_notagstext' => 'none', // text to display if no tags found 191 191 192 192 /* tag cloud options */ 193 193 'cloud_linkformat' => '', // post tag format (initialized to $link_tagcloud) … … 200 200 'cloud_scalemin' => '0' // minimum value for count scaling 201 201 ); 202 202 203 203 $tablename = $wpdb->prefix . substr(get_option('jkeywords_keywords_table'), 1, -1); 204 204 205 205 $wpdb->query('DROP TABLE IF EXISTS ' . $tablename); 206 206 207 207 foreach($options as $optname => $optval) { 208 208 delete_option('jkeywords_' . $optname); 209 209 } 210 210 211 211 $this->done(); 212 212 } 213 214 213 214 215 215 function done ( ) { 216 216 echo '<div class="narrow">'; … … 218 218 echo '</div>'; 219 219 } 220 220 221 221 222 222 function JeromesKeyword_Import ( ) { 223 223 224 224 // Nothing. 225 226 } 227 225 226 } 227 228 228 } 229 229
Note: See TracChangeset
for help on using the changeset viewer.