lp__normalize_path( $path )

This function replaces backslashes with forward slashes for Windows systems and ensures that no duplicate slashes exist in the path.

Plugin

Namespace

Launchpad

Parameters

string

$path

Path to normalize.

Return

string

Normalized path.

Source

File: \includes\lp-utility-functions.php

function lp__normalize_path( $path ) {
    $normalized_path = '';

    if ( function_exists( 'wp_normalize_path' ) ) {
        $normalized_path = wp_normalize_path( $path );
    } else {
        $normalized_path = str_replace( '\\', '/', $path );
        $normalized_path = preg_replace( '|/+|', '/', $normalized_path );
    }

    return $normalized_path;
}

Related

Used to retrieve the normalized file path of a plugin file.

Used to include Launchpad plugin files via require_once based on filename and plugin name.

Used to retrieve and load plugin template based on slug and name.

Use to search for template files in theme and plugin directories.

Use to load multiple template parts based on slugs and names.

Use to load multiple template parts based on slugs and names.