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
$date = date_create_from_format('j-m-d', get_the_date('j-m-d')); | |
$weekday = get_weekday_german($date); | |
function get_weekday_german($date) { | |
$weeksdays = array( | |
'Sunday' => 'Sonntag', | |
'Monday' => 'Montag', | |
'Tuesday' => 'Dienstag', | |
'Wednesday' => 'Mittwoch', |
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
header-{name}.php | |
get_header('{name}); |
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
<script> | |
jQuery( document ).ready(function($) { | |
window.onscroll = function() { | |
getSticky(); | |
}; | |
var header = document.getElementById("wrapper-navbar"); | |
var sticky = header.offsetTop; |
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
/* Gravity Forms - weil PLZ mit Komma getrennt wurden 1,030 zB */ | |
add_filter( 'gform_include_thousands_sep_pre_format_number', '__return_false' ); |
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
preg_match('/^([^.!?]*[\.!?]+){0,2}/', strip_tags($contentNoTags), $abstract); | |
echo $abstract[0]; |
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
$sWholeWord = substr($contentNoTags, 0, 200); | |
$resultWholeWord = substr($sWholeWord, 0, strrpos($sWholeWord, ' ')); |
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
SELECT *, LENGTH(option_value) AS Laenge FROM `wp_options` ORDER BY Laenge DESC |
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 log_result($message) { | |
$pluginLog = wp_upload_dir()["basedir"] . '/wps_log_dev'; | |
$pluginLogContents = file_get_contents($pluginLog); | |
$date = new DateTime(); | |
$date = $date->setTimezone(new DateTimeZone('Europe/Berlin')); | |
$pluginLogContents .= $date->format('[d/M/Y:H:i:s\Z]') ."(Europe/Berlin) - " . $message . " --\n"; | |
file_put_contents($pluginLog, $pluginLogContents); | |
} |
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_shortcode('wps_event_link', 'wps_event_link'); | |
function wps_event_link() { | |
$post_id = '{{ post_data:ID }}'; | |
} |
OlderNewer