This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command
$ docker-compose up -d
# To Tear Down
$ docker-compose down --volumes
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
$_evento = get_proximos_eventos(1); | |
$evento = $_evento[0]; | |
$unixtimestamp_inicio = strtotime($evento['data_inicio']); | |
echo date_i18n('M', $unixtimestamp_inicio); // Abril | |
// Depending on your blog settings you will see the date displayed in your local format, for example: 15. november 1976. | |
echo date_i18n( get_option( 'date_format' ), strtotime( '11/15-1976' ) ); |
// ============================================================================= | |
// String Replace | |
// ============================================================================= | |
@function str-replace($string, $search, $replace: '') { | |
$index: str-index($string, $search); | |
@if $index { | |
@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace); | |
} |
/* | |
This .scss loop will create "margin helpers" and "padding helpers" for use in your web projects. | |
It will generate several classes such as: | |
.m-r-10 which gives margin-right 10 pixels. | |
.m-r-15 gives MARGIN to the RIGHT 15 pixels. | |
.m-t-15 gives MARGIN to the TOP 15 pixels and so on. | |
.p-b-5 gives PADDING to the BOTTOM of 5 pixels | |
.p-l-40 gives PADDING to the LEFT of 40 pixels |
/* ---------------- | |
This is an inplace message component (not dialog, toaster, snackbar or modal) | |
It must be used with Material UI | |
Usage: | |
<Message | |
type="success" | |
title="Congratulations!" | |
content="Your documents fulfill all the requirements. We'll contact you soon." /> |
/* ---------------- | |
It changes the output HTML of Wordpress default gallery | |
Originally implemented by t31os (Wordpress Stack Exchange) | |
Alan | |
----------------- */ |
/* | |
---------- Shortcode for Youtube videos | |
Alan | |
*/ | |
class short_youtube { | |
function shortcode($atts, $content = null) | |
{ | |
extract(shortcode_atts(array( | |
'alinhamento' => '', |
<?php | |
$args = array( | |
'blog_id' => $GLOBALS['blog_id'], | |
'role' => 'author', | |
'role__in' => array(), | |
'role__not_in' => array(), | |
'meta_key' => '', | |
'meta_value' => '', | |
'meta_compare' => '', | |
'meta_query' => array(), |