Astra_Ext_Typography_Loader::disale_qm_cap_checking()
Typography Param loads all the available Google fonts from the Json.
Description
The Google Fonts list is generated usig a Grunt Command so this list will keep on increasing in future.
When Typography param and Query Monitor is active, Both of these cause a lot of memory consumption. Particularly QM_Collector_Caps->filter_user_has_cap
Hence we are disaling this method only when inside the Customizer Preview. This is not affected anywhere else on the site, Front End or Admin.
Source
File: addons/typography/classes/class-astra-ext-typography-loader.php
public function disale_qm_cap_checking() { if ( class_exists( 'QM_Collector_Caps' ) && is_customize_preview() ) { $qm_caps = QM_Collectors::get( 'caps' ); remove_filter( 'user_has_cap', array( $qm_caps, 'filter_user_has_cap' ), 9999, 3 ); } }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
1.1.0 | Introduced. |