WordPress.org

Making WordPress.org


Ignore:
Timestamp:
01/27/2015 12:39:51 AM (7 years ago)
Author:
coffee2code
Message:

developer.wordpress.org: Add 'Used By' and 'Uses' sections to parsed content permalink pages.

Basically the UI surfacing of the P2P relationships.

Fixes #323.
Props atimmer.

File:
1 edited

Legend:

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

    r781 r1196  
    1818    </div>
    1919
     20    <?php
     21        $used_by = get_used_by()->post_count;
     22        $uses    = get_uses()->post_count;
     23    ?>
     24    <div class="meta">
     25        <?php printf(
     26            _n( 'Used by <a href="%s">1 function</a>', 'Used by <a href="%s">%d function</a>', $used_by, 'wporg' ),
     27            esc_url( apply_filters( 'the_permalink', get_permalink() ) ) . '#usage',
     28            $used_by
     29        ); ?>
     30        |
     31        <?php printf(
     32            _n( 'Uses <a href="%s">1 function</a>', 'Used by <a href="%s">%d function</a>', $uses, 'wporg' ),
     33            esc_url( apply_filters( 'the_permalink', get_permalink() ) ) . '#usage',
     34            $uses
     35        ); ?>
     36    </div>
    2037</article>
Note: See TracChangeset for help on using the changeset viewer.