Elementor Code Reference
  • Developers
  • Code Reference
  • Docs
  • Blog
  • Account
  • Developers
  • Code Reference
  • Docs
  • Blog
  • Account

Widget_WordPress::get_categories

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

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()
Elementor Code Reference
  • Code Reference
  • Elementor Hooks
    • PHP Hooks
    • JS Hooks
  • Elementor Classes
  • Elementor Methods
  • Elementor Functions
Developer Resources

Visit the official Developer Resources to learn how to extend Elementor.

Get Involved

Visit Elementor GitHub repository to contribute code or suggest new ideas.

  • Contact
  • About Us
  • Terms of Service
  • Privacy Policy
  • Template Library
  • Features
  • Theme Builder
  • Get Pro
Theme by Pojo.me
//Made in Elementor Page Builder
Enter your email and be the first to learn about new updates and features.
No thanks, I just want to download Elementor