su_slide_link_input

The shortcodes-ultimate su slide link input function.

Published Date - February 15, 2021

Description

Adds 'Slide Link' field at attachment page.

su_slide_link_input( $form_fields, $post );

Parameters

  1. $form_fields

  2. $post


Usage

The following example is for adding a hook callback.

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

// The input(s). 
$form_fields = null;
$post = null;

// NOTICE! Understand what this does before running.
$result = su_slide_link_input( $form_fields, $post );
            

Defined

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

shortcodes-ultimate/includes/functions-galleries.php

function su_slide_link_input( $form_fields, $post ) {

	$form_fields['su_slide_link'] = array(
		'label' => __( 'Slide link', 'shortcodes-ultimate' ),
		'input' => 'text',
		'value' => get_post_meta( $post->ID, 'su_slide_link', true ),
		'helps' => sprintf(
			'<strong>%s</strong><br>%s',
			__( 'Shortcodes Ultimate', 'shortcodes-ultimate' ),
			__( 'Use this field to add custom links to slides used with Slider, Carousel and Custom Gallery shortcodes', 'shortcodes-ultimate' )
		),
	);

	return $form_fields;

}