Making WordPress.org

Changeset 3931

Timestamp:
09/02/2016 08:59:31 PM (8 years ago)
Author:
coffee2code
Message:

Profiles Activity Notifier: Improve reply excerpt generation.

  • Use newly introduced get_reply_excerpt() instead of bbp_get_reply_excerpt().
  • Strip all blockquoted text from excerpts since that text is not original to the reply.
  • Trim reply excerpts by words (15) instead of by characters.
  • Add trim_text() to handle trimming text by words or by characters.
  • If trimming by characters, honor requested excerpt length for multibyte strings.

Fixes #1953.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-profiles-wp-activity-notifier/wporg-profiles-wp-activity-notifier.php

    r3920 r3931  
    307307                'title'     => bbp_get_reply_topic_title( $reply_id ) ,
    308308                'url'       => bbp_get_reply_url( $reply_id ),
    309                 'message'   => bbp_get_reply_excerpt( $reply_id, 55 ),
     309                'message'   => 5 ),
    310310                'site'      => get_bloginfo( 'name' ),
    311311                'site_url'  => site_url(),
     
    335335    }
    336336
     337
     338
     339
     340
     341
     342
     343
     344
     345
     346
     347
     348
     349
     350
     351
     352
     353
     354
     355
     356
     357
     358
     359
     360
     361
     362
     363
     364
     365
     366
     367
     368
     369
     370
     371
     372
     373
     374
     375
     376
     377
     378
     379
     380
     381
     382
     383
     384
     385
     386
     387
     388
     389
     390
     391
     392
     393
     394
     395
     396
     397
     398
     399
     400
     401
     402
     403
     404
     405
    337406}
    338407
Note: See TracChangeset for help on using the changeset viewer.