@@ 104-138 (lines=35) @@ | ||
101 | return $this->item; |
|
102 | } |
|
103 | ||
104 | public function get_title() |
|
105 | { |
|
106 | if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'title')) |
|
107 | { |
|
108 | return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', array($return[0]['attribs'])), $this->get_base($return[0])); |
|
109 | } |
|
110 | elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'title')) |
|
111 | { |
|
112 | return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', array($return[0]['attribs'])), $this->get_base($return[0])); |
|
113 | } |
|
114 | elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'title')) |
|
115 | { |
|
116 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); |
|
117 | } |
|
118 | elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'title')) |
|
119 | { |
|
120 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); |
|
121 | } |
|
122 | elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'title')) |
|
123 | { |
|
124 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); |
|
125 | } |
|
126 | elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'title')) |
|
127 | { |
|
128 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
|
129 | } |
|
130 | elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'title')) |
|
131 | { |
|
132 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
|
133 | } |
|
134 | else |
|
135 | { |
|
136 | return null; |
|
137 | } |
|
138 | } |
|
139 | ||
140 | public function get_category($key = 0) |
|
141 | { |
@@ 2012-2046 (lines=35) @@ | ||
2009 | * @since 1.0 (previously called `get_feed_title` since 0.8) |
|
2010 | * @return string|null |
|
2011 | */ |
|
2012 | public function get_title() |
|
2013 | { |
|
2014 | if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'title')) |
|
2015 | { |
|
2016 | return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', array($return[0]['attribs'])), $this->get_base($return[0])); |
|
2017 | } |
|
2018 | elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'title')) |
|
2019 | { |
|
2020 | return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', array($return[0]['attribs'])), $this->get_base($return[0])); |
|
2021 | } |
|
2022 | elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'title')) |
|
2023 | { |
|
2024 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); |
|
2025 | } |
|
2026 | elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'title')) |
|
2027 | { |
|
2028 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); |
|
2029 | } |
|
2030 | elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'title')) |
|
2031 | { |
|
2032 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); |
|
2033 | } |
|
2034 | elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'title')) |
|
2035 | { |
|
2036 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
|
2037 | } |
|
2038 | elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'title')) |
|
2039 | { |
|
2040 | return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); |
|
2041 | } |
|
2042 | else |
|
2043 | { |
|
2044 | return null; |
|
2045 | } |
|
2046 | } |
|
2047 | ||
2048 | /** |
|
2049 | * Get a category for the feed |