Skip to content

Instantly share code, notes, and snippets.

View bravokeyl's full-sized avatar
🎉
if loops

bravokeyl bravokeyl

🎉
if loops
View GitHub Profile
@bravokeyl
bravokeyl / functions.php
Last active August 29, 2015 13:59
Remove "Protected" and "Private" prefixes from post tiltes
<?php
/* Removing private and proected prefixes from post titles */
/* uses two filters
* protected_title_format and private_title_format
*/
function spi_remove_private_protected_from_titles( $format ) {
return '%s';
}
add_filter( 'protected_title_format', 'spi_remove_private_protected_from_titles' );
@bravokeyl
bravokeyl / quick-post-meta.php
Last active August 29, 2015 14:14
Post Meta Boxes Quick start
<?php
add_action( 'load-post.php', 'spi_post_meta_boxes_setup' );
add_action( 'load-post-new.php', 'spi_post_meta_boxes_setup' );
function spi_post_meta_boxes_setup() {
add_action( 'add_meta_boxes', 'spi_add_post_meta_boxes' );
add_action( 'save_post', 'spi_save_post_meta', 10, 2 );
}
function spi_add_post_meta_boxes() {
@bravokeyl
bravokeyl / media-queires.css
Last active August 29, 2015 14:15
Quick Media Queries
/*iPad Group */
/*iPad both oreintations */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px) {
}
/*iPad Landscape */
@media only screen
and (min-device-width : 768px)
@bravokeyl
bravokeyl / config.json
Last active August 29, 2015 14:26 — forked from anonymous/config.json
Bootstrap Config CSS without Glyph icons and carousel
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
<?php
remove_action('genesis_before_loop', 'genesis_do_breadcrumbs');
remove_action('genesis_entry_header', 'genesis_entry_header_markup_open', 5);
remove_action('genesis_entry_header', 'genesis_do_post_title');
remove_action('genesis_entry_header', 'genesis_post_info', 12);
remove_action('genesis_entry_header', 'genesis_entry_header_markup_close', 15);
remove_action('genesis_entry_content', 'genesis_do_post_image', 8);
@bravokeyl
bravokeyl / functions.php
Last active March 3, 2016 05:38
Daydreams functions.php
<?php
// Uncomment this to test your localization, make sure to enter the right language code.
// function test_localization( $locale ) {
// return "nl_NL";
// }
// add_filter('locale','test_localization');
load_theme_textdomain('studiopress', TEMPLATEPATH.'/languages/');
@bravokeyl
bravokeyl / git-log.md
Last active April 1, 2016 10:43
Git Log Pretty Format

git config --global alias.plg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"

<?php
/*
Plugin Name: Instrument Hooks for WordPress
Description: Instruments Hooks for a Page. Outputs during the Shutdown Hook.
Version: 0.1
Author: Mike Schinkel
Author URI: http://mikeschinkel.com
*/
if (isset($_GET['instrument']) && $_GET['instrument']=='hooks') {
## Cross-compilation commands
CC = arm-none-eabi-gcc
LD = arm-none-eabi-gcc
AR = arm-none-eabi-ar
AS = arm-none-eabi-as
OBJCOPY = arm-none-eabi-objcopy
OBJDUMP = arm-none-eabi-objdump
SIZE = arm-none-eabi-size
# our code