twentyfifteen_dequeue_fonts

De-queue Google fonts if custom fonts are being used instead.

Description

twentyfifteen_dequeue_fonts(); 

Usage

  1. if ( !function_exists( 'twentyfifteen_dequeue_fonts' ) ) { 
  2. require_once '/inc/wpcom.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = twentyfifteen_dequeue_fonts(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/inc/wpcom.php  
  1. function twentyfifteen_dequeue_fonts() { 
  2. if ( class_exists( 'Jetpack_Fonts' ) && class_exists( 'CustomDesign' ) && CustomDesign::is_upgrade_active() ) { 
  3. if ( class_exists( 'TypekitUtil' ) ) { 
  4. $custom_fonts = Jetpack_Fonts::get_instance()->get_fonts(); 
  5. if ( ! empty( $custom_fonts ) && TypekitUtil::any_selected_fonts( $custom_fonts ) ) { 
  6. wp_dequeue_style( 'twentyfifteen-fonts' );