hkosnip
// index.php?name=david echo $_GET[‘name’]; // index.php?name=david&surname=adams echo $_GET[‘surname’];Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
// index.php?name=david echo $_GET[‘name’]; // index.php?name=david&surname=adams echo $_GET[‘surname’];Continue reading
/** * WPCode: Highwire meta – Revista Chilena de Anestesiología (robusto + debug) * – Imprime meta tags en de posts. * – No requiere ACF salvo para el repeater de autores (contrib). * – Incluye comentario HTML de debug…Continue reading
// Utilities ———————————————————— function wishlist_is_allowed_path() { $allowed_paths = [‘/rentals’, ‘/collections/’]; $request_uri = $_SERVER[‘REQUEST_URI’] ?? ”; foreach ($allowed_paths as $path) { if (strpos($request_uri, $path) !== false) { return true; } } return false; } // ———————————————————————- // Shortcode: [wishlist_count] —————————————— function…Continue reading
// Utility ———————————————————— function wishlist_is_allowed_path() { $allowed_paths = [‘/rentals’, ‘/collections/’]; $request_uri = $_SERVER[‘REQUEST_URI’] ?? ”; foreach ($allowed_paths as $path) { if (strpos($request_uri, $path) !== false) { return true; } } return false; } // ———————————————————————- // Shortcode: [wishlist_count] —————————————— function…Continue reading
add_filter(‘woocommerce_dropdown_variation_attribute_options_args’, function ($args) { // Make sure we have an attribute slug and (optionally) the product context. $attribute = isset($args[‘attribute’]) ? $args[‘attribute’] : ”; $product = isset($args[‘product’]) && $args[‘product’] instanceof WC_Product ? $args[‘product’] : null; if ($attribute) { // Get…Continue reading
add_filter( ‘pp_cg_beaver_themer_parse_shortcodes’, ‘__return_false’ );Continue reading
/** * Main plugin class. * * Security / Maintainability / Accessibility notes: * – No user-supplied input is processed; configuration is fixed server-side. * – We scope changes to Jetpack Instant Search via its documented filter, so normal queries,…Continue reading
/** * Main plugin class. * * Security / Maintainability / Accessibility notes: * – No user-supplied input is processed; configuration is fixed server-side. * – We scope changes to Jetpack Instant Search via its documented filter, so normal queries,…Continue reading
add_action(‘init’, function () { if (is_admin()) { return; } if (empty($_COOKIE[‘rd_session_params’])) { return; } $raw = wp_unslash($_COOKIE[‘rd_session_params’]); $data = json_decode($raw, true); if (!is_array($data)) { return; } foreach ($data as $k => $v) { if (!is_string($k) || $k === ”) {…Continue reading