bsf_core_url( string $append = '' )
BSF Core URL
Description
Parameters
- $append
-
(string) (Optional) Append.
Default value: ''
Return
(String) URL of bsf-core directory.
Source
File: admin/bsf-core/includes/helpers.php
function bsf_core_url( $append = '' ) { $path = wp_normalize_path( BSF_UPDATER_PATH ); $theme_dir = wp_normalize_path( get_template_directory() ); $plugin_dir = wp_normalize_path( WP_PLUGIN_DIR ); if ( strpos( $path, $theme_dir ) !== false ) { return rtrim( get_template_directory_uri() . '/admin/bsf-core/', '/' ) . $append; } elseif ( strpos( $path, $plugin_dir ) !== false ) { return rtrim( plugin_dir_url( BSF_UPDATER_FILE ), '/' ) . $append; } elseif ( strpos( $path, dirname( plugin_basename( BSF_UPDATER_FILE ) ) ) !== false ) { return rtrim( plugin_dir_url( BSF_UPDATER_FILE ), '/' ) . $append; } return false; }
Expand full source code Collapse full source code View on Trac