This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_get_template_part( $slug, $name = null, $vars = [] ) { | |
do_action( 'get_template_part_' . $slug, $slug, $name ); | |
$templates = []; | |
$name = (string) $name; | |
if ( $name !== '' ) { | |
$templates[] = $slug . '-' . $name . '.php'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.3.8) | |
// Compass (v1.0.0.alpha.19) | |
// ---- | |
// An example that injects the dependency into a mixin. | |
// by https://twitter.com/phize | |
// More simple way: @content injection | |
// http://sassmeister.com/gist/3686b8eb3462fef52013 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.3.8) | |
// Compass (v1.0.0.alpha.19) | |
// ---- | |
// Polymorphic components with Sass. | |
// by https://twitter.com/phize | |
// | |
// Dependency Injection: http://sassmeister.com/gist/5122325c0c29889b91c3 | |
// More simple DI: http://sassmeister.com/gist/3686b8eb3462fef52013 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.3.8) | |
// Compass (v1.0.0.alpha.19) | |
// ---- | |
// An example that injects the dependency into your component. | |
// by https://twitter.com/phize | |
// @content injection: | |
// This simple way cannot define actual dependencies in your components, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.3.8) | |
// Compass (v1.0.0.alpha.19) | |
// ---- | |
// Sass: Type hinting with function. | |
// by https://twitter.com/phize | |
// Dependency Injection: @content injection | |
// http://sassmeister.com/gist/3686b8eb3462fef52013 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.3.8) | |
// Compass (v1.0.0.alpha.19) | |
// ---- | |
// This is an example of building decoupled components with Sass | |
// by https://twitter.com/phize | |
// Dependency Injection: mixin injection | |
// http://sassmeister.com/gist/5122325c0c29889b91c3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.3.9) | |
// Compass (v1.0.0.alpha.20) | |
// ---- | |
// This is an example to define private mixin(s)/function(s). | |
// by https://twitter.com/phize | |
// If this is not a bug, it is a bit useful | |
// although there are no way to export private mixin(s)/function(s). |
OlderNewer