- run
wp --allow-root db query "select post_content from wp_posts where post_content like '%<img src%';" --skip-column-names --silent | grep -oP "<img\s+.*?src=['\"](.*?)['\"].*?>" | grep -oP "https?://[^\"]*" | sort | uniq - using
parse_url(), create a PHP function* to find unique hosts and add first occurence of each to an array of links. - Itterate through new list of links and run through a CURL function** to determine
- Add links with 200-300 status to an array
- Produce Search & Replace script based of returned values
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 | |
| /** | |
| * Plugin Name: WooCommerce Product Bundles - Optional Items Checked by Default | |
| * Plugin URI: https://woocommerce.com/products/product-bundles/ | |
| * Description: Use this plugin to have optional bundled items checked/selected by default. | |
| * Version: 1.1 | |
| * Author: SomewhereWarm | |
| * Author URI: https://somewherewarm.gr/ | |
| * Developer: Manos Psychogyiopoulos | |
| * |
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
| $args = array( | |
| 'expiration' => date( 'Y-m-d 23:59:59', strtotime( 'January 3, 2018', current_time( 'timestamp' ) ) ), | |
| 'created' => date( 'Y-m-d 23:59:59', strtotime( current_time( 'timestamp' ) ) ), | |
| 'status' => 'pending', | |
| 'profile_id' => 0, | |
| 'transaction_id' => 0, | |
| 'initial_amount' => 1, | |
| 'recurring_amount' => 700, | |
| 'bill_times' => '1', | |
| 'period' => 'yearly', |
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 | |
| /********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ | |
| /* Remove Date Meta Tags Output by Yoast SEO | |
| * Credit: Yoast development team | |
| * Last Tested: Apr 09 2019 using Yoast SEO 10.1.3 on WordPress 5.1.1 | |
| * For Yoast SEO 14.0 or newer, please see https://yoast.com/help/date-appears-search-results/#h-managing-dates | |
| */ | |
| add_action('wpseo_dc_'.'DC.date.issued', '__return_false'); // Premium versions 5.2 or older |
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 | |
| /********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ | |
| /* | |
| * Replace Disallow with Allow Generated Robots.txt | |
| * Credit: Unknown | |
| * Last Tested: June 09 2020 using WordPress 5.4.1 | |
| */ | |
| add_filter('robots_txt','custom_robots'); |
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 | |
| remove_theme_support( 'wc-product-gallery-zoom' ); |
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 | |
| /********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ | |
| /* Change the canonical link for the shop page | |
| * Credit: Scott Weiss of somethumb.com | |
| * Yoast Doc: https://developer.yoast.com/features/seo-tags/canonical-urls/api/ | |
| * Last Tested: Jan 25 2017 using Yoast SEO 6.0 on WordPress 4.9.1 | |
| */ | |
| add_filter( 'wpseo_canonical', 'yoast_seo_canonical_change_woocom_shop', 10, 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
| public function get_subscription( $ipn_data = array() ) { | |
| $parent_payment_id = absint( $ipn_data['custom'] ); | |
| $backup_method = false; | |
| // Check if we can find the payment via the internal EDD payment ID | |
| if( !empty( $parent_payment_id ) ) { | |
| $payment = edd_get_payment_by( 'id', $parent_payment_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 | |
| /* | |
| Template Name: Migration Script | |
| */ | |
| error_reporting(E_ALL); | |
| //reuire_once('/stripe/init.php'); | |
| \Stripe\Stripe::setApiKey("my_key"); |