first commit

This commit is contained in:
2023-09-12 21:41:04 +02:00
commit 3361a7f053
13284 changed files with 2116755 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<?php
/**
* @author OnTheGo Systems
*/
class WPML_Menu_Element extends WPML_Term_Element {
/**
* WPML_Menu_Element constructor.
*
* @param int $id
* @param SitePress $sitepress
* @param WPML_WP_Cache $wpml_cache
*/
public function __construct( $id, SitePress $sitepress, WPML_WP_Cache $wpml_cache = null ) {
$this->taxonomy = 'nav_menu';
parent::__construct( $id, $sitepress, $this->taxonomy, $wpml_cache );
}
/**
* @param stdClass $element_data standard object containing at least the `term_id` property.
*
* @return WPML_Menu_Element
* @throws \InvalidArgumentException Exception.
*/
public function get_new_instance( $element_data ) {
return new WPML_Menu_Element( $element_data->term_id, $this->sitepress, $this->wpml_cache );
}
}