Plugin Directory

Changeset 1992188


Ignore:
Timestamp:
12/11/2018 09:46:20 PM (7 years ago)
Author:
A5hleyRich
Message:

Preparing for 0.3 release

Location:
replybox/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • replybox/trunk/readme.txt

    r1981834 r1992188  
    55Tested up to: 4.9.8
    66Requires PHP: 5.4
    7 Stable tag: 0.2
     7Stable tag: 0.3
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    3131== Changelog ==
    3232
     33= 0.3 =
     34* Fix comment links not scrolling to the comments section.
     35
    3336= 0.2 =
    3437* Added API endpoints for updating and deleting comments.
  • replybox/trunk/replybox.php

    r1981834 r1992188  
    33 * Plugin Name: ReplyBox
    44 * Description: A simple, honest comment system which works everywhere. No ads, no dodgy affiliate links, no fluff.
    5  * Version: 0.2
     5 * Version: 0.3
    66 * Author: ReplyBox
    77 * Author URI: https://getreplybox.com
     
    5252        if ( $this->replace_comments() ) {
    5353            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' ) );
    5456        }
    5557
     
    405407
    406408    /**
     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    /**
    407429     * Plugin activated.
    408430     *
Note: See TracChangeset for help on using the changeset viewer.