| Conditions | 5 |
| Paths | 7 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | <?php |
||
| 44 | public static function get( Stencil_Installable_Interface $installable ) { |
||
| 45 | $slug = $installable->get_slug(); |
||
| 46 | |||
| 47 | if ( is_a( $installable, 'Stencil_Installable_Plugin' ) ) { |
||
| 48 | if ( isset( self::$versions['plugins'][ $slug ] ) ) { |
||
| 49 | return self::$versions['plugins'][ $slug ]; |
||
| 50 | } |
||
| 51 | } |
||
| 52 | |||
| 53 | if ( is_a( $installable, 'Stencil_Installable_Theme' ) ) { |
||
| 54 | if ( isset( self::$versions['themes'][ $slug ] ) ) { |
||
| 55 | return self::$versions['themes'][ $slug ]; |
||
| 56 | } |
||
| 57 | } |
||
| 58 | |||
| 59 | return '0.0.0'; |
||
| 60 | } |
||
| 61 | } |
||
| 62 |