Changeset 1478772
- Timestamp:
- 08/19/2016 01:17:36 PM (10 years ago)
- File:
-
- 1 edited
-
search-for-ipboard/trunk/ipboard-search.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
search-for-ipboard/trunk/ipboard-search.php
r1435912 r1478772 48 48 { 49 49 add_action('admin_enqueue_scripts', array($this, 'loadAdminScripts')); 50 add_action('the_post', array($this, 'updatePostData')); 50 51 51 52 add_filter('plugin_row_meta', array($this, 'updatePluginMeta'), 10, 2); … … 189 190 190 191 if (!empty($results)) { 191 if (!empty($_COOKIE['ips4_ipsTimezone'])) { 192 $data->post_date = $this->properTime($data->post_date, $_COOKIE['ips4_ipsTimezone']); 193 } 194 195 foreach ($results as $key => $post) { 192 foreach ($results as $key => $post) { 193 if (!empty($_COOKIE['ips4_ipsTimezone'])) { 194 $post_date = $this->properTime($post->post_date, $_COOKIE['ips4_ipsTimezone']); 195 } else { 196 $post_date = $post->post_date; 197 } 198 196 199 $post->ID = 0; 197 200 $post->post_author = 0; 198 $post->post_date = date('Y-m-d H:i:s', $post ->post_date);199 $post->post_date_gmt = date('Y-m-d H:i:s', $post ->post_date);201 $post->post_date = date('Y-m-d H:i:s', $post_date); 202 $post->post_date_gmt = date('Y-m-d H:i:s', $post_date); 200 203 $post->post_excerpt = ""; 201 204 $post->post_status = "publish"; … … 205 208 $post->to_ping = ""; 206 209 $post->pinged = ""; 207 $post->post_modified = date('Y-m-d H:i:s', $post ->post_date);208 $post->post_modified_gmt = date('Y-m-d H:i:s', $post ->post_date);210 $post->post_modified = date('Y-m-d H:i:s', $post_date); 211 $post->post_modified_gmt = date('Y-m-d H:i:s', $post_date); 209 212 $post->post_content_filtered = ""; 210 213 $post->post_parent = 0; … … 250 253 } 251 254 255 public function updatePostData($post) 256 { 257 global $authordata; 258 259 if ($post->post_type == "ipboard") { 260 $authordata = new stdClass(); 261 $authordata->ID = $post->post_author; 262 $authordata->user_email = $post->email; 263 $authordata->user_url = $post->author_link; 264 $authordata->user_nicename = $post->author_seo; 265 $authordata->display_name = $post->author_name; 266 } 267 268 return $post; 269 } 270 252 271 public function updatePostLink($link) 253 272 {
Note: See TracChangeset
for help on using the changeset viewer.