twentyfourteen_override_featured_quantity

Override Featured Content quantity option.

Description

twentyfourteen_override_featured_quantity(); 

Since Twenty Fourteen doesn't use the quantity option (instead it goes "up to 6" based on posts tagged or sticky posts), ignore the quantity option set by the Jetpack Featured Content plugin.


Usage

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

Defined (1)

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

/inc/wpcom.php  
  1. function twentyfourteen_override_featured_quantity() { 
  2. $option = (array) get_option( 'featured-content' ); 
  3.  
  4. if ( isset( $option['quantity'] ) && 5 === $option['quantity'] ) { 
  5. $option['quantity'] = 6; 
  6. update_option( 'featured-content', $option );