Recent

Helpers class

Helpers

Admin Columns Class.

Namespace: WebberZone\WFP\Util
Since: 3.1.0
Source: includes/util/class-helpers.php line 19

Methods

__construct()

Constructor class.

Since: 3.1.0
Line: 26

public function __construct(  );

trim_char() static

Truncate a string to a certain length.

Since: 3.1.0
Line: 40

static public function trim_char( $input, $count = ..., $more = ..., $break_words = ... ): string;
TypeNameDescription
string$inputString to truncate.
int$countMaximum number of characters to take.
string$moreWhat to append if $input needs to be trimmed.
bool$break_wordsOptionally choose to break words.

Returns: string — Truncated string.

sanitize_args() static

Sanitize args.

Since: 3.1.1
Line: 73

static public function sanitize_args( $args ): array;
TypeNameDescription
array$argsArray of arguments.

Returns: array — Sanitized array of arguments.

is_bot() static

Check if the current request is from a bot.

Since: 3.2.0
Line: 100

static public function is_bot(  ): bool;

Returns: bool — True if the request is from a bot.

get_current_url() static

Get the current page URL.

Since: 3.2.0
Line: 159

static public function get_current_url(  ): string;

Returns: string — Current page URL.

format_number() static

Format a number with thousands separator.

Since: 3.2.0
Line: 174

static public function format_number( $number ): string;
TypeNameDescription
int|float$numberNumber to format.

Returns: string — Formatted number.

parse_csv_to_int_array() static

Parse a CSV string to an array of integers.

Since: 3.2.0
Line: 186

static public function parse_csv_to_int_array( string $csv ): array;
TypeNameDescription
string$csvCSV string to parse.

Returns: array — Array of integers.