• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Genesis Theme Framework a2z

Genesis Theme Framework a2z

WordPress Dynamic API Reference

  • Home
  • Plugins
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / get_singular_images() – Add `singular-images` endpoint to the REST API.

You appear to be a bot. Output may be restricted

Description

Add singular-images endpoint to the REST API.

Returns an array of post types that have genesis-singular-images support with singular images enabled in the Singular Content panel in the Customizer. Example: curl https://example.com/wp-json/genesis/v1/singular-images Example response: [

  • 'post', // Featured Images are enabled on posts.
  • 'page' // Featured Images are enabled on pages.

]

Usage

get_singular_images();

Parameters

Returns

void

Source

File name: genesis/lib/functions/rest.php


Lines:

1 to 12 of 12
function get_singular_images() {
  \register_rest_route(
    'genesis/v1',
    '/singular-images',
    [
      'methods'             => 'GET',
      'callback'            => '\genesis_post_types_with_singular_images_enabled',
      'permission_callback' => '__return_true',
    ]
  );
}
 

Published: 25th November 2019 | Last updated: 21st August 2020

Primary Sidebar

Information

Function name: get_singular_images
Plugin ref: Genesis Framework
Version: 3.3.5
Sourcefile: lib/functions/rest.php
File ref: lib/functions/rest.php
Deprecated?: No
API Letters: G,I,S

Footer

Genesis a2z
Genesis Theme Framework a2z
WordPress Dynamic API Reference
WordPress 5.9.3
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  genesis.wp-a2z.org
© Copyright Genesis a2z 2014-2022. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites