llms_strip_prefixes( string $string, string[] $prefixes = array() )

Strips a list of prefixes from the start of a string.


Description Description

By default, strips llms_, lifterlms_, ‘llms-‘, or ‘lifterlms-‘. Other prefixes may be provided.

Will strip only the first prefix found from the list of supplied prefixes.


Top ↑

Parameters Parameters

$string

(string) (Required) String to modify.

$prefixes

(string[]) (Optional) List of prefixs.

Default value: array()


Top ↑

Return Return

(string) The modified string. If no prefixes were found, the original string is returned without modification.


Top ↑

Source Source

File: includes/llms.functions.core.php

		E_USER_NOTICE       => 'E_USER_NOTICE', // 1024.
		E_STRICT            => 'E_STRICT', // 2048.
		E_RECOVERABLE_ERROR => 'E_RECOVERABLE_ERROR', // 4096.
		E_DEPRECATED        => 'E_DEPRECATED', // 8192.
		E_USER_DEPRECATED   => 'E_USER_DEPRECATED', // 16384.
	);

	return isset( $codes[ $code ] ) ? $codes[ $code ] : $code;

}

/**
 * Wrapper for set_time_limit to ensure it's enabled before calling
 *
 * @since 3.16.5
 *
 * @source thanks WooCommerce <3
 *
 * @param int $limit  Optional. Script time limit. Default is 0 = no time limit.
 * @return void
 */
function llms_set_time_limit( $limit = 0 ) {

	if ( function_exists( 'set_time_limit' ) && false === strpos( ini_get( 'disable_functions' ), 'set_time_limit' ) && ! ini_get( 'safe_mode' ) ) {



Top ↑

Changelog Changelog

Changelog
Version Description
7.0.0 Added llms- and lifterlms- as additional default prefixes to strip.
6.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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