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
add_filter('body_class','body_class_section'); | |
function body_class_section($classes) { | |
global $wpdb, $post; | |
if (is_page()) { | |
if ($post->post_parent) { | |
$parent = end(get_post_ancestors($current_page_id)); | |
} else { | |
$parent = $post->ID; | |
} | |
$post_data = get_post($parent, ARRAY_A); |
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
wp_register_script( 'cycle', 'http://malsup.github.com/jquery.cycle.all.js'); | |
wp_enqueue_script( 'cycle' ); |
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
add_filter('widget_text', 'gibmirphp', 99); | |
function gibmirphp($text) { | |
if (strpos($text, '<' . '?') !== false) { | |
ob_start(); | |
eval('?' . '>' . $text); | |
$text = ob_get_contents(); | |
ob_end_clean(); | |
} | |
return $text; |
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
add_action( 'wp_print_scripts', 'add_my_scripts', 100 ); | |
function add_my_scripts() { | |
if ( !is_admin() ) { | |
wp_deregister_script( 'jquery' ); | |
wp_register_script( 'jquery', ( 'http://www.PFAD-ZUR-EIGENEN-JQUERY-DATEI.com' ), false, null, true ); | |
wp_enqueue_script( 'jquery' ); | |
wp_register_script( 'eigenes-script', 'http://www.EIGENES-SCRIPT.com'); | |
wp_enqueue_script( 'eigenes-script' ); | |
} } | |
add_action('init', 'add_my_scripts'); |
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
add_action('wp_print_styles', 'add_my_styles', 100); | |
function add_my_styles() { | |
wp_register_style( 'eigene-css', 'http://www.PFAD-ZUR-EIGENEN-CSS-DATEI.com'); | |
wp_enqueue_style( 'eigene-css' ); | |
} | |
add_action('init', 'add_my_styles'); |
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
<link rel="shortcut icon" href="/pfad/zum/favicon.ico"> |
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
add_filter('upload_mimes', 'eigene_upload_mimes'); | |
function eigene_upload_mimes( $vorhandene_mimes ){ | |
$vorhandene_mimes['zip'] = 'application/zip'; | |
$vorhandene_mimes['swf'] = 'application/x-shockwave-flash'; | |
$vorhandene_mimes['rtf'] = 'text/richtext'; | |
$vorhandene_mimes['tiff'] = 'image/tiff'; | |
return $vorhandene_mimes; | |
} |
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 Pixelbar_AddSpellChecker($initArray){ | |
$initArray['spellchecker_languages'] = '+Francais=fr, +Deutsch=de, English=en'; | |
return $initArray; | |
} | |
add_filter('tiny_mce_before_init', 'Pixelbar_AddSpellChecker'); |
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
add_filter('wp_generate_attachment_metadata','replace_uploaded_image'); | |
function replace_uploaded_image($image_data) | |
{ | |
// if there is no large image : return | |
if ( !isset($image_data['sizes']['large']) ) | |
return $image_data; | |
// paths to the uploaded image and the large image | |
$upload_dir = wp_upload_dir(); |
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
add_image_size( 'neues-mass', 1600, 1200 ); |
OlderNewer