Notice: post_permalink is deprecated
-
Notice: post_permalink is deprecated since version 4.4! Use get_permalink() instead. in /home/apcstage/public_html/wp-includes/functions.php on line 3573
seems to line 111 in \w3-total-cache\lib\W3\SharedPageUrls.php
here is working version of the function
/** * Returns all urls related to a post * @param $post_id * @return array */ function get_post_urls($post_id) { if (!isset($this->post_urls[$post_id])) { $full_urls = array(); $post_link = get_permalink($post_id); $post_uri = str_replace($this->domain_url, '', $post_link); $full_urls[] = $post_link; $uris[] = $post_uri; $post = get_post($post_id); $matches =array(); if ($post && ($post_pages_number = preg_match_all('/\<\!\-\-nextpage\-\-\>/', $post->post_content,$matches))>0) { global $wp_rewrite; $post_pages_number++; for ($pagenum = 2; $pagenum <= $post_pages_number; $pagenum++) { if ( 'page' == get_option('show_on_front') && get_option('page_on_front') == $post->ID ) $post_pagenum_link = trailingslashit($post_link) . user_trailingslashit("$wp_rewrite->pagination_base/" . $pagenum, 'single_paged'); else $post_pagenum_link = trailingslashit($post_link) . user_trailingslashit($pagenum, 'single_paged'); $full_urls[] = $post_pagenum_link; } } $this->post_urls[$post_id] = $full_urls; } return $this->post_urls[$post_id]; }
- The topic ‘Notice: post_permalink is deprecated’ is closed to new replies.