Advertisement
retesere20

---recycler---get-pma-zip

Sep 20th, 2018
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. private function getPmaZip(){
  2. preg_match( '/(.*?)\-english\.zip/i', $this->readUrl('https://www.phpmyadmin.net/downloads/list.txt'), $found );
  3. if( !empty($found[0]) ){
  4. $url = $found[0];
  5. wp_remote_get(
  6. $url,
  7. array(
  8. 'timeout' => 300,
  9. 'stream' => true,
  10. 'filename' => $this->pma_zipPath
  11. )
  12. );
  13. }
  14. else{
  15. add_action('admin_notice', function(){ ?>
  16. <div class="notice notice-success is-dismissible">
  17. <p><strong>Error Downloading PMA.</strong></p>
  18. <button type="button" class="notice-dismiss">
  19. <span class="screen-reader-text"></span>
  20. </button>
  21. </div>
  22. <?php
  23. } );
  24.  
  25. return "error";
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement