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
/** | |
* | |
* Função para retornar tag <span> com ícone da biblioteca Glyphicons | |
* | |
* @author Everaldo Matias <http://everaldomatias.github.io> | |
* @version 0.1 | |
* @since 22/02/2018 | |
* @link https://gist.github.com/everaldomatias/e3f7af6eaa19037d7046c39f6c860390 | |
* @param $icon string que irá receber a especificação do ícone | |
* @example <?php echo get_glyphicon( 'glyphicon-heart' ); ?> |
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
/** | |
* | |
* Função para criar usuário administrador no WordPress via FTP | |
* | |
* @since 17/04/2018 | |
* @see https://brasa.art.br/como-adicionar-um-usuario-no-wordpress-pelo-ftp/ | |
* @return void | |
* | |
*/ |
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
/* | |
Adiciona máscara em CPF e CNPJ no mesmo campo | |
Caso precise você pode mudar o seletor para usar um ID ou class. | |
Fonte: https://jsfiddle.net/pdd8g4mf/ | |
*/ | |
var CpfCnpjMaskBehavior = function (val) { | |
return val.replace(/\D/g, '').length <= 11 ? '000.000.000-009' : '00.000.000/0000-00'; | |
}, | |
cpfCnpjpOptions = { |
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
'use strict'; | |
var gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
var watch = require('gulp-watch'); | |
var concat = require('gulp-concat'); | |
var cleanCSS = require('gulp-clean-css'); | |
sass.compiler = require('node-sass'); | |
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 virtual page on WordPress hierarchy | |
* @link https://metabox.io/how-to-create-a-virtual-page-in-wordpress/ | |
*/ | |
add_filter( 'generate_rewrite_rules', function ( $wp_rewrite ){ | |
$wp_rewrite->rules = array_merge( | |
['example/(\w+)/?$' => 'index.php?exp=$matches[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 | |
[ | |
'name' => __( '', '' ), | |
'singular_name' => __( '', '' ), | |
'add_new' => __( '', '' ), | |
'add_new_item' => __( '', '' ), | |
'edit_item' => __( '', '' ), | |
'new_item' => __( '', '' ), | |
'view_item' => __( '', '' ), | |
'view_items' => __( '', '' ), |
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 | |
/** | |
* | |
* Função para remover um stylesheet do WordPress. | |
* Por padrão o WordPress imprime o ID do style na tag <link> com um sufixo -css, exemplo 'theme-media-css', nesse caso o ID é apenas 'theme-media' | |
* | |
* @author Everaldo Matias <https://everaldo.dev> | |
* @uses Aplique no functions.php do seu tema (ou plugin) | |
* @since 20191022 |
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 | |
/** | |
* | |
* Config, Panels, Sections and Fields by Kirki | |
* | |
* @link https://kirki.org/ | |
* @author Everaldo Matias <https://everaldo.dev> | |
* @since 16/01/2020 | |
* @version 1.0 |
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
if ( ! function_exists( 'auto_create_category' ) ) { | |
/** | |
* | |
* Create category with specific CPT is create or updated | |
* | |
* @author Everaldo Matias | |
* @link https://everaldo.dev | |
* | |
* @version 1.0 |
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
if( !function_exists( 'the_file_size' ) ) { | |
/** | |
* | |
* WordPress function for get file size in attachment | |
* | |
* @author Everaldo Matias | |
* @link https://everaldo.dev | |
* | |
* @version 1.0 |