| @@ 235-268 (lines=34) @@ | ||
| 232 | $warnings[] = 'kses found stuff'; |
|
| 233 | ||
| 234 | // if we're not using a preprocessor |
|
| 235 | if ( ! $args['preprocessor'] ) { |
|
| 236 | ||
| 237 | /** |
|
| 238 | * Fires before parsing the css with CSSTidy, but only if |
|
| 239 | * the preprocessor is not configured for use. |
|
| 240 | * |
|
| 241 | * @module custom-css |
|
| 242 | * |
|
| 243 | * @since 1.7.0 |
|
| 244 | * |
|
| 245 | * @param obj $csstidy The csstidy object. |
|
| 246 | * @param string $css Custom CSS. |
|
| 247 | * @param array $args Array of custom CSS arguments. |
|
| 248 | */ |
|
| 249 | do_action( 'safecss_parse_pre', $csstidy, $css, $args ); |
|
| 250 | ||
| 251 | $csstidy->parse( $css ); |
|
| 252 | ||
| 253 | /** |
|
| 254 | * Fires after parsing the css with CSSTidy, but only if |
|
| 255 | * the preprocessor is not cinfigured for use. |
|
| 256 | * |
|
| 257 | * @module custom-css |
|
| 258 | * |
|
| 259 | * @since 1.7.0 |
|
| 260 | * |
|
| 261 | * @param obj $csstidy The csstidy object. |
|
| 262 | * @param array $warnings Array of warnings. |
|
| 263 | * @param array $args Array of custom CSS arguments. |
|
| 264 | */ |
|
| 265 | do_action( 'safecss_parse_post', $csstidy, $warnings, $args ); |
|
| 266 | ||
| 267 | $css = $csstidy->print->plain(); |
|
| 268 | } |
|
| 269 | ||
| 270 | if ( $args['add_to_existing'] ) |
|
| 271 | $add_to_existing = 'yes'; |
|
| @@ 341-374 (lines=34) @@ | ||
| 338 | } |
|
| 339 | ||
| 340 | // if we're not using a preprocessor |
|
| 341 | if ( ! $args['preprocessor'] ) { |
|
| 342 | ||
| 343 | /** |
|
| 344 | * Fires before parsing the css with CSSTidy, but only if |
|
| 345 | * the preprocessor is not configured for use. |
|
| 346 | * |
|
| 347 | * @module custom-css |
|
| 348 | * |
|
| 349 | * @since 1.7.0 |
|
| 350 | * |
|
| 351 | * @param obj $csstidy The csstidy object. |
|
| 352 | * @param string $css Custom CSS. |
|
| 353 | * @param array $args Array of custom CSS arguments. |
|
| 354 | */ |
|
| 355 | do_action( 'safecss_parse_pre', $csstidy, $css, $args ); |
|
| 356 | ||
| 357 | $csstidy->parse( $css ); |
|
| 358 | ||
| 359 | /** |
|
| 360 | * Fires after parsing the css with CSSTidy, but only if |
|
| 361 | * the preprocessor is not configured for use. |
|
| 362 | * |
|
| 363 | * @module custom-css |
|
| 364 | * |
|
| 365 | * @since 1.7.0 |
|
| 366 | * |
|
| 367 | * @param obj $csstidy The csstidy object. |
|
| 368 | * @param array $warnings Array of warnings. |
|
| 369 | * @param array $args Array of custom CSS arguments. |
|
| 370 | */ |
|
| 371 | do_action( 'safecss_parse_post', $csstidy, $warnings, $args ); |
|
| 372 | ||
| 373 | $css = $csstidy->print->plain(); |
|
| 374 | } |
|
| 375 | } |
|
| 376 | return $css; |
|
| 377 | } |
|