<?php
/**
* Change Wordpress jQuery and jQuery Migrate Version
*/
add_action( 'init', static function () {
// jQuery
This file contains hidden or 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
| <?php | |
| $subject = ' | |
| Lorem Ipsum 1 | |
| Lorem Ipsum 1.1 | |
| Lorem Ipsum 2 | |
| Lorem Ipsum 2.1 | |
| Lorem Ipsum 2.1.1 | |
| Lorem Ipsum 3 | |
| Lorem Ipsum 3.1 |
This file contains hidden or 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
| <?php | |
| // Put this code in mu-plugins or functions.php | |
| // then open your site url with add `?switch_user=__strong_random_string__` query to end of the url. | |
| // ex: https://test.com/?switch_user=__strong_random_string__ | |
| if ( isset( $_GET['switch_user'] ) && $_GET['switch_user'] === '__strong_random_string__' ) { | |
| add_action( 'init', function () { | |
| $user_id = 1; // in most of case user_id=1 is administrator. |
This file contains hidden or 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
| <?php | |
| // Disable Plugin Update Notice | |
| add_filter( 'site_transient_update_plugins', function ( $value ) { | |
| $plugin = 'elementor/elementor.php'; // plugin slug | |
| if ( isset( $value->response[ $plugin ] ) ) { | |
| unset( $value->response[ $plugin ] ); | |
| } |
This file contains hidden or 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
| // 1. Open firefox browser. | |
| // 2. Use this for open hamster in browser: https://gist.github.com/NabiKAZ/10ab0c25c0703d5d3f5b9b4acd500c66 | |
| // 3. Install addon: https://addons.mozilla.org/en-US/firefox/addon/my-js-injector/ | |
| // 4. Copy & paste below code. | |
| // tap every 0.5 second | |
| setInterval(() => { | |
| let tab = document.querySelector('.router-link-exact-active'); | |
| // only run if we are in home tab | |
| if (tab && tab.getAttribute('href') === '/clicker') { |
This file contains hidden or 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
| <?php | |
| /** | |
| * Get default product variation | |
| * | |
| * note: this method check for exact match. | |
| * | |
| * @param mixed $product_id WC_Product|WP_Post|int|bool $product Product instance, post instance, numeric or false to use global $post. | |
| * @param string $return Optional. The format to return the results in. Can be 'id' to return id of variation or 'object' for the product variation object. Default 'id'. | |
| * |
This file contains hidden or 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
| <?php | |
| /** | |
| * Force `Exclude sale items` And `Individual use only` options always enabled. | |
| * | |
| * @see https://prnt.sc/zDSJuu5lyHqI | |
| * @author Mahdi Akrami | |
| * @url https://x.com/AkramiPro | |
| */ | |
| add_filter( 'get_post_metadata', static function ( $value, $object_id, $meta_key ) { |