-
-
Notifications
You must be signed in to change notification settings - Fork 113
Description
There is a small bug in the lcp_pagination_css() function that results in a double slash (//) in the URL when loading lcp_paginator.css.
The issue is in list-category-posts.php from line 235.
Steps to Reproduce:
- Run a broken link check on a site using this plugin.
- Observe that the generated URL for lcp_paginator.css contains //, e.g.:
/wp-content/plugins/list-category-posts//lcp_paginator.css?ver=d8d9a89ba25b7821879fa26618f16d2c
- Some tools and scripts may treat this as a broken link, even though browsers can resolve it.
Cause:
The function plugin_dir_url(FILE) already includes a trailing slash. However, in lcp_pagination_css(), another slash is manually added:
$css_file = plugin_dir_url(__FILE__) . '/lcp_paginator.css';
This results in //lcp_paginator.css in the URL.
Proposed Fix:
Change line 241:
$css_file = plugin_dir_url(__FILE__) . '/lcp_paginator.css';
To:
$css_file = plugin_dir_url(__FILE__) . 'lcp_paginator.css';
This prevents the double slash while keeping the URL structure correct.
Thanks for the great plugin! Just wanted to report this small issue. 😊