Changeset 8974
- Timestamp:
- 09/25/2008 02:12:58 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/theme.php
r8965 r8974 72 72 * Retrieve localized stylesheet URI. 73 73 * 74 * {@internal Missing Long Description}} 74 * The stylesheet directory for the localized stylesheet files are located, by 75 * default, in the base theme directory. The name of the locale file will be the 76 * locale followed by '.css'. If that does not exist, then the text direction 77 * stylesheet will be checked for existence, for example 'ltr.css'. 78 * 79 * The theme may change the location of the stylesheet directory by either using 80 * the 'stylesheet_directory_uri' filter or the 'locale_stylesheet_uri' filter. 81 * If you want to change the location of the stylesheet files for the entire 82 * WordPress workflow, then change the former. If you just have the locale in a 83 * separate folder, then change the latter. 75 84 * 76 85 * @since 2.1.0 … … 136 145 * Retrieve theme data from parsed theme file. 137 146 * 138 * {@internal Missing Long Description}} 147 * The description will have the tags filtered with the following HTML elements 148 * whitelisted. The <b>'a'</b> element with the <em>href</em> and <em>title</em> 149 * attributes. The <b>abbr</b> element with the <em>title</em> attribute. The 150 * <b>acronym<b> element with the <em>title</em> attribute allowed. The 151 * <b>code</b>, <b>em</b>, and <b>strong</b> elements also allowed. 152 * 153 * The style.css file must contain theme name, theme URI, and description. The 154 * data can also contain author URI, author, template (parent template), 155 * version, status, and finally tags. Some of these are not used by WordPress 156 * administration panels, but are used by theme directory web sites which list 157 * the theme. 139 158 * 140 159 * @since 1.5.0 … … 210 229 * Retrieve list of themes with theme data in theme directory. 211 230 * 212 * {@internal Missing Long Description}} 213 * 214 * @since 1.5.0 231 * The theme is broken, if it doesn't have a parent theme and is missing either 232 * style.css and, or index.php. If the theme has a parent theme then it is 233 * broken, if it is missing style.css; index.php is optional. The broken theme 234 * list is saved in the {@link $wp_broken_themes} global, which is displayed on 235 * the theme list in the administration panels. 236 * 237 * @since 1.5.0 238 * @global array $wp_broken_themes Stores the broken themes. 239 * @global array $wp_themes Stores the working themes. 215 240 * 216 241 * @return array Theme list with theme data. … … 575 600 } 576 601 602 /** 603 * Retrieve path of taxonomy template in current or parent template. 604 * 605 * Retrieves the taxonomy and term, if term is available. The template is 606 * prepended with 'taxonomy-' and followed by both the taxonomy string and 607 * the taxonomy string followed by a dash and then followed by the term. 608 * 609 * The taxonomy and term template is checked and used first, if it exists. 610 * Second, just the taxonomy template is checked, and then finally, taxonomy.php 611 * template is used. If none of the files exist, then it will fall back on to 612 * index.php. 613 * 614 * @since unknown (2.6.0 most likely) 615 * @uses apply_filters() Calls 'taxonomy_template' filter on found path. 616 * 617 * @return string 618 */ 577 619 function get_taxonomy_template() { 578 620 $taxonomy = get_query_var('taxonomy'); … … 673 715 * @since 1.5.0 674 716 * 675 * @return unknown717 * @return string 676 718 */ 677 719 function get_single_template() { … … 794 836 795 837 /** 796 * {@internal Missing Short Description}} 797 * 798 * {@internal Missing Long Description}} 838 * Start preview theme output buffer. 839 * 840 * Will only preform task if the user has permissions and template and preview 841 * query variables exist. 799 842 * 800 843 * @since 2.5.0 801 *802 * @param unknown_type $template803 * @param unknown_type $stylesheet804 844 */ 805 845 function preview_theme() { … … 828 868 add_action('setup_theme', 'preview_theme'); 829 869 870 /** 871 * Callback function for ob_start() to capture all links in the theme. 872 * 873 * @since unknown 874 * @access private 875 * 876 * @param string $content 877 * @return string 878 */ 830 879 function preview_theme_ob_filter( $content ) { 831 880 return preg_replace_callback( "|(<a.*?href=([\"']))(.*?)([\"'].*?>)|", 'preview_theme_ob_filter_callback', $content ); 832 881 } 833 882 883 /** 884 * Manipulates preview theme links in order to control and maintain location. 885 * 886 * Callback function for preg_replace_callback() to accept and filter matches. 887 * 888 * @since unknown 889 * @access private 890 * 891 * @param array $matches 892 * @return string 893 */ 834 894 function preview_theme_ob_filter_callback( $matches ) { 835 895 if ( … … 850 910 } 851 911 912 /** 913 * Switches current theme to new template and stylesheet names. 914 * 915 * @since unknown 916 * @uses do_action() Calls 'switch_theme' action on updated theme display name. 917 * 918 * @param string $template Template name 919 * @param string $stylesheet Stylesheet name. 920 */ 852 921 function switch_theme($template, $stylesheet) { 853 922 update_option('template', $template);
Note: See TracChangeset
for help on using the changeset viewer.