wp/wp-includes/class-wp-styles.php
changeset 22 8c2e4d02f4ef
parent 21 48c4eec2b7e6
equal deleted inserted replaced
21:48c4eec2b7e6 22:8c2e4d02f4ef
   163 
   163 
   164 		if ( isset( $this->args[ $handle ] ) ) {
   164 		if ( isset( $this->args[ $handle ] ) ) {
   165 			$ver = $ver ? $ver . '&' . $this->args[ $handle ] : $this->args[ $handle ];
   165 			$ver = $ver ? $ver . '&' . $this->args[ $handle ] : $this->args[ $handle ];
   166 		}
   166 		}
   167 
   167 
   168 		$src         = $obj->src;
   168 		$src                   = $obj->src;
   169 		$cond_before = '';
   169 		$ie_conditional_prefix = '';
   170 		$cond_after  = '';
   170 		$ie_conditional_suffix = '';
   171 		$conditional = isset( $obj->extra['conditional'] ) ? $obj->extra['conditional'] : '';
   171 		$conditional           = isset( $obj->extra['conditional'] ) ? $obj->extra['conditional'] : '';
   172 
   172 
   173 		if ( $conditional ) {
   173 		if ( $conditional ) {
   174 			$cond_before = "<!--[if {$conditional}]>\n";
   174 			$ie_conditional_prefix = "<!--[if {$conditional}]>\n";
   175 			$cond_after  = "<![endif]-->\n";
   175 			$ie_conditional_suffix = "<![endif]-->\n";
   176 		}
   176 		}
   177 
   177 
   178 		$inline_style = $this->print_inline_style( $handle, false );
   178 		$inline_style = $this->print_inline_style( $handle, false );
   179 
   179 
   180 		if ( $inline_style ) {
   180 		if ( $inline_style ) {
   277 				$tag .= $rtl_tag;
   277 				$tag .= $rtl_tag;
   278 			}
   278 			}
   279 		}
   279 		}
   280 
   280 
   281 		if ( $this->do_concat ) {
   281 		if ( $this->do_concat ) {
   282 			$this->print_html .= $cond_before;
   282 			$this->print_html .= $ie_conditional_prefix;
   283 			$this->print_html .= $tag;
   283 			$this->print_html .= $tag;
   284 			if ( $inline_style_tag ) {
   284 			if ( $inline_style_tag ) {
   285 				$this->print_html .= $inline_style_tag;
   285 				$this->print_html .= $inline_style_tag;
   286 			}
   286 			}
   287 			$this->print_html .= $cond_after;
   287 			$this->print_html .= $ie_conditional_suffix;
   288 		} else {
   288 		} else {
   289 			echo $cond_before;
   289 			echo $ie_conditional_prefix;
   290 			echo $tag;
   290 			echo $tag;
   291 			$this->print_inline_style( $handle );
   291 			$this->print_inline_style( $handle );
   292 			echo $cond_after;
   292 			echo $ie_conditional_suffix;
   293 		}
   293 		}
   294 
   294 
   295 		return true;
   295 		return true;
   296 	}
   296 	}
   297 
   297 
   366 	 * @param int|false       $group     Optional. Group level: level (int), no groups (false).
   366 	 * @param int|false       $group     Optional. Group level: level (int), no groups (false).
   367 	 *                                   Default false.
   367 	 *                                   Default false.
   368 	 * @return bool True on success, false on failure.
   368 	 * @return bool True on success, false on failure.
   369 	 */
   369 	 */
   370 	public function all_deps( $handles, $recursion = false, $group = false ) {
   370 	public function all_deps( $handles, $recursion = false, $group = false ) {
   371 		$r = parent::all_deps( $handles, $recursion, $group );
   371 		$result = parent::all_deps( $handles, $recursion, $group );
   372 		if ( ! $recursion ) {
   372 		if ( ! $recursion ) {
   373 			/**
   373 			/**
   374 			 * Filters the array of enqueued styles before processing for output.
   374 			 * Filters the array of enqueued styles before processing for output.
   375 			 *
   375 			 *
   376 			 * @since 2.6.0
   376 			 * @since 2.6.0
   377 			 *
   377 			 *
   378 			 * @param string[] $to_do The list of enqueued style handles about to be processed.
   378 			 * @param string[] $to_do The list of enqueued style handles about to be processed.
   379 			 */
   379 			 */
   380 			$this->to_do = apply_filters( 'print_styles_array', $this->to_do );
   380 			$this->to_do = apply_filters( 'print_styles_array', $this->to_do );
   381 		}
   381 		}
   382 		return $r;
   382 		return $result;
   383 	}
   383 	}
   384 
   384 
   385 	/**
   385 	/**
   386 	 * Generates an enqueued style's fully-qualified URL.
   386 	 * Generates an enqueued style's fully-qualified URL.
   387 	 *
   387 	 *