Advertisement
hostmaria

How to add StackCache when it is deleted

Aug 7th, 2022
475
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4. * Plugin Name: StackCache
  5. * Plugin URI: http://cache.stackcp.com/
  6. * Description: Wrapper to include the Stack Cache Plugin Library
  7. * Author: Stack CP
  8. */
  9.  
  10. // If this file is called directly, abort.
  11. if ( ! defined( "WPINC" ) ) die;
  12.  
  13. // Load and run
  14. foreach ( ["/../../../wp-admin/includes/file.php", "/../../wp-admin/includes/file.php"] as $path ) {
  15. $full_path = plugin_dir_path(__FILE__) . $path;
  16. if ( file_exists($full_path) ) {
  17. require_once($full_path);
  18. define( 'PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
  19. }
  20. }
  21. require "/usr/share/php/wp-stack-cache.php";
  22. $wpsc = new WPStackCache();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement