Skip to content

Commit

Permalink
Bump readme test version, update composer dep
Browse files Browse the repository at this point in the history
  • Loading branch information
MickeyKay committed Sep 15, 2020
1 parent 60df16f commit 3e3672d
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 33 deletions.
6 changes: 3 additions & 3 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: McGuive7
Tags: better, font, awesome, icon, icons, bootstrap, fontstrap, cdn, shortcode
Donate link: https://mickeykay.me
Requires at least: 3.0
Tested up to: 4.9
Tested up to: 5.5
Stable tag: 1.7.1
License: GPLv2+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down
2 changes: 1 addition & 1 deletion vendor/composer/autoload_psr4.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
$baseDir = dirname($vendorDir);

return array(
'phpDocumentor\\Reflection\\' => array($vendorDir . '/phpdocumentor/reflection-common/src', $vendorDir . '/phpdocumentor/type-resolver/src', $vendorDir . '/phpdocumentor/reflection-docblock/src'),
'phpDocumentor\\Reflection\\' => array($vendorDir . '/phpdocumentor/reflection-common/src', $vendorDir . '/phpdocumentor/reflection-docblock/src', $vendorDir . '/phpdocumentor/type-resolver/src'),
'Webmozart\\Assert\\' => array($vendorDir . '/webmozart/assert/src'),
'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
'Prophecy\\' => array($vendorDir . '/phpspec/prophecy/src/Prophecy'),
Expand Down
4 changes: 2 additions & 2 deletions vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ class ComposerStaticInit0472085fd1d91eeb1dfb0e7fbfdb9773
'phpDocumentor\\Reflection\\' =>
array (
0 => __DIR__ . '/..' . '/phpdocumentor/reflection-common/src',
1 => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src',
2 => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src',
1 => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src',
2 => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src',
),
'Webmozart\\Assert\\' =>
array (
Expand Down
6 changes: 3 additions & 3 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@
"source": {
"type": "git",
"url": "https://github.com/MickeyKay/better-font-awesome-library.git",
"reference": "518931b9d784635db3327b67b9b31cb78a01d908"
"reference": "9c64bae3795e8bdce3e2a9bcdeb4cf3becb92037"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/MickeyKay/better-font-awesome-library/zipball/518931b9d784635db3327b67b9b31cb78a01d908",
"reference": "518931b9d784635db3327b67b9b31cb78a01d908",
"url": "https://api.github.com/repos/MickeyKay/better-font-awesome-library/zipball/9c64bae3795e8bdce3e2a9bcdeb4cf3becb92037",
"reference": "9c64bae3795e8bdce3e2a9bcdeb4cf3becb92037",
"shasum": ""
},
"time": "2020-09-14T16:26:16+00:00",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,33 +332,47 @@ private function parse_args( $args = array() ) {
*/
function setup_root_url() {

// Get BFA directory and theme root directory paths.
$bfa_directory = dirname(__FILE__);
$theme_directory = get_stylesheet_directory();
$plugin_dir = plugin_dir_url( __FILE__ );
// Get BFA directory and theme root directory paths.
$bfa_directory = dirname(__FILE__);
$theme_directory = get_template_directory();
$child_theme_directory = get_stylesheet_directory();
$plugin_dir = plugin_dir_url( __FILE__ );

/**
* Check if we're inside a theme or plugin.
*
* If we're in a theme, than plugin_dir_url() will return a
* funky URL that includes the actual file path (e.g.
* /srv/www/site_name/wp-content/...)
*/
$is_theme = false;
if ( strpos( $plugin_dir, $bfa_directory ) !== false ) {
$is_theme = true;
}
/**
* Check if we're inside a theme or plugin.
*
* If we're in a theme, than plugin_dir_url() will return a
* funky URL that includes the actual file path (e.g.
* /srv/www/site_name/wp-content/...)
*/
$is_theme = false;
if ( strpos( $plugin_dir, $bfa_directory ) !== false ) {
$is_theme = true;
}

// First check if we're inside a theme.
if ( $is_theme ) {
// First check if we're inside a theme.
if ( $is_theme ) {

// Get relative BFA directory by removing theme root directory path.
$bfa_rel_path = str_replace( $theme_directory, '', $bfa_directory );
$this->root_url = trailingslashit( get_stylesheet_directory_uri() . $bfa_rel_path );
// Use appropriate file paths for parent themes and child themes.
if ( strpos( $bfa_directory, $theme_directory ) !== false ) {

// Get relative BFA directory by removing theme root directory path.
$bfa_rel_path = str_replace( $theme_directory, '', $bfa_directory );
$this->root_url = trailingslashit( get_template_directory_uri() . $bfa_rel_path );

} else {

$bfa_rel_path = str_replace( $child_theme_directory, '', $bfa_directory );
$this->root_url = trailingslashit( get_stylesheet_directory_uri() . $bfa_rel_path );

}

} else { // Otherwise we're inside a plugin.

$this->root_url = trailingslashit( plugin_dir_url( __FILE__ ) );

}

} else { // Otherwise we're inside a plugin.
$this->root_url = trailingslashit( plugin_dir_url( __FILE__ ) );
}
}

/**
Expand Down

0 comments on commit 3e3672d

Please sign in to comment.