su_get_slides_432

The shortcodes-ultimate su get slides 432 function.

Published Date - February 15, 2021

Description

Get slides data.

su_get_slides_432( $args );

Parameters

  1. $args


Usage

The following example is for adding a hook callback.

if ( !function_exists( 'su_get_slides_432' ) ) {
    require_once ABSPATH . PLUGINDIR . 'shortcodes-ultimateshortcodes-ultimate/includes/functions-galleries.php';
}

// The input(s). 
$args = null;

// NOTICE! Understand what this does before running.
$result = su_get_slides_432( $args );
            

Defined

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

shortcodes-ultimate/includes/functions-galleries.php

function su_get_slides_432( $args ) {

	$args = wp_parse_args(
		$args,
		array(
			'gallery' => 1,
		)
	);

	$slides = array();

	$args['gallery'] = null === $args['gallery']
		? 0
		: $args['gallery'] - 1;

	$galleries = get_option( 'su_option_galleries-432' );

	if ( ! is_array( $galleries ) ) {
		return $slides;
	}

	if ( isset( $galleries[ $args['gallery'] ] ) ) {
		$slides = $galleries[ $args['gallery'] ]['items'];
	}

	return $slides;

}