File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -675,27 +675,27 @@ function vaidate_accepted_frequencies($value)
675675 *
676676 * @since 1.2.0
677677 *
678- * @return void
678+ * @return int
679679 */
680- function apply_to_rucss ( )
680+ function rsp_apply_to_rucss ( $ value )
681681{
682682 if (!is_admin () || !wp_doing_ajax () || !is_404 ()) {
683- return ;
683+ return $ value ;
684684 }
685685 $ apply_rucss = (bool ) apply_filters ('rsp_apply_rucss ' , get_option ('rsp_apply_rucss ' , 0 ));
686686 if (!$ apply_rucss ) {
687- return ;
687+ return $ value ;
688688 }
689689 $ url = untrailingslashit ("{$ _SERVER ['HTTP_HOST ' ]}{$ _SERVER ['REQUEST_URI ' ]}" );
690690 $ sitemap_page_limit = apply_filters ('rsp_sitemap_page_limit ' , get_option ('rsp_sitemap_page_limit ' , RSP_SITEMAP_PAGE_DEFAULT_LIMIT ));
691691 $ sitemap_page_limit = validate_positive_integer ($ sitemap_page_limit , RSP_SITEMAP_PAGE_DEFAULT_LIMIT );
692692 $ urls_to_preload = rsp_get_urls_to_preload ($ sitemap_page_limit );
693693 if (! in_array ($ url , $ urls_to_preload , true )) {
694- add_filter ( ' pre_get_rocket_option_remove_unused_css ' , ' __return_zero ' ) ;
694+ return 0 ;
695695 }
696+ return $ value ;
696697}
697- add_action ('wp ' , __NAMESPACE__ . '\apply_to_rucss ' );
698-
698+ add_filter ('pre_get_rocket_option_remove_unused_css ' , 'rsp_apply_to_rucss ' );
699699/**
700700 * TODO
701701 * - Implement:
You can’t perform that action at this time.
0 commit comments