Changeset 59141 for trunk/src/wp-includes/SimplePie/src/Copyright.php
- Timestamp:
- 09/30/2024 10:48:16 PM (2 months ago)
- Location:
- trunk/src/wp-includes/SimplePie/src
- Files:
-
- 1 added
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/SimplePie/src/Copyright.php
r59140 r59141 1 1 <?php 2 2 3 /** 3 4 * SimplePie … … 6 7 * Takes the hard work out of managing a complete RSS/Atom solution. 7 8 * 8 * Copyright (c) 2004-20 16, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors9 * Copyright (c) 2004-2022, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors 9 10 * All rights reserved. 10 11 * … … 42 43 */ 43 44 45 namespace SimplePie; 46 44 47 /** 45 48 * Manages `<media:copyright>` copyright tags as defined in Media RSS 46 49 * 47 * Used by {@see SimplePie_Enclosure::get_copyright()}50 * Used by {@see \SimplePie\Enclosure::get_copyright()} 48 51 * 49 * This class can be overloaded with {@see SimplePie::set_copyright_class()}52 * This class can be overloaded with {@see \SimplePie\SimplePie::set_copyright_class()} 50 53 * 51 54 * @package SimplePie 52 55 * @subpackage API 53 56 */ 54 class SimplePie_Copyright57 class Copyright 55 58 { 56 57 58 59 60 61 62 var$url;59 /** 60 * Copyright URL 61 * 62 * @var string 63 * @see get_url() 64 */ 65 public $url; 63 66 64 65 66 67 68 69 70 var$label;67 /** 68 * Attribution 69 * 70 * @var string 71 * @see get_attribution() 72 */ 73 public $label; 71 74 72 73 74 75 76 77 78 79 80 81 82 75 /** 76 * Constructor, used to input the data 77 * 78 * For documentation on all the parameters, see the corresponding 79 * properties and their accessors 80 */ 81 public function __construct($url = null, $label = null) 82 { 83 $this->url = $url; 84 $this->label = $label; 85 } 83 86 84 85 86 87 88 89 90 91 92 93 87 /** 88 * String-ified version 89 * 90 * @return string 91 */ 92 public function __toString() 93 { 94 // There is no $this->data here 95 return md5(serialize($this)); 96 } 94 97 95 /** 96 * Get the copyright URL 97 * 98 * @return string|null URL to copyright information 99 */ 100 public function get_url() 101 { 102 if ($this->url !== null) 103 { 104 return $this->url; 105 } 98 /** 99 * Get the copyright URL 100 * 101 * @return string|null URL to copyright information 102 */ 103 public function get_url() 104 { 105 if ($this->url !== null) { 106 return $this->url; 107 } 106 108 107 108 109 return null; 110 } 109 111 110 /** 111 * Get the attribution text 112 * 113 * @return string|null 114 */ 115 public function get_attribution() 116 { 117 if ($this->label !== null) 118 { 119 return $this->label; 120 } 112 /** 113 * Get the attribution text 114 * 115 * @return string|null 116 */ 117 public function get_attribution() 118 { 119 if ($this->label !== null) { 120 return $this->label; 121 } 121 122 122 123 123 return null; 124 } 124 125 } 126 127 class_alias('SimplePie\Copyright', 'SimplePie_Copyright');
Note: See TracChangeset
for help on using the changeset viewer.