Comments (2)
Hi @jacktaffa,
thanks for your suggestion. The downside of including get_stylesheet_directory()
functions is performance as it uses function calls and filters to retrieve the directory of the active theme:
/**
* Retrieves stylesheet directory path for the active theme.
*
* @since 1.5.0
* @since 6.4.0 Memoizes filter execution so that it only runs once for the current theme.
* @since 6.4.2 Memoization removed.
*
* @return string Path to active theme's stylesheet directory.
*/
function get_stylesheet_directory() {
$stylesheet = get_stylesheet();
$theme_root = get_theme_root( $stylesheet );
$stylesheet_dir = "$theme_root/$stylesheet";
/**
* Filters the stylesheet directory path for the active theme.
*
* @since 1.5.0
*
* @param string $stylesheet_dir Absolute path to the active theme.
* @param string $stylesheet Directory name of the active theme.
* @param string $theme_root Absolute path to themes directory.
*/
return apply_filters( 'stylesheet_directory', $stylesheet_dir, $stylesheet, $theme_root );
}
__DIR__
is a plain PHP constant.
In the end you'd have to search/replace this value only four times in your functions.php
to achieve what you want. And frankly, this is an edge case, as the majority of users don't combine this Starter Theme with a Child Theme.
So there is a slight preference to keep it the way it is.
Is this ok for you?
from starter-bootstrap.
ok , Idk about how many milliseconds we are talking about, but if this theme it will have no updates I think it's okay replacing when there's the necessity of child theme
from starter-bootstrap.
Related Issues (20)
- New user of this wonderful starter theme and upgrade, add zip package creation HOT 1
- Gutenberg Block Editor not adding styles. HOT 1
- How can I import jQuery and other js files to main.js? HOT 6
- Error in plugin "webpack-stream" HOT 1
- Latency with Browser reload HOT 1
- Why both gulp and webpack ?? HOT 1
- the_content(); does not work anywhere in template
- Site brand logo? (Navbar) HOT 1
- Please show a woocommerce sample HOT 1
- WordPress 6.01 Breaks Menu HOT 2
- Deprecated dependencies? HOT 2
- wordpresscom include HOT 1
- Use of content width HOT 1
- Inconsistent use of curly braces for implications HOT 1
- Critical Error Caused by Footer HOT 1
- Color modes not work HOT 2
- Css HOT 4
- Package vulnerabilities HOT 2
- Problem with the webpack config HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from starter-bootstrap.