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;
| Type | Name | Description |
|---|---|---|
string | $input | String to truncate. |
int | $count | Maximum number of characters to take. |
string | $more | What to append if $input needs to be trimmed. |
bool | $break_words | Optionally 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;
| Type | Name | Description |
|---|---|---|
array | $args | Array 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;
| Type | Name | Description |
|---|---|---|
int|float | $number | Number 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;
| Type | Name | Description |
|---|---|---|
string | $csv | CSV string to parse. |
Returns: array — Array of integers.