Making WordPress.org


Ignore:
Timestamp:
01/23/2015 09:33:20 AM (12 years ago)
Author:
nacin
Message:

Trac object: Add get_url() method.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/common/includes/slack/trac/trac.php

    r1130 r1178  
    2828        protected $icon  = ':wordpress:';
    2929
     30        protected $url_template    = 'https://%s.trac.wordpress.org';
    3031        protected $ticket_template = 'https://%s.trac.wordpress.org/ticket/%s';
    3132        protected $commit_template = 'https://%s.trac.wordpress.org/changeset/%s';
     
    135136        function get_slug() {
    136137                return $this->trac;
     138        }
     139
     140        function get_url() {
     141                return sprintf( $this->url_template, $this->get_slug() );
    137142        }
    138143
Note: See TracChangeset for help on using the changeset viewer.