Skip to content

Instantly share code, notes, and snippets.

View brunolimadevelopment's full-sized avatar
:octocat:
loading to next level...

Bruno brunolimadevelopment

:octocat:
loading to next level...
View GitHub Profile
$wp_customize->add_section( 'cd_colors' , array(
'title' => 'Colors',
'priority' => 30,
) );
<form method="post">
<input type="submit" value="Comprar"/>
</form>
<br/>
<h2>Código do cupom</h2>
<br/>
<?php echo generateRandomString(); ?>
@brunolimadevelopment
brunolimadevelopment / Calendario JQUERY
Created September 14, 2018 18:14
Calendario JQUERY
// ID no HTML
[text* text-897 id:DataMuda placeholder "Data que precisa da muda"]
// ADC NO FOOTER
<script src="http://code.jquery.com/ui/1.9.0/jquery-ui.js"></script>
// JS
$("#DataMuda").datepicker({
dateFormat: 'dd/mm/yy',
dayNames: ['Domingo','Segunda','Terça','Quarta','Quinta','Sexta','Sábado'],
@brunolimadevelopment
brunolimadevelopment / git.md
Created July 27, 2019 17:15 — forked from leocomelli/git.md
Lista de comandos úteis do GIT

#GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda

@brunolimadevelopment
brunolimadevelopment / Vardump - PHP
Last active March 13, 2020 00:46
Snippet PHP - VSCODE
// No arquivo php.json do VSCode, abaixo da linha de comentários insira o código abaixo.
"Vardump - PHP": {
"prefix": "vardump",
"body": [
"echo '<div class=\"code\"><pre>🐘🐱‍👤';",
"var_dump($0);",
"echo '</pre></div>';",
],
"description": "Deixa o vardump com uma melhor visualização."
}
// arquivo.js
{
"events": [
{
"location": "javascript",
"date": "May 1",
"map": "img/javascript.png"
},
{
"location": "jquery",
@brunolimadevelopment
brunolimadevelopment / [WP] Carregando CSS e JS para customizar o Admin
Last active March 6, 2020 04:20
[WP] Carregando CSS e JS para customizar o Admin
// VERIFICA O TIPO DE USUÁRIO
function is_site_admin(){
return in_array(
'administrator', wp_get_current_user()->roles
);
}
// CRIA OS ARQUIVOS DE STYLO E JS E CHAMA NO HEADER DO ADMIN
function load_admin_styles_custom() {
@brunolimadevelopment
brunolimadevelopment / [WP] Registrando sidebar Widgets
Created March 6, 2020 04:26
[WP] Registrando sidebar Widgets - Insira o código no arquivo functions.php do tema.
<?php
/**
* Register widget area.
*
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
*/
function twentyseventeen_widgets_init() {
register_sidebar(
array(