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 | |
$args = [ | |
'post_type' => 'events', | |
'posts_per_page' => -1, | |
'post_status' => 'publish', | |
'tax_query' => [ | |
[ | |
'taxonomy' => 'event_terms', | |
'field' => 'slug', | |
'terms' => 'event_past', |
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 | |
/** | |
* Soma um ou mais horários no formato 00:00 | |
* | |
* @link https://vijayasankarn.wordpress.com/2016/12/27/sum-n-times-php/ | |
* | |
* @param array $times Lista de horários para somar | |
* @return string | |
*/ | |
function increment_time(array $times) |
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
#define GIT_COLOR_NORMAL "" | |
#define GIT_COLOR_RESET "\033[m" | |
#define GIT_COLOR_BOLD "\033[1m" | |
#define GIT_COLOR_RED "\033[31m" | |
#define GIT_COLOR_GREEN "\033[32m" | |
#define GIT_COLOR_YELLOW "\033[33m" | |
#define GIT_COLOR_BLUE "\033[34m" | |
#define GIT_COLOR_MAGENTA "\033[35m" | |
#define GIT_COLOR_CYAN "\033[36m" | |
#define GIT_COLOR_BOLD_RED "\033[1;31m" |
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
/* Modal */ | |
.reports-modal{ | |
position: absolute; | |
width: 80%; | |
min-height: 400px; | |
height: auto; | |
z-index: 1900; | |
background-color: #fff; | |
padding: 0.75rem; | |
border-top: 4px solid #1c5690; |
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
for F in *.png; do cwebp $F -o `basename ${F%.png}`.webp; done |
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 | |
/** | |
* Change `post_tag` to hierarchical example | |
* | |
* @author Everaldo Matias <https://everaldo.dev> | |
* | |
* @see https://developer.wordpress.org/reference/hooks/init/ | |
* @see https://developer.wordpress.org/reference/functions/get_taxonomy/ | |
* @see https://developer.wordpress.org/reference/functions/register_taxonomy/ |
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 | |
if ( get_query_var( 'paged' ) ) { | |
$paged = get_query_var( 'paged' ); | |
} else if ( get_query_var( 'page' ) ) { | |
$paged = get_query_var( 'page' ); | |
} else { | |
$paged = 1; | |
} |
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 | |
/** | |
* | |
* Use this function when using the WPML plugin on your WordPress, | |
* to return all terms and all languages | |
* | |
* @author https://stackoverflow.com/users/2307600/alin-razvan | |
* @link https://stackoverflow.com/questions/66062846/wordpress-wpml-plugin-get-terms-returns-data-only-for-current-language-i-wan/#answer-66062847 | |
* @link https://developer.wordpress.org/reference/functions/get_terms/ |
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
.ratio { | |
// aspect-ratio: 16 / 9; | |
overflow: hidden; | |
position: relative; | |
&::before { | |
content: ""; | |
padding-top: 56.25%; | |
float: left; | |
} |
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 | |
/** | |
* This file handles redirecting of our templates to our given views | |
* dir and anything else. | |
* | |
* Check if the themer has made a theme file in their | |
* theme dir, if not load our default. | |
* | |
* @uses template_redirect http://codex.wordpress.org/Plugin_API/Action_Reference/template_redirect | |
*/ |