This file contains hidden or 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
var Youtube = (function () { | |
'use strict'; | |
var video, results; | |
var getThumb = function (url, size) { | |
if (url === null) { | |
return ''; | |
} | |
size = (size === null) ? 'big' : size; |
This file contains hidden or 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
<form role="search" method="get" class="searchform" id="searchform" action="<?php echo home_url( '/' ); ?>"> | |
<div><label class="screen-reader-text" for="s"><?php _e('Search for:', 'bonestheme') ?></label> | |
<input type="text" value="" placeholder="<?php _e( 'Search this site', 'bonestheme' )?>" name="s" id="s" /> | |
<input type="submit" id="searchsubmit" value="Submit" /> | |
</div> | |
</form> |
This file contains hidden or 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
/* | |
Change query properties | |
*/ | |
function badah_change_query( $query ) { | |
if ( !is_admin() && $query->is_main_query() ) { | |
if ( $query->is_front_page() ) { | |
$query->set( 'showposts', 1 ); // whatever | |
} | |
} |
This file contains hidden or 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
#URLs | |
UPDATE wp_options SET option_value = replace(option_value, 'http://oldurl.com', 'http://newurl.com') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://oldurl.com','http://newurl.com'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://oldurl.com', 'http://newurl.com'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://oldurl.com','http://newurl.com'); | |
#Media | |
UPDATE wp_posts SET `guid` = REPLACE (`guid`, 'http://oldurl.com', 'http://newurl.com') WHERE post_type = 'attachment'; |
This file contains hidden or 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 | |
//PHP > 5.3 | |
$date = DateTime::createFromFormat('Ymd', get_field('date')); | |
echo $date->format('d/m'); | |
//PHP < 5.3 | |
$date = get_field('date'); | |
// extract d/m |
This file contains hidden or 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 get_header(); ?> | |
<div id="content"> | |
<div id="inner-content" class="wrap cf"> | |
<div id="main" class="m-all t-all d-all cf" role="main"> | |
<!-- TODO: O que é? O que faz (tagline, descrição curta) --> |
This file contains hidden or 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 the following snipet to render shortcode proper in a Wordpress theme | |
function myfunction_func() { | |
// code goes here | |
} | |
function myfunction_func_buffer() { | |
ob_start(); | |
myfunction_func(); |
This file contains hidden or 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
############ | |
## IDEs | |
############ | |
*.pydevproject | |
.project | |
.metadata | |
*.swp | |
*~.nib | |
local.properties |
This file contains hidden or 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
{ | |
"folders": [ | |
{ | |
"path": ".", | |
"folder_exclude_patterns": [ | |
".sass-cache", | |
"node_modules", | |
".phpintel", | |
".settings", | |
"dist", |
OlderNewer