View functions.php
This file contains 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 | |
/** | |
* Erweitert post_class() um eine Klasse für Elternkategorien. | |
* | |
* @author Dominik Schilling | |
* @license GPLv2 | |
* @link http://wpgrafie.de/178/ | |
* | |
* @version 0.2 | |
*/ |
View jquery.plusone.js
This file contains 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
( function( $ ) { | |
$( document ).ready( function() { | |
// Skript wird nur geladen, wenn ein Artikel in der Einzelansicht angezeigt wird. | |
if ( $( 'body.single' ).length ) { | |
$.ajax( { | |
type: 'GET', | |
url: 'https://apis.google.com/js/plusone.js', // Link zur plusone.js Datei. | |
timeout: 1000, // Passiert innerhalb von 1000ms nichts, wird der Ladevorgang abgebrochen. | |
dataType: 'script', | |
cache: true, // Javascript Datei cachen lassen. |
View functions.php
This file contains 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 | |
/** | |
* Setzt die Seitenbasis für die Permalinkgenerierung auf /seite/ (Standard: /page/). | |
* | |
* @author Dominik Schilling | |
* @license GPLv2 | |
* @link http://wpgrafie.de/141/ | |
* | |
* @version 0.1 | |
*/ |
View archive.php
This file contains 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 | |
if ( ds_is_taxonomy_assigned_to_post_type( 'schnipsel' ) ) | |
echo '<h3>Schnipsel Archiv</h3>'; | |
else | |
echo '<h3>Archiv</h3>'; |
View box-shadow.html
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Box Shadow</title> | |
<style> | |
.box { | |
height: 150px; | |
width: 300px; | |
margin: 20px; |
View debug.php
This file contains 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 | |
/** | |
* Debug WordPress filters. | |
* | |
* Use add_action( 'shutdown', 'ds_debug_filters' ) to display all used | |
* filters with the functions hooked into the filter. | |
* | |
* @author Dominik Schilling | |
* @license GPLv2 | |
* @link http://wpgrafie.de/262/ |
View newinstall.php
This file contains 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 | |
/* Place the file into WordPress root folder and open the file in your browser. */ | |
/* Settings */ | |
define( 'BLOG_TITLE', 'WordPress Dev' ); | |
define( 'USER_NAME', 'admin' ); | |
define( 'USER_EMAIL', 'foobar@example.com' ); | |
define( 'USER_PASSWORD', '123456' ); | |
define( 'WP_SITEURL', 'http://wp.dev' ); |
View scrollback.php
This file contains 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 | |
/** | |
* Adds a hidden input field for scrolltop value. | |
* | |
* @return void | |
*/ | |
function ds_scrollto_input() { | |
$position = ! empty( $_GET['scrollto'] ) ? $_GET['scrollto'] : 0; | |
printf( '<input type="hidden" id="scrollto" name="scrollto" value="%d"/>', esc_attr( $position ) ); |
View fixit.php
This file contains 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 | |
// See http://wordpress.org/extend/plugins/debug-bar/ | |
remove_action( 'admin_bar_menu', array( 'Debug_Bar', 'admin_bar_menu' ), 1000 ); | |
add_action( 'admin_bar_menu', 'ds_fix_debug_bar_menu', 5 ); | |
function ds_fix_debug_bar_menu( $wp_admin_bar ) { | |
$wp_admin_bar->add_menu( array( | |
'parent' => 'top-secondary', | |
'id' => 'debug-bar', |
OlderNewer