Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View maxxscho's full-sized avatar
🏠
Working from home

Markus Schober maxxscho

🏠
Working from home
View GitHub Profile
@maxxscho
maxxscho / gist:1992354
Created March 7, 2012 10:08
CSS: Clearing (from Skeleton)
/* CLEARING
============================================================================ */
/* Self Clearing Goodness */
.container:after { content: "\0020"; display: block; height: 0; clear: both; visibility: hidden; }
/* Use clearfix class on parent to clear nested columns,
or wrap each row of columns in a <div class="row"> */
.clearfix:before,
.clearfix:after,
.row:before,
@maxxscho
maxxscho / custom_post_type_slider_image.php
Created March 7, 2012 10:17
Wordpress: Custom Post Type Template
<?php
/* !-------- CUSTOM POST TYPE ------------------- */
/*------------------------------------------------------------ */
/**
* This is a Template for a Custom Post Type, in this case a Slider Image Post Type.
* I use this Post Type for Slideshows like Flexslider.
* Copy this file and/or customize it for you needs.
*/
@maxxscho
maxxscho / functions.php
Created March 7, 2012 10:19
Wordpress: Body Class (functions.php)
/* !-------- BODY-TAG BROWSER CLASSES ------------------- */
/*------------------------------------------------------------ */
function bb_browser_class($classes) {
global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone;
if($is_lynx) $classes[] = 'browser-lynx';
elseif($is_gecko) $classes[] = 'browser-gecko';
elseif($is_opera) $classes[] = 'browser-opera';
elseif($is_NS4) $classes[] = 'browser-ns4';
elseif($is_safari) $classes[] = 'browser-safari';
@maxxscho
maxxscho / EmptyWidget.php
Created March 7, 2012 10:24 — forked from jonathonbyrdziak/CustomWidgetFile.php
Wordpress: Plugin code to create a single widget in wordpress.
<?php
/**
* @package RedRokk
* @version 1.0.0
*
* Plugin Name: Empty Widget
* Description: Single Widget Class handles all of the widget responsibility, all that you need to do is create the html. Just use Find/Replace on the Empty_Widget keyword to rebrand this class for your needs.
* Author: RedRokk Interactive Media
* Version: 1.0.0
* Author URI: http://www.redrokk.com
@maxxscho
maxxscho / functions.php
Created March 8, 2012 07:04
Wordpress: Remove unnecessary Headlinks
/* !-------- REMOVE UNNECESSARY HEADLINKS ------------------- */
/*------------------------------------------------------------ */
function bb_remove_headlinks() {
// remove simple discovery link
remove_action('wp_head', 'rsd_link');
// remove windows live writer link
remove_action('wp_head', 'wlwmanifest_link');
// remove the version number
remove_action('wp_head', 'wp_generator');
remove_action('wp_head', 'start_post_rel_link');
@maxxscho
maxxscho / style.css
Created March 11, 2012 10:47
CSS: text-indent - new Way
.ti {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
/* this is just the text-indent, no width, no height, no background image */
@maxxscho
maxxscho / functions.php
Created March 17, 2012 12:48
Wordpress: Shortcode Empty Paragraph fix
function shortcode_empty_paragraph_fix($content)
{
$array = array (
'<p>[' => '[',
']</p>' => ']',
']<br />' => ']'
);
$content = strtr($content, $array);
@maxxscho
maxxscho / style.css
Created April 19, 2012 07:34
Wordpress Default CSS Styles
/* !-------- WORDPRESS CLASSES ------------------- */
/*------------------------------------------------------------ *\
\*------------------------------------------------------------ */
/* !-- WP WYSIWYG Editor Styles -- */
.entry-content img {
margin: 0 0 1.5em 0;
}
.alignleft, img.alignleft {
margin-right: 1.5em;
@maxxscho
maxxscho / toolbar-hooks.php
Created June 19, 2012 17:33 — forked from thefuxia/toolbar-hooks.php
T5 Toolbar hooks: Adds a toolbar item with the current page hooks.
<?php # -*- coding: utf-8 -*-
/**
* Plugin Name: T5 Toolbar hooks
* Description: Adds a toolbar item with the current page hooks.
* Version: 2012.06.19
* Author: Thomas Scholz <info@toscho.de>
* Author URI: http://toscho.de
* License: MIT
* License URI: http://www.opensource.org/licenses/mit-license.php
*/
@maxxscho
maxxscho / Form_helper.php
Created August 21, 2012 08:27
Twitter Bootstrap Form Helper
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Generates the HTML for a Twitter Bootstrap Input
*
* @var string
* @author Markus Schober
**/
if ( !function_exists('tb_horizontal_input')) {