Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Markus Schober maxxscho

🏠
Working from home
View GitHub Profile
@maxxscho
maxxscho / gist:1992354
Created Mar 7, 2012
CSS: Clearing (from Skeleton)
View gist:1992354
/* 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 Mar 7, 2012
Wordpress: Custom Post Type Template
View custom_post_type_slider_image.php
<?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 Mar 7, 2012
Wordpress: Body Class (functions.php)
View 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 Mar 7, 2012 — forked from Jonathonbyrd/CustomWidgetFile.php
Wordpress: Plugin code to create a single widget in wordpress.
View EmptyWidget.php
<?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 Mar 8, 2012
Wordpress: Remove unnecessary Headlinks
View functions.php
/* !-------- 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 Mar 11, 2012
CSS: text-indent - new Way
View style.css
.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 Mar 17, 2012
Wordpress: Shortcode Empty Paragraph fix
View functions.php
function shortcode_empty_paragraph_fix($content)
{
$array = array (
'<p>[' => '[',
']</p>' => ']',
']<br />' => ']'
);
$content = strtr($content, $array);
@maxxscho
maxxscho / style.css
Created Apr 19, 2012
Wordpress Default CSS Styles
View style.css
/* !-------- 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 Jun 19, 2012 — forked from thefuxia/toolbar-hooks.php
T5 Toolbar hooks: Adds a toolbar item with the current page hooks.
View toolbar-hooks.php
<?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 Aug 21, 2012
Twitter Bootstrap Form Helper
View Form_helper.php
<?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')) {
You can’t perform that action at this time.