Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
1 | <?php |
||
42 | public function get_title() { |
||
43 | |||
44 | $parsed = $this->parse_slug( $this->related_entity_slug ); |
||
45 | |||
46 | $entity = wordpoints_entities()->get( $parsed['slug'] ); |
||
47 | |||
48 | if ( $entity instanceof WordPoints_Entity ) { |
||
49 | return $entity->get_title(); |
||
50 | } else { |
||
51 | return $this->related_entity_slug; |
||
52 | } |
||
53 | } |
||
54 | } |
||
57 |