Plugin Directory

Changeset 2900993


Ignore:
Timestamp:
04/19/2023 03:31:07 AM (3 years ago)
Author:
Disqus
Message:

Preparing for 3.0.23 release

Location:
disqus-comment-system/trunk
Files:
4 added
4 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • disqus-comment-system/trunk/README.txt

    r2538249 r2900993  
    11=== Disqus Comment System ===
    2 Contributors: disqus, alexkingorg, crowdfavorite, zeeg, tail, thetylerhayes, ryanv12, iamfrancisyo, brevityness, tterb
     2Contributors: disqus, alexkingorg, crowdfavorite, zeeg, tail, thetylerhayes, ryanv12, iamfrancisyo, brevityness, tterb, chrisjtang
    33Tags: disqus, comments, engagement, threaded, email, notification, spam, avatars, community, profile, widget
    44Requires at least: 4.4
    5 Tested up to: 5.6
    6 Stable tag: 3.0.22
     5Tested up to: 6.2
     6Stable tag: 3.0.23
    77Requires PHP: 5.6
    88
     
    124124
    125125== Changelog ==
     126= 3.0.23 =
     127* Fixed a bug with the automatic comment import tool with newer versions of WordPress and added tests.
     128* Improved visual layout of the plugin.  Updated corresponding snapshot for frontend test.
     129* Added updated directions for running tests locally.
     130* Update CI/CD to use GitHub actions.
    126131
    127132= 3.0.22 =
  • disqus-comment-system/trunk/admin/css/disqus-admin.css

    r1817585 r2900993  
    3131.welcome-panel {
    3232    overflow: hidden;
     33}
     34
     35.about-description {
     36    font-size: 40px !important;
     37    color: #dcdcde;
     38    font-weight: bold;
     39    align-items: center;
     40    text-align: center;
    3341}
    3442
  • disqus-comment-system/trunk/disqus.php

    r2538249 r2900993  
    1616 * Plugin URI:        https://disqus.com/
    1717 * Description:       Disqus helps publishers increase engagement and build loyal audiences. Supports syncing comments to your database for easy backup.
    18  * Version:           3.0.22
     18 * Version:           3.0.23
    1919 * Author:            Disqus
    2020 * Author URI:        https://disqus.com/
     
    2525 */
    2626
    27 $DISQUSVERSION = '3.0.22';
     27$DISQUSVERSION = '3.0.23';
    2828
    2929// If this file is called directly, abort.
  • disqus-comment-system/trunk/rest-api/class-disqus-rest-api.php

    r2465271 r2900993  
    353353
    354354        // Filter out pingbacks/trackings and comments that have been created by Disqus via syncing.
    355         $filtered_comments = array_filter( $comments, array( $this, 'is_pingback_or_disqus_comment' ) );
     355        $filtered_comments = array_filter( $comments, array( $this, 'is_comment_exportable' ) );
    356356
    357357        $response_data = array(
     
    437437
    438438    /**
    439      * Checks a comment state to determine if it's valid for syncing.
     439     * Checks a comment state to determine if it's valid for exporting into Disqus.
    440440     *
    441441     * @since     3.0.11
    442442     * @param     array $comment    The WordPress comment instance.
    443      * @return    boolean           Whether the comment is valid for syncing.
    444      */
    445     private function is_pingback_or_disqus_comment( $comment ) {
    446         return empty( $comment->comment_type ) && strpos( $comment->comment_agent, 'Disqus' ) === false;
     443     * @return    boolean           Whether the comment is valid for exporting into Disqus.
     444     */
     445    private function is_comment_exportable( $comment ) {
     446        $is_comment = ( empty( $comment->comment_type ) || 'comment' === $comment->comment_type );
     447        $is_disqus_comment = strpos( $comment->comment_agent, 'Disqus' ) !== false;
     448        return $is_comment && ! $is_disqus_comment;
    447449    }
    448450
     
    456458    private function get_request_data( WP_REST_Request $request ) {
    457459        $content_type = $request->get_content_type();
    458 
    459         switch ( $content_type['value'] ) {
     460        if ( $content_type && $content_type['value'] ) {
     461            $content_type_val = $content_type['value'];
     462        } else {
     463            $content_type_val = null;
     464        }
     465
     466        switch ( $content_type_val ) {
    460467            case 'application/json':
    461468                return $request->get_json_params();
Note: See TracChangeset for help on using the changeset viewer.