Make WordPress Core


Ignore:
Timestamp:
09/03/2007 11:19:20 PM (18 years ago)
Author:
ryan
Message:

Strip lines that contain only whitespace down to newlines.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/import/jkw.php

    r5984 r6025  
    22
    33class JeromesKeyword_Import {
    4    
     4
    55    function header()  {
    66        echo '<div class="wrap">';
     
    3030    }
    3131
    32    
     32
    3333    function dispatch () {
    3434        if ( empty( $_GET['step'] ) ) {
     
    3737            $step = (int) $_GET['step'];
    3838        }
    39        
     39
    4040        // load the header
    4141        $this->header();
    42        
     42
    4343        switch ( $step ) {
    4444            case 0 :
     
    6969                break;
    7070        }
    71        
     71
    7272        // load the footer
    7373        $this->footer();
    7474    }
    75    
    76    
     75
     76
    7777    function check_V1_post_keyword ( $precheck = true ) {
    7878        global $wpdb;
    79        
     79
    8080        echo '<div class="narrow">';
    8181        echo '<p><h3>'.__('Reading Jerome&#8217;s Keywords Tags&#8230;').'</h3></p>';
    82        
     82
    8383        // import Jerome's Keywords tags
    8484        $qry = "SELECT post_id, meta_id, meta_key, meta_value FROM $wpdb->postmeta WHERE $wpdb->postmeta.meta_key = 'keywords'";
     
    114114
    115115        }
    116        
     116
    117117        echo '<form action="admin.php?import=jkw&amp;step='.($precheck? 2:6).'" method="post">';
    118118        wp_nonce_field('import-jkw');
     
    125125    function check_V2_post_keyword ( $precheck = true ) {
    126126        global $wpdb;
    127        
     127
    128128        echo '<div class="narrow">';
    129129        echo '<p><h3>'.__('Reading Jerome&#8217;s Keywords Tags&#8230;').'</h3></p>';
    130        
     130
    131131            // import Jerome's Keywords tags
    132132            $tablename = $wpdb->prefix . substr(get_option('jkeywords_keywords_table'), 1, -1);
     
    140140                $count = count($metakeys);
    141141            echo '<p>' . sprintf( __('Done! <strong>%s</strong> tags were read.'), $count ) . '<br /></p>';
    142            
     142
    143143            echo '<ul>';
    144144
    145145                foreach($metakeys as $post_meta) {
    146146                    $keyword = addslashes(trim($post_meta->tag_name));
    147                    
     147
    148148                    if ($keyword != ''){
    149149                        echo '<li>' . $post_meta->post_id . '&nbsp;-&nbsp;' . $keyword . '</li>';
     
    157157
    158158        }
    159        
     159
    160160        echo '<form action="admin.php?import=jkw&amp;step='.($precheck? 4:5).'" method="post">';
    161161        wp_nonce_field('import-jkw');
     
    175175                    'query_varname'  => 'tag',          // HTTP var name used for tag searches
    176176                    'template'       => 'keywords.php', // template file to use for displaying tag queries
    177                
     177
    178178                    'meta_always_include' => '',        // meta keywords to always include
    179179                    'meta_includecats' => 'default',    // default' => include cats in meta keywords only for home page
    180180                                                        // all' => includes cats on every page, none' => never included
    181                    
     181
    182182                    'meta_autoheader'    => '1',        // automatically output meta keywords in header
    183183                    'search_strict'      => '1',        // returns only exact tag matches if true
    184184                    'use_feed_cats'      => '1',        // insert tags into feeds as categories
    185                
     185
    186186                    /* post tag options */
    187187                    'post_linkformat'    => '',         // post tag format (initialized to $link_localsearch)
     
    189189                    'post_includecats'   => '0',        // include categories in post's tag list
    190190                    'post_notagstext'    => 'none',     // text to display if no tags found
    191                    
     191
    192192                    /* tag cloud options */
    193193                    'cloud_linkformat'   => '',         // post tag format (initialized to $link_tagcloud)
     
    200200                    'cloud_scalemin'     => '0'         // minimum value for count scaling
    201201                    );
    202                
     202
    203203            $tablename = $wpdb->prefix . substr(get_option('jkeywords_keywords_table'), 1, -1);
    204        
     204
    205205        $wpdb->query('DROP TABLE IF EXISTS ' . $tablename);
    206        
     206
    207207                foreach($options as $optname => $optval) {
    208208                    delete_option('jkeywords_' . $optname);
    209209                }
    210                
     210
    211211        $this->done();
    212212    }
    213    
    214    
     213
     214
    215215    function done ( ) {
    216216        echo '<div class="narrow">';
     
    218218        echo '</div>';
    219219    }
    220    
     220
    221221
    222222    function JeromesKeyword_Import ( ) {
    223        
     223
    224224        // Nothing.
    225        
    226     }
    227    
     225
     226    }
     227
    228228}
    229229
Note: See TracChangeset for help on using the changeset viewer.