This file contains hidden or 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
/* | |
Theme Name: WH HTML Theme | |
Theme URI: https://wordpress-handbuch.com | |
Author: WordPress-Handbuch | |
Author URI: https://wordpress-handbuch.com | |
Description: Just the meta tags for building a style.css file from the scratch | |
Version: 0.1 | |
License: GNU General Public License v2 or later | |
License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
Text Domain: whhtmltheme |
This file contains hidden or 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 | |
add_action( 'wp_enqueue_scripts', 'twentynineteen_child_enqueue_styles' ); | |
function twentynineteen_child_enqueue_styles() { | |
$parent_style = 'twentynineteen-style'; | |
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' ); | |
wp_enqueue_style( 'twentynineteen-child-style', | |
get_stylesheet_directory_uri() . '/style.css', | |
array( $parent_style ), | |
filemtime(get_stylesheet_directory() . '/style.css') | |
); |
This file contains hidden or 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 | |
/** | |
* @package WH_Event_Widget | |
* @version 1.0.0 | |
*/ | |
/* | |
Plugin Name: WH Event Widget | |
Plugin URI: https://wordpress-handbuch.com | |
Description: Anzeige aktueller Veranstaltungen | |
Author: Johannes Mustermann |
This file contains hidden or 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: WH Custom Post Type | |
* Version: 0.4 | |
*/ | |
function add_wh_events() { | |
$labels = array( | |
'name' => 'Veranstaltungen', | |
'singular_name' => 'Veranstaltung', | |
'add_new' => 'Erstellen', |
This file contains hidden or 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: WH Custom Post Type | |
* Version: 0.3 | |
*/ | |
function add_wh_events() { | |
$labels = array( | |
'name' => 'Veranstaltungen', | |
'singular_name' => 'Veranstaltung', | |
'add_new' => 'Erstellen', |
This file contains hidden or 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
if ( $custom = get_post_custom() ) { | |
$location = ( isset($custom['location'][0] )) ? 'in ' . $custom['location'][0] : ''; | |
$eventdate = ( isset($custom['eventdate'][0] )) ? 'am ' . date_i18n(get_option( 'date_format' ), strtotime($custom['eventdate'][0])) : ''; | |
if ( !empty( $location ) || !empty ($location)) { | |
echo ' <h3 class="comments-area">Veranstaltung ' . $location . ' ' . $eventdate . '</h3>'; | |
} | |
} |
This file contains hidden or 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: WH Custom Post Type | |
* Version: 0.2 | |
*/ | |
function add_wh_events() { | |
$labels = array( | |
'name' => 'Veranstaltungen', | |
'singular_name' => 'Veranstaltung', | |
'add_new' => 'Erstellen', |
This file contains hidden or 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 wh_remove_comment_links( $content ) { | |
global $allowedtags; | |
$tags = $allowedtags; | |
unset( $tags['a'] ); | |
$content = addslashes( wp_kses( stripslashes( $content ), $tags ) ); | |
return $content; | |
} | |
add_filter( 'pre_comment_content', 'wh_remove_comment_links' ); |
This file contains hidden or 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 wh_emove_url_from_comment_form( $fields ) { | |
unset( $fields['url'] ); | |
return $fields; | |
} | |
add_filter( 'comment_form_default_fields', 'wh_remove_url_from_comment_form' ); |
This file contains hidden or 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 wh_wordpress_backend_footer () { | |
echo 'WordPress sauber installiert und konfiguriert dank des umfassenden und sagenhaften <a href="https://wordpress-handbuch.com" target="_blank">WordPress-Handbuchs</a></p>'; | |
} | |
add_filter('admin_footer_text', 'wh_wordpress_backend_footer'); |