Skip to content

Instantly share code, notes, and snippets.

Ralf Albert RalfAlbert

Block or report user

Report or block RalfAlbert

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@RalfAlbert
RalfAlbert / cc-license_custom_fields.php
Created Feb 7, 2014
Insert a cc license by a custom field.
View cc-license_custom_fields.php
<?php
$cc_licenses = array(
'ccnc' => '<a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/deed.de"><img alt="Creative Commons Lizenzvertrag" style="border-width:0" src="http://i.creativecommons.org/l/by-nc/4.0/88x31.png" /></a><br />Dieses Werk ist lizenziert unter einer <a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/deed.de">Creative Commons Namensnennung-Nicht kommerziell 4.0 International Lizenz</a>.',
'ccncsa' => '<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/deed.de"><img alt="Creative Commons Lizenzvertrag" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a><br />Dieses Werk ist lizenziert unter einer <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/deed.de">Creative Commons Namensnennung - Nicht-kommerziell - Weitergabe unter gleichen Bedingungen 4.0 International Lizenz</a>.';
'ccncnd' => '<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/deed.de"><
@RalfAlbert
RalfAlbert / columns_and_pages.php
Created Feb 11, 2014
WordPress: Zerlegt einen Text in zwei Spalten und verteilt die SApalten auf Seiten.
View columns_and_pages.php
<?php
$content =
<<<CONTENT
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
CONTENT;
function columns_and_pages( $content = NULL ) {
if ( empty( $content ) )
return $content;
@RalfAlbert
RalfAlbert / gist:846666
Created Feb 27, 2011
help.xml & xml.php
View gist:846666
help.xml
========
<?xml version="1.0" encoding="utf-8" ?>
<help_context>
<screen>
<object>example a</object>
<name>testname a</name>
<id>_testid_a</id>
View ExtendedHelp.php
<?php # -*- coding: utf-8 -*-
/*
Plugin Name: Extended Help
Description: Help texts for super heroes
Version: 0.1
Author: Thomas Scholz
Author URI: http://toscho.de
License: GPL
*/
@RalfAlbert
RalfAlbert / gist:865951
Created Mar 11, 2011
WordPress - cipher user_nicename when using get_author_posts_url
View gist:865951
<?php
/*
Plugin Name: Cipher Author in get_author_posts_url
Plugin URI: http://yoda.neun12.de/artikel-29/2
Description: Cipher the author nicename when using get_author_posts_url()
Version: 1.0
Author: Ralf Albert
Author URI: http://neun12.de
*/
@RalfAlbert
RalfAlbert / gist:1090596
Created Jul 18, 2011
Google+ Button Datenschutzkonform
View gist:1090596
$(document).ready( function(){
$('#gplus').click( function(){
jQuery.getScript( 'https://apis.google.com/js/plusone.js' );
$('#gplus').remove();
});
});
@RalfAlbert
RalfAlbert / gist:1090650
Created Jul 18, 2011
Google+ Button Datenschutzkonform mit iFrame
View gist:1090650
$(document).ready( function(){
$('#gplus').click( function(){
var l = window.location;
var url = encodeURIComponent( l.href );
var parent = encodeURIComponent( l.href.replace( l.pathname, '' ) );
var gframe = '<iframe src="https://plusone.google.com/u/0/_/+1/button?'
+ 'url=' + url
+ '&amp;size=standard' +
View figure.htm
<!DOCTYPE html>
<html>
<head>
<title>figure-Tag</title>
<style type="text/css">
.container, .links, .rechts { float:left; padding:5px; margin: 2px }
.container { width:600px }
.links { border:1px solid red }
.rechts { border:1px solid blue }
View class-wordpress-breadcrumb.php
<?php
/**
* Breadcrumb Navigation for WordPress.
*
* @author Dominik Schilling
* @author Ralf Albert
* @license GPLv2
* @link http://wpgrafie.de/204/
*
* @version 0.2
@RalfAlbert
RalfAlbert / codeeditor.php
Created Nov 14, 2011
WP Advanced Code Editor (new version)
View codeeditor.php
<?php
/*
Plugin Name: WP Advanced Code Editor
Plugin URI: http://www.techlyzer.com/wp-advanced-code-editor
Description: Integrates the EasyArea advanced code editor to WordPress, complete with syntax hilighting, line numbering, and full screen editing! Not compatabile with the WYSIWYG editor. Turn it off!
Author: John Kolbert
Version: 1.0
Author URI: http://www.techlyzer.com/
Copyright Notice
You can’t perform that action at this time.