jetpack_featured_images_get_settings

The WordPress Core jetpack featured images get settings function.

Description

jetpack_featured_images_get_settings(); 

Usage

  1. if ( !function_exists( 'jetpack_featured_images_get_settings' ) ) { 
  2. require_once '/modules/theme-tools/content-options.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = jetpack_featured_images_get_settings(); 
  7.  

Defined (1)

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

/modules/theme-tools/content-options.php  
  1. function jetpack_featured_images_get_settings() { 
  2. $options = get_theme_support( 'jetpack-content-options' ); 
  3. $featured_images = ( ! empty( $options[0]['featured-images'] ) ) ? $options[0]['featured-images'] : null; 
  4.  
  5. $settings = array( 
  6. 'archive' => ( ! empty( $featured_images['archive'] ) ) ? $featured_images['archive'] : null,  
  7. 'post' => ( ! empty( $featured_images['post'] ) ) ? $featured_images['post'] : null,  
  8. 'page' => ( ! empty( $featured_images['page'] ) ) ? $featured_images['page'] : null,  
  9. 'archive-default' => ( isset( $featured_images['archive-default'] ) && false === $featured_images['archive-default'] ) ? '' : 1,  
  10. 'post-default' => ( isset( $featured_images['post-default'] ) && false === $featured_images['post-default'] ) ? '' : 1,  
  11. 'page-default' => ( isset( $featured_images['page-default'] ) && false === $featured_images['page-default'] ) ? '' : 1,  
  12. ); 
  13.  
  14. $settings = array_merge( $settings, array( 
  15. 'archive-option' => get_option( 'jetpack_content_featured_images_archive', $settings['archive-default'] ),  
  16. 'post-option' => get_option( 'jetpack_content_featured_images_post', $settings['post-default'] ),  
  17. 'page-option' => get_option( 'jetpack_content_featured_images_page', $settings['page-default'] ),  
  18. ) ); 
  19.  
  20. return $settings;