Widget_WordPress::get_categories()
Get widget categories.
Description
Retrieve the list of categories the WordPress/Pojo widget belongs to.
Used to determine where to display the widget in the editor.
Return
(array) Widget categories. Returns either a WordPress category or Pojo category.
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |
Source
includes/widgets/wordpress.php
public function get_categories() { if ( $this->is_pojo_widget() ) { $category = 'pojo'; } else { $category = 'wordpress'; // WPCS: spelling ok. } return [ $category ]; }
Uses
- includes/widgets/wordpress.php: Widget_WordPress::is_pojo_widget()