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
echo apply_filters( 'the_content', get_post_field('post_content', $my_postid ) ); |
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
// Modifica o html do video embebedado para ficar responsivo | |
add_filter( 'embed_oembed_html','oembed_result', 10, 3 ); | |
function oembed_result( $html, $url, $args ) { | |
if( strstr( $url, 'youtu' ) ){ | |
$video_pattern = '~(?:http|https|)(?::\/\/|)(?:www.|)(?:youtu\.be\/|youtube\.com(?:\/embed\/|\/v\/|\/watch\?v=|\/ytscreeningroom\?v=|\/feeds\/api\/videos\/|\/user\S*[^\w\-\s]|\S*[^\w\-\s]))([\w\-]{11})[a-z0-9;:@#?&%=+\/\$_.-]*~i'; | |
$video_id = ( preg_replace( $video_pattern, '$1', $url ) ); | |
$html = '<div class="video-container"><iframe src="https://www.youtube.com/embed/' . $video_id . '" frameborder="0" allowfullscreen'; | |
foreach ( $args as $key => $value ) { |
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
// custom shortcode [a href="http://www.google.com" onclick="test()" rel="nofollow" title="Click here" name="link"]Click me[/a] | |
function ahref_func($atts, $content=null) { | |
extract( shortcode_atts( array( | |
'href' => '', | |
'onclick' => '', | |
'rel' => '', | |
'title' => '', | |
'class' => '', | |
'name' => '' | |
), $atts )); |
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
// Modificando o nome dos Posts para Produtos | |
function mg_change_post_menu_label() { | |
global $menu; | |
global $submenu; | |
$menu[5][0] = 'Produtos'; | |
$submenu['edit.php'][5][0] = 'Produtos'; | |
$submenu['edit.php'][10][0] = 'Adicionar produto'; | |
} | |
function mg_change_post_object_label() { |
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('acf_add_options_page') ) { | |
$args = array( | |
'page_title' => 'Opções', | |
/* (string) The title displayed in the wp-admin sidebar. Defaults to page_title */ | |
'menu_title' => '', | |
/* (string) The slug name to refer to this menu by (should be unique for this menu). | |
Defaults to a url friendly version of menu_slug */ | |
'menu_slug' => '', |
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
Log level set to 287 | |
GNU LilyPond 2.18.2 | |
Relocation: from PATH=/home/tacensi/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/tacensi/bin:/usr/lib/wine/bin:/sbin:/usr/sbin:/usr/local/bin:/home/tacensi/.composer/vendor/bin | |
argv0=lilypond | |
PATH=/usr/bin (prepend) | |
Setting PATH to /usr/bin:/home/tacensi/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/tacensi/bin:/usr/lib/wine/bin:/sbin:/usr/sbin:/usr/local/bin:/home/tacensi/.composer/vendor/bin | |
Relocation: compile datadir=, new datadir=/usr/share/lilypond//2.18.2 | |
Relocation: framework_prefix=/usr/bin/.. | |
Setting INSTALLER_PREFIX to /usr/bin/.. | |
PATH=/usr/bin/../bin (prepend) |
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
<select name="uf" id="uf"> | |
<option value="">Selecione</option> | |
<option value="AC">AC</option> | |
<option value="AL">AL</option> | |
<option value="AM">AM</option> | |
<option value="AP">AP</option> | |
<option value="BA">BA</option> | |
<option value="CE">CE</option> | |
<option value="DF">DF</option> | |
<option value="ES">ES</option> |
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
jQuery.validator.addMethod("cnpj", function(cnpj, element) { | |
var numeros, digitos, soma, resultado, pos, tamanho, | |
digitos_iguais = true; | |
if (cnpj.length < 14 && cnpj.length > 15) | |
return false; | |
for (var i = 0; i < cnpj.length - 1; i++) | |
if (cnpj.charAt(i) != cnpj.charAt(i + 1)) { |