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
/* | |
* Wegen der häufigen verwendung dieses Selctors Speichern wir | |
* den zu erst in eine Variable. | |
* | |
*/ | |
var formular_input = $('#formular input'); | |
/* | |
* In der Variable formular_input befindet sich ein Obejct |
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('post_submitbox_misc_actions','my_post_option'); | |
add_action( 'save_post', 'save_my_post_option' ); | |
function my_post_option( ){ | |
echo '<div style="border-top:1px solid #DFDFDF;border-bottom:1px solid #FFF;clear:both;" id="post_anonym"><div style="padding: 6px 10px;float:left">'; | |
echo ' Hallo WordPress'; | |
echo '</div></div>'; | |
} | |
function save_my_post_option( $post_id ) { |
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
<? | |
#get_post_meta($post->ID, 'SeoHead', true) | |
$seo_box = 'H1 Headline: Keyword1, Keyword2, Keyword3, Keyword4, Keyword5'; | |
$meta_values = explode(':',$seo_box); | |
if(isset($meta_values[1])){ | |
$keywords = explode(',',$meta_values[1]); | |
$seo_box = '<ul>'; | |
foreach($keywords as $keyword){ |
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 | |
/* | |
Plugin Name: Instrument Hooks for WordPress | |
Plugin URI: http://bueltge.de/ | |
Description: Instruments Hooks for a Page. Outputs during the Shutdown Hook after add get-params <code>?instrument=hooks</code>. | |
Version: 0.0.1 | |
Author: Frank Bültge | |
Author URI: http://bueltge.de/ | |
*/ |
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 my_userfields(){ | |
$output = '<h3>Meine Felder</h3>'; | |
$output .= '<table class="form-table">'; | |
if(isset($_GET['user_id'])){ | |
$user_id = $_GET['user_id']; | |
}else{ | |
$user_id = $_POST['user_id']; | |
} |
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 add_rr_linktitle( $format, $link = FALSE ){ | |
if( $link ) | |
$nex_prev = true; | |
preg_match_all( '/<a href="(.*?)" rel="(.*?)">(.*?)<\/a>/', $format, $matches); | |
return '<a href="' . $matches[1][0] . '" rel="' . $matches[2][0] . '" title="' . get_adjacent_post( false, '', $nex_prev )->post_title . '">' . $matches[3][0] . '</a> '; | |
} | |
add_filter( 'previous_post_link', 'add_rr_linktitle', 9, 2 ); | |
add_filter( 'next_post_link', 'add_rr_linktitle', 9, 1 ); |
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 | |
/* | |
Module Name: Vergib Titel-Tag | |
Module URI: https://plus.google.com/u/0/116520935691953756105/posts/Bq1iaEzC9h1 | |
Description: Titel-Tag für vorherige und folgende Seiten links | |
Author: René Reimann | |
Author URI: http://www.honeymilk.org | |
*/ | |
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 | |
function add_mypage_var($public_query_vars) { | |
$public_query_vars[] = 'blub_key'; | |
return $public_query_vars; | |
} | |
function createRewriteRules() { | |
global $wp_rewrite; |
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 | |
/** | |
* Meine Dokumentation zu der Funktion xyz die dafuer sorgt das XYZ etwas macht | |
* | |
* @autor Rene Reimann | |
* @package Theme XYZ | |
*/ | |
if ( ! class_exists( 'register_custom_post_types' ) ) { |
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 | |
function edit_category_form($tag){ | |
$taxonomy = $tag->taxonomy ; | |
if( $taxonomy != 'category' ){ | |
$taxonomy = 'custom_taxonomy'; | |
} | |