WordPress.org

Making WordPress.org

Changeset 974


Ignore:
Timestamp:
11/11/2014 09:01:36 AM (6 years ago)
Author:
coffee2code
Message:

developer.wordpress.org: convert inline {@see} links for hooks

fixes #706.
props DrewAPicture.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/functions.php

    r959 r974  
    509509                }
    510510
     511                // Link to hook: {@see 'pre_get_search_form'}
     512                elseif ( 1 === preg_match( '/^(‘)\w+(’)$/', $link, $hook ) ) {
     513                    if ( ! empty( $hook[0] ) ) {
     514                        $link = '<a href="' .
     515                            get_post_type_archive_link( 'wp-parser-hook' ) .
     516                            str_replace( array( '&#8216;', '&#8217;' ), '', $link ) .
     517                            '">' . esc_html( $link ) . '</a>';
     518                    }
     519                }
     520
    511521                // Link to function: {@link esc_attr()}
    512522                else {
Note: See TracChangeset for help on using the changeset viewer.