• 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];
        }

    https://www.ads-software.com/plugins/w3-total-cache/

Viewing 16 replies (of 16 total)
  • This, among many other issues have been known and fixed many months ago by the community. Although it would be nice for the author to finally rise from the dead and make these updates himself, for those who just want this and several other issues resolved now without having to read through this forum for the solutions (and don’t mind getting their coding feet wet — it’s not that hard, btw) you can, alternatively, just download the latest community-driven build on gitub maintained by a regular on this forum (not me).

    For me w3tc works perfectly with no error messages nor warnings (and that’s with wp debug enabled). It’s also fully php 7 compatible.

    Just thought i’d give a heads up to an apparently protracted thread.

    Cheers
    Kimberly

Viewing 16 replies (of 16 total)
  • The topic ‘Notice: post_permalink is deprecated’ is closed to new replies.