Make WordPress Core


Ignore:
Timestamp:
12/31/2007 06:39:43 PM (17 years ago)
Author:
ryan
Message:

Theme tagging from andy. fixes #5545

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/theme.php

    r6410 r6530  
    9191        $status = 'publish';
    9292
     93    if ( preg_match('|Tags:(.*)|i', $theme_data, $tags) )
     94        $tags = array_map( 'trim', explode( ',', wp_kses( trim( $tags[1] ), array() ) ) );
     95    else
     96        $tags = array();
     97
    9398    $name = $theme = wp_kses( trim( $theme_name[1] ), $themes_allowed_tags );
    9499    $theme_uri = clean_url( trim( $theme_uri[1] ) );
     
    104109    }
    105110
    106     return array( 'Name' => $name, 'Title' => $theme, 'URI' => $theme_uri, 'Description' => $description, 'Author' => $author, 'Version' => $version, 'Template' => $template, 'Status' => $status );
     111    return array( 'Name' => $name, 'Title' => $theme, 'URI' => $theme_uri, 'Description' => $description, 'Author' => $author, 'Version' => $version, 'Template' => $template, 'Status' => $status, 'Tags' => $tags );
    107112}
    108113
     
    262267        }
    263268
    264         $themes[$name] = array('Name' => $name, 'Title' => $title, 'Description' => $description, 'Author' => $author, 'Version' => $version, 'Template' => $template, 'Stylesheet' => $stylesheet, 'Template Files' => $template_files, 'Stylesheet Files' => $stylesheet_files, 'Template Dir' => $template_dir, 'Stylesheet Dir' => $stylesheet_dir, 'Status' => $theme_data['Status'], 'Screenshot' => $screenshot);
     269        $themes[$name] = array('Name' => $name, 'Title' => $title, 'Description' => $description, 'Author' => $author, 'Version' => $version, 'Template' => $template, 'Stylesheet' => $stylesheet, 'Template Files' => $template_files, 'Stylesheet Files' => $stylesheet_files, 'Template Dir' => $template_dir, 'Stylesheet Dir' => $stylesheet_dir, 'Status' => $theme_data['Status'], 'Screenshot' => $screenshot, 'Tags' => $theme_data['Tags']);
    265270    }
    266271
Note: See TracChangeset for help on using the changeset viewer.