Logout Without Confirm

add_action(‘check_admin_referer’, ‘logout_without_confirm’, 10, 2); function logout_without_confirm($action, $result) { if ($action == “log-out” && !isset($_GET[‘_wpnonce’])) { $redirect_to = isset($_REQUEST[‘redirect_to’]) ? $_REQUEST[‘redirect_to’] : ‘https://gruppa.cloud’; /* https://gruppa.cloud/wp-login.php?action=logout */ $location = str_replace(‘&’, ‘&’, wp_logout_url($redirect_to)); header(“Location: $location”); die; } }Continue reading

CCT MetaSEO Relations

/** * ========================================= * Gruppa CCT SEO * CCT: SEO * Relation: post_id -> WP Post ID * ========================================= */ /** * ========================================= * SAFE GET * ========================================= */ function gt_safe($obj, $key, $default = ”) { if (is_object($obj) && isset($obj->$key))…Continue reading

CCT Overrides CPT Slug

// 1. Zachytíme dáta tesne pred zápisom do DB add_filter( ‘wp_insert_post_data’, function( $data, $postarr ) { // Overíme, či ide o CPT, ktoré má prepojenie na CCT (Has Single Page) // JetEngine posiela v $_POST dáta z CCT pri ukladaní…Continue reading

lokalstolz | Bunny Dateien

/** * lokalstolz | Bunny Dateien * * Typ: PHP-Snippet. Einfuegeort: Run Everywhere. Prioritaet: 10. * Herkunft: Plugin “lokalstolz Bunny Assets” 1.3.0 (web-wissensbasis, plugins/ls-bunny-assets), * als Snippet umgebaut. Vorlage: web-wissensbasis, stack/wpcode-bunny-dateien.php * * Was es tut: Unter Mediathek > Dokumente/Videos…Continue reading

lokalstolz | Mediathek ohne PDF und Video

/** * lokalstolz | Mediathek ohne PDF und Video * * Typ: PHP-Snippet. Einfuegeort: Run Everywhere. Prioritaet: 10. * Vorlage: web-wissensbasis, stack/wpcode-mediathek-ohne-pdf-video.php * Gehoert zu: lokalstolz | Bunny Dateien * * Was es tut: Weist PDFs und Videos beim Hochladen…Continue reading

Untitled Snippet

You will need: – A website with an [embedded bot](/webchat/get-started/quick-start.md) using Webchat v3.3 – Basic familiarity with HTML First, get your Webchat element ID: 1. Select your bot from your workspace. 2. Go to **Webchat > Deploy Settings**. 3. Under…Continue reading

Use WooCommerce Short Description for Meta Catalogue

function rd_meta_catalogue_use_short_description( $description, $product_id ) { $product = wc_get_product( $product_id ); if ( ! $product ) { return $description; } if ( $product->is_type( ‘variation’ ) ) { $product = wc_get_product( $product->get_parent_id() ); if ( ! $product ) { return $description;…Continue reading