Make WordPress Core


Ignore:
Timestamp:
12/10/2015 03:05:34 AM (9 years ago)
Author:
johnbillion
Message:

Comments: The year is 2003. Permalinks are a new thing and everyone's using Blogger. It's a time when opening a modal window in JavaScript to view a section of a website is not a completely weird thing, although many users get annoyed by it. b2 has recently become WordPress, and with it comes a bunch of functionality that will become stale over the next decade, remnants of simpler times.

Twelve years later, after no fewer than three themes have intentionally implemented popup comments in their functionality, before being abandoned for at least the last six years, we've reached a time where we can put this era behind us. A time when we can remove comment popup functionality from WordPress.

If this breaks the internet, I'll eat my hat.

Fixes #28617

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/formatting.php

    r35847 r35848  
    26902690        return preg_replace('#([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(Z|[\+|\-][0-9]{2,4}){0,1}#', '$1-$2-$3 $4:$5:$6', $date_string);
    26912691    }
    2692 }
    2693 
    2694 /**
    2695  * Adds a element attributes to open links in new windows.
    2696  *
    2697  * Comment text in popup windows should be filtered through this. Right now it's
    2698  * a moderately dumb function, ideally it would detect whether a target or rel
    2699  * attribute was already there and adjust its actions accordingly.
    2700  *
    2701  * @since 0.71
    2702  *
    2703  * @param string $text Content to replace links to open in a new window.
    2704  * @return string Content that has filtered links.
    2705  */
    2706 function popuplinks( $text ) {
    2707     $text = preg_replace('/<a (.+?)>/i', "<a $1 target='_blank' rel='external'>", $text);
    2708     return $text;
    27092692}
    27102693
Note: See TracChangeset for help on using the changeset viewer.