Changeset 1992188
- Timestamp:
- 12/11/2018 09:46:20 PM (7 years ago)
- Location:
- replybox/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
replybox.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
replybox/trunk/readme.txt
r1981834 r1992188 5 5 Tested up to: 4.9.8 6 6 Requires PHP: 5.4 7 Stable tag: 0. 27 Stable tag: 0.3 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 31 31 == Changelog == 32 32 33 = 0.3 = 34 * Fix comment links not scrolling to the comments section. 35 33 36 = 0.2 = 34 37 * Added API endpoints for updating and deleting comments. -
replybox/trunk/replybox.php
r1981834 r1992188 3 3 * Plugin Name: ReplyBox 4 4 * Description: A simple, honest comment system which works everywhere. No ads, no dodgy affiliate links, no fluff. 5 * Version: 0. 25 * Version: 0.3 6 6 * Author: ReplyBox 7 7 * Author URI: https://getreplybox.com … … 52 52 if ( $this->replace_comments() ) { 53 53 add_filter( 'comments_template', array( $this, 'comments_template' ), 100 ); 54 add_filter( 'get_comment_link', array( $this, 'comment_link' ) ); 55 add_filter( 'get_comments_link', array( $this, 'comments_link' ) ); 54 56 } 55 57 … … 405 407 406 408 /** 409 * Filter a single comment link. 410 * 411 * @param string $link 412 * @return string 413 */ 414 public function comment_link( $link ) { 415 return preg_replace( '/#comment-\d+/', '#replybox', $link ); 416 } 417 418 /** 419 * Filter a post's comments link. 420 * 421 * @param string $link 422 * @return string 423 */ 424 public function comments_link( $link ) { 425 return str_replace( '#comments', '#replybox', $link ); 426 } 427 428 /** 407 429 * Plugin activated. 408 430 *
Note: See TracChangeset
for help on using the changeset viewer.