@@ 1171-1194 (lines=24) @@ | ||
1168 | * |
|
1169 | * @return array |
|
1170 | */ |
|
1171 | function print_footer_scripts() { |
|
1172 | global $wp_scripts, $concatenate_scripts; |
|
1173 | ||
1174 | if ( ! ( $wp_scripts instanceof WP_Scripts ) ) { |
|
1175 | return array(); // No need to run if not instantiated. |
|
1176 | } |
|
1177 | script_concat_settings(); |
|
1178 | $wp_scripts->do_concat = $concatenate_scripts; |
|
1179 | $wp_scripts->do_footer_items(); |
|
1180 | ||
1181 | /** |
|
1182 | * Filters whether to print the footer scripts. |
|
1183 | * |
|
1184 | * @since 2.8.0 |
|
1185 | * |
|
1186 | * @param bool $print Whether to print the footer scripts. Default true. |
|
1187 | */ |
|
1188 | if ( apply_filters( 'print_footer_scripts', true ) ) { |
|
1189 | _print_scripts(); |
|
1190 | } |
|
1191 | ||
1192 | $wp_scripts->reset(); |
|
1193 | return $wp_scripts->done; |
|
1194 | } |
|
1195 | ||
1196 | /** |
|
1197 | * Print scripts (internal use only) |
|
@@ 1342-1366 (lines=25) @@ | ||
1339 | * |
|
1340 | * @return array|void |
|
1341 | */ |
|
1342 | function print_late_styles() { |
|
1343 | global $wp_styles, $concatenate_scripts; |
|
1344 | ||
1345 | if ( ! ( $wp_styles instanceof WP_Styles ) ) { |
|
1346 | return; |
|
1347 | } |
|
1348 | ||
1349 | script_concat_settings(); |
|
1350 | $wp_styles->do_concat = $concatenate_scripts; |
|
1351 | $wp_styles->do_footer_items(); |
|
1352 | ||
1353 | /** |
|
1354 | * Filters whether to print the styles queued too late for the HTML head. |
|
1355 | * |
|
1356 | * @since 3.3.0 |
|
1357 | * |
|
1358 | * @param bool $print Whether to print the 'late' styles. Default true. |
|
1359 | */ |
|
1360 | if ( apply_filters( 'print_late_styles', true ) ) { |
|
1361 | _print_styles(); |
|
1362 | } |
|
1363 | ||
1364 | $wp_styles->reset(); |
|
1365 | return $wp_styles->done; |
|
1366 | } |
|
1367 | ||
1368 | /** |
|
1369 | * Print styles (internal use only) |