Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | static function generate( $query ) { |
||
27 | require_once 'includes/class-pixabay.php'; |
||
28 | |||
29 | $client = new FooGallery_PixabayClient(); |
||
30 | $key = apply_filters( 'foogallery_pixabay_key', '1843003-12be68cf2726df47797f19cd7' ); |
||
31 | |||
32 | $results = $client->search( $key, $query ); |
||
33 | |||
34 | $hits = $results->hits; |
||
35 | |||
36 | return 'found ' . count($hits); |
||
37 | } |
||
38 | } |
||
39 | } |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.