LLMS_Admin_Table::get_filter_placeholder( string $column_id,  $column_data )

Get the text for the default/placeholder for a filterable column.


Parameters Parameters

$column_id

(string) (Required) The ID of the column.


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/abstracts/abstract.llms.admin.table.php

	public function get_filter_placeholder( $column_id, $column_data ) {
		$placeholder = __( 'Any', 'lifterlms' );
		if ( is_array( $column_data ) && isset( $column_data['title'] ) ) {
			/* translators: %s: Column title. */
			$placeholder = sprintf( __( 'Any %s', 'lifterlms' ), $column_data['title'] );
		} elseif ( is_string( $column_data ) ) {
			/* translators: %s: Column title. */
			$placeholder = sprintf( __( 'Any %s', 'lifterlms' ), $column_data );
		}
		/**
		 * Filters the placeholder string for a filterable column.
		 *
		 * The dynamic portion of this filter `{$this->id}` refers to the unique ID for the table.
		 *
		 * @since 3.15.0
		 *
		 * @param string $placeholder Placeholder string.
		 * @param string $column_id   The ID of the column.
		 */
		return apply_filters( "llms_table_get_{$this->id}_filter_placeholder", $placeholder, $column_id );
	}


Top ↑

Changelog Changelog

Changelog
Version Description
7.3.0 Fixed typo in function name (is_strinp => is_string ).
3.4.0
3.15.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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