Skip to content

Instantly share code, notes, and snippets.

View nextab's full-sized avatar

nexTab - Oliver Gehrmann nextab

View GitHub Profile
@nextab
nextab / Fragment
Last active June 10, 2025 13:32
Make Rank Math compatible with Polylang
// Diese beiden Dateien müssen in den Theme Ordner hochgeladen werden, um Rank Math kompatibel mit Polylang zu machen (andernfalls gibt es ggf. Probleme mit Redirections, Sitemaps und canonical URLs).
/* #region Ellipsis on the right */
.ellipsis-right {
&::after {
background: url("/wp-content/uploads/2022/02/ellipsis-journey.svg");
bottom: -40px;
content: "";
height: 600px;
position: absolute;
right: -320px;
transform: rotate(235deg);
/* #region max-width 980px */
@media only screen and (max-width: 980px) {
header .et_pb_menu .et_pb_menu_inner_container {
display: flex;
flex-flow: row nowrap;
justify-content: space-between;
}
header .et_pb_menu .et_pb_menu_inner_container > .et_pb_menu__logo-wrap {
margin-bottom: 0;
}
# Standard Input Variables for the Divi Theme
php_value max_execution_time 240
php_value max_input_time 90
php_value max_input_vars 3000
php_value memory_limit 512M
# Redirect everything (no matter whether it's non-https or with www.) to https://yourdomain.com
RewriteEngine on
// Enqueue the script on the booking page
function zmmt_payment_enqueue_script() {
$temp_user_data = get_user_meta(get_current_user_id());
$user_data = array_map(function ($item) {
return $item[0];
}, $temp_user_data);
// Filter out all user data that we don't need
$keysToKeep = [
'nickname',
'first_name',
#region CCT Super Custom Lookup - Get everything from CCT
/**
*
* @param array $find_columns array of column names to find
* @param string $table_name - slug of the CCT; global WPDB prefix and 'jet_cct_' will be appended; defaults to 'event_registrations'
* @param string $where - where clause to check against
*
* @return array|null returns an associative array of the $find_columns if something was found for the where clause
*
*
#region CCT Lookup (multiple values) - Get multiple fields in CCT from JetEngine table
/**
*
* @param array $find_columns array of column names to find
* @param string $needle - value that needs to be checked against
* @param string $lookup_column - column name to check $needle against
* @param string $table - slug of the CCT; global WPDB prefix and 'jet_cct_' will be appended; defaults to 'user_information'
*
* @return array|null returns an associative array of the $find_columns if the $lookup_column matches the $needle; null if no match is found
*
// goes into constructor:
register_activation_hook(__FILE__, array($this, 'schedule_cache_update'));
register_deactivation_hook(__FILE__, array($this, 'clear_scheduled_event'));
add_action('proven_expert_update_cache_event', array($this, 'my_callback_function'));
// register / unregister hook on activation / deactivation of plugin
// -> proven_expert_update_cache_event wird als neue action im System registriert UND an einen cronjob gehängt!