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 | |
/** | |
* Gravity Forms Antispam | |
* Check if field has a predefined value | |
* https://docs.gravityforms.com/gform_field_validation/#1-number-field-validation | |
*/ | |
function gf_antispam( $result, $value, $form, $field ) { | |
if ( $result['is_valid'] && intval( $value ) !== 9 ) { |
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 | |
/** | |
* The template for displaying 404 pages (not found) | |
* | |
* @package WordPress | |
* @subpackage Twenty_Fifteen | |
* @since Twenty Fifteen 1.0 | |
*/ | |
get_header(); ?> |
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 | |
/** | |
* The template for displaying 404 pages (not found) | |
* | |
* @package WordPress | |
* @subpackage Twenty_Fifteen | |
* @since Twenty Fifteen 1.0 | |
*/ | |
get_header(); ?> |
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 //Credits: http://0to5.com/protecting-wordpress-media-uploads-unless-user-is-logged-in/ | |
require_once('wp-load.php'); | |
If (!is_user_logged_in()){ | |
$upload_dir = wp_upload_dir(); | |
echo $upload_dir['baseurl'] . '/' . $_GET[ 'file' ]; | |
wp_redirect( wp_login_url( $upload_dir['baseurl'] . '/' . $_GET[ 'file' ])); | |
exit(); | |
} | |
list($basedir) = array_values(array_intersect_key(wp_upload_dir(), array('basedir' => 1)))+array(NULL); |
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
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [L] | |
</IfModule> |
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
/* Post Thumbnail Grid */ | |
.gridcontainer h2 a{color: #333; font-size: 13px;} | |
.gridcontainer .griditemleft{float: left; width: 150px; margin: 0 30px 20px 0;} | |
.gridcontainer .griditemright{float: left; width: 150px;} | |
.gridcontainer .postimage{margin: 0 0 5px 0;} | |
.gridcontainer .postimage-title {text-align: center;} |
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 ( preg_match( '~\.(jpe?g|png|gif|svg|bmp)(\?.*)?$~i', $_SERVER['REQUEST_URI'] ) ) | |
{ | |
header( 'Content-Type: image/png' ); | |
locate_template( 'images/404.png', TRUE, TRUE ); | |
exit; | |
} | |
?> |
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
<a href="http://www.facebook.com/sharer.php?u=<?php echo urlencode(get_permalink($post->ID)); ?>&t=<?php echo rawurlencode(get_the_title()); ?>" target="_blank">Artikel bei Facebook posten</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
<?php | |
// Shortcodes für 2 Spalten | |
// Linke Spalte | |
function basic_leftcolumn($atts, $content = null) { | |
if(!empty($content)){ | |
return do_shortcode('<div class="leftcolumn">' . $content . '</div>');} | |
return '<div class="leftcolumn">' . $content . '</div>'; | |
} |
NewerOlder