Astra_Admin_Ajax::load_google_fonts()
AJAX handler for loading Google Fonts data
Description
Return
(void)
Source
File: admin/includes/class-astra-admin-ajax.php
public function load_google_fonts() { if ( ! current_user_can( 'customize' ) ) { wp_send_json_error( array( 'success' => false, 'message' => $this->get_error_msg( 'permission' ), ) ); } check_ajax_referer( 'astra_customizer_nonce', 'nonce' ); $google_fonts = Astra_Font_Families::get_google_fonts(); $custom_fonts = Astra_Font_Families::get_custom_fonts(); $response = array( 'success' => true, 'data' => array( 'google' => $google_fonts, 'custom' => $custom_fonts, ), ); wp_send_json_success( $response ); }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
4.11.13 | Introduced. |