| 236 | * Retrieve URI of current parent stylesheet. |
| 237 | * |
| 238 | * The stylesheet file name is 'style.css' which is appended to {@link |
| 239 | * get_template_directory_uri() template directory URI} path. |
| 240 | * |
| 241 | * @since 4.4.0 |
| 242 | * |
| 243 | * @return string|bool URI to current parent stylesheet or false if no child theme is avtivated. |
| 244 | */ |
| 245 | function get_parent_stylesheet_uri() { |
| 246 | if ( ! is_child_theme() ) { |
| 247 | return false; |
| 248 | } |
| 249 | $template_dir_uri = get_template_directory_uri(); |
| 250 | $parent_stylesheet_uri = $template_dir_uri . '/style.css'; |
| 251 | /** |
| 252 | * Filter the URI of the current parent stylesheet. |
| 253 | * |
| 254 | * @since 4.4.0 |
| 255 | * |
| 256 | * @param string $template_uri Template URI for the current theme/parent theme. |
| 257 | * @param string $parent_stylesheet_uri Template directory URI for the current theme/parent theme. |
| 258 | */ |
| 259 | return apply_filters( 'parent_stylesheet_uri', $parent_stylesheet_uri, $template_dir_uri ); |
| 260 | } |
| 261 | |
| 262 | /** |