I’m trying to remove the link (the tag A in HTML) from the post type carousel. Digging into the code i’ve saw that it should all come from wp-content/plugins/gutentor/includes/block-base/class-gutentor-query-elements.php inside e get_title function.
Unfortunately there is no option in the blocks to disable that and there is no filter in the code to hook into and remove it.
It would be amazing having the choice if we want the link yes/no.
Cheers,
Diego
PHP Notice: post_permalink is <strong>deprecated</strong> since version 4.4! Use get_permalink() instead. in D:\www\path\to\wp-includes\functions.php on line 3658
D:\www\example.org\www>c:\bin\grep.exe -r "post_permalink(" .
./wp-admin/includes/class-wp-press-this.php: $redirect = get_post_permalink( $post_id );
./wp-content/plugins/growth-hacking-analytics-by-qunb/controllers/last_post_functions.php: $post_url = post_permalink($post_id);
./wp-content/plugins/growth-hacking-analytics-by-qunb/controllers/setting_post.php: $post_url = post_permalink($id);
./wp-content/plugins/growth-hacking-analytics-by-qunb/controllers/setting_post_BU.php: $post_url = post_permalink($id);
./wp-content/plugins/growth-hacking-analytics-by-qunb/controllers/setting_post_BU.php: $post_url = post_permalink($id);
./wp-content/plugins/growth-hacking-analytics-by-qunb/controllers/top_posts_functions.php: $url = post_permalink($id);
./wp-content/plugins/growth-hacking-analytics-by-qunb/models/qunb_cron.php: // $post_url = post_permalink($id);
./wp-content/plugins/growth-hacking-analytics-by-qunb/models/qunb_cron.php: $post_url = post_permalink($id);
./wp-content/themes/rise/inc/apprentice/shortcodes/shortcodes.php: $lesson_link = get_post_permalink( $key );
./wp-includes/deprecated.php:function post_permalink( $post_id = 0 ) {
./wp-includes/link-template.php: return get_post_permalink($post, $leavename, $sample);
./wp-includes/link-template.php:function get_post_permalink( $id = 0, $leavename = false, $sample = false ) {
https://www.ads-software.com/plugins/growth-hacking-analytics-by-qunb/
]]>::ob_callback() error in PHP7
PHP 7.0 / Apache 2.4
https://www.ads-software.com/plugins/w3-total-cache/
]]>Just wanted to report a small bug. In WordPress 4.4, the function post_permalink()
was deprecated, and now generates constant PHP notices when using WP_DEBUG
. (Which use a lot on our test servers, both for ours and clients sites.)
PHP Notice: post_permalink is deprecated since version 4.4! Use get_permalink() instead. in /xxxxxxxxx/wp-includes/functions.php on line 3573
It took me a bit to figure out which plugin had the code, since the errors only pointed to the WordPress core files.
After doing a little grep action I found it in this file:
wp-super-cache/wp-cache-phase2.php
The old function post_permalink()
occurs on lines:
1080, 1082, 1135, 1153, and 1176.
Just doing a straight swap of the two functions works fine.
Thanks in advance for taking care of this. Keep up the great work!
– Scott
https://www.ads-software.com/plugins/wp-super-cache/
]]>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/
]]>Fatal error: Cannot redeclare post_permalink() (previously declared in /home/katie50/public_html/truechildsafety.com/wp-includes/link-template.php:300) in /home/katie50/public_html/truechildsafety.com/wp-includes/deprecated.php on line 3562
I went into “php my admin” on my hosting site and deactivated my plugins. This did not help. Does anyone know what I need to do?
]]>$catposts = get_posts('category='.$v0."&numberposts=".$limit);
foreach($catposts as $single):
$output .= "<div class='menu_class'>";
$output .= "<a href='";
$output .= $single->post_permalink;
$output .= "'>";
$output .= $single->post_title;
$output .= $single->post_excerpt;
$output .= "</a></div>";
endforeach;
post_title and post_excerpt return like champs but post_permalink returns nothing. I also tried to fake it by doing something with post_ID instead but that also returns nothing. Can we not pull post_permalink out with the same method as that other stuff?
]]>