Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LLMS_Metabox_Repeater_Field::get_button()

Retrieve the HTML for the repeater add more button


Return Return

(string)


Top ↑

Source Source

File: includes/admin/post-types/meta-boxes/fields/llms.class.meta.box.repeater.php

	private function get_button() {

		$btn = $this->field['button'];

		// Setup class list.
		$classes   = explode( ' ', $btn['classes'] );
		$classes[] = sprintf( 'llms-button-%s', $btn['style'] );
		$classes[] = $btn['size'];
		$classes[] = 'llms-repeater-new-btn';
		$classes   = implode( ' ', $classes );

		// Setup icon.
		if ( $btn['icon'] && 0 === strpos( $btn['icon'], 'dashicons-' ) ) {
			$icon = '<span class="dashicons ' . $btn['icon'] . '"></span>&nbsp;';
		} else {
			$icon = $btn['icon'];
		}

		return '<button class="' . $classes . '" type="button">' . $icon . $btn['text'] . '</button>';

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.11.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.