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 | |
/** | |
* Include inline svg with + allow custom attributes as php function arguments | |
* | |
* Based on | |
* https://gist.github.com/kingkool68/6d72977fe8c82eeb9a85295ac3623cde#file-svg-functions-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
# Splits video to separate scenes files when full black frames are found in the video | |
# Inspired by https://gist.github.com/achesco/4dc2ebf13378a0a61fc26c7fe01f539e | |
# Who got inspired by https://stackoverflow.com/a/38205105 | |
#!/bin/bash | |
file="" | |
out="./" | |
dur=0.05 | |
stripaudio="" |
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 | |
/** | |
* Add this to your filters.php file in a Sage 10 theme. | |
* It will look at "resources/views/core/{blockname}.blade.php | |
* and render the view with "block_content" and "block" as variables. | |
* | |
* You can also use View Composers built in Sage 10 to pass more | |
* data to the block as you wish. For ACF blocks, I recommend | |
* generoi/sage-acfblocks which is definitely the cleanest | |
* method to include ACF blocks in Sage 10 I found so far. |
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 | |
/** | |
* Create a globally accessible counter for all queries | |
* Even custom new WP_Query! Include inside functions.php in your theme. | |
* This allows you to have a post counter available in your sub-templates | |
* accessible even if you use get_template_part(); | |
* | |
* Example | |
* | |
* global $current_loop_post_index; |
NewerOlder