An updated theme (based on Atticus Finch) for ClassicPress
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
706 B

3 years ago
  1. <?php
  2. if ( !class_exists('Puc_v4p1_Update', false) ):
  3. /**
  4. * A simple container class for holding information about an available update.
  5. *
  6. * @author Janis Elsts
  7. * @access public
  8. */
  9. abstract class Puc_v4p1_Update extends Puc_v4p1_Metadata {
  10. public $slug;
  11. public $version;
  12. public $download_url;
  13. public $translations = array();
  14. /**
  15. * @return string[]
  16. */
  17. protected function getFieldNames() {
  18. return array('slug', 'version', 'download_url', 'translations');
  19. }
  20. public function toWpFormat() {
  21. $update = new stdClass();
  22. $update->slug = $this->slug;
  23. $update->new_version = $this->version;
  24. $update->package = $this->download_url;
  25. return $update;
  26. }
  27. }
  28. endif;