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
<IfModule mod_expires.c> | |
ExpiresActive On | |
FileETag None | |
Header unset ETag | |
ExpiresDefault "access plus 1 month" | |
ExpiresByType text/css "access plus 1 year" | |
ExpiresByType application/atom+xml "access plus 1 hour" | |
ExpiresByType application/rdf+xml "access plus 1 hour" | |
ExpiresByType application/rss+xml "access plus 1 hour" | |
ExpiresByType image/vnd.microsoft.icon "access plus 1 year" |
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 | |
if (!defined('W3TC_DYNAMIC_SECURITY')) { | |
define('W3TC_DYNAMIC_SECURITY', 'geheimesgeheimnis'); | |
} | |
?> | |
<!--mfunc <?php echo W3TC_DYNAMIC_SECURITY; ?> echo 'Gecachter Inhalt: ' . date("Y-m-d", time()); --> | |
<?php echo 'Live-Inhalt: ' . date("Y-m-d", time()); ?> | |
<!--/mfunc <?php echo W3TC_DYNAMIC_SECURITY; ?> --> |
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 | |
global $wp; | |
$urlquery = $wp->request; | |
$urlquery = preg_replace("/(\.*)(html|htm|php)$/","",$urlquery); | |
$parts = explode('/', $urlquery); | |
$keyword = end($parts); | |
echo 'Mal sehen, ob es zum Thema "' . $keyword . '" Blogbeiträge gibt...'; | |
$query = new WP_Query( array( 's' => $keyword ) ); |
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 | |
if ( function_exists('yoast_breadcrumb') ) { | |
yoast_breadcrumb( '<p id="breadcrumbs">','</p>' ); | |
} | |
?> |
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
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | |
php wp-cli.phar --info | |
php wp-cli.phar core verify-checksums | |
php wp-cli.phar plugin verify-checksums --all |
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
add_filter( 'xmlrpc_enabled', '__return_false' ); | |
remove_action('wp_head', 'rsd_link'); |
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
<Files xmlrpc.php> | |
order allow,deny | |
deny from all | |
</Files> |
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_maintenance_mode() { | |
if ( !is_user_logged_in() || !current_user_can('administrator') ) { | |
wp_die( 'Dritte Variante einer Wartungsseite', 'Wartung!', array( 'response' => '503')); | |
} | |
} | |
add_action( 'get_header', 'wh_maintenance_mode' ); |
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_shortcode_boldanditalics( $attributes, $content ) { | |
// Hier kann beliebiger PHP-Code ausgeführt werden | |
return '<b><i>' . $content . '</i></b>'; | |
} | |
add_shortcode( 'fettkursiv', 'wh_shortcode_boldanditalics' ); |
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_add_social_links( $content ) { | |
$content = preg_replace( '/([^a-zA-Z0-9-_&])@([0-9a-zA-Z_]+)/', "$1<a href=\"https://www.instagram.com/$2/\" target=\"_blank\">@$2</a>", $content ); | |
$content = preg_replace( '/([^a-zA-Z0-9-_&])#([0-9a-zA-Z_]+)/', "$1<a href=\"https://www.instagram.com/explore/tags/$2/\" target=\"_blank\">#$2</a>", $content ); | |
return $content; | |
} | |
add_filter( 'the_content', 'wh_add_social_links' ); | |
add_filter( 'comment_text', 'wh_add_social_links' ); |