settings = array( 'term' => array( 'filter' => 'get_term_metadata', 'callback' => array( $this, 'lazyload_meta_callback' ), ), 'comment' => array( 'filter' => 'get_comment_metadata', 'callback' => array( $this, 'lazyload_meta_callback' ), ), 'blog' => array( 'filter' => 'get_blog_metadata', 'callback' => array( $this, 'lazyload_meta_callback' ), ), ); } /** * Adds objects to the metadata lazy-load queue. * * @since 4.5.0 * * @param string $object_type Type of object whose meta is to be lazy-loaded. Accepts 'term' or 'comment'. * @param array $object_ids Array of object IDs. * @return void|WP_Error WP_Error on failure. */ public function queue_objects( $object_type, $object_ids ) { if ( ! isset( $this->settings[ $object_type ] ) ) { return new WP_Error( 'invalid_object_type', __( 'Invalid object type.' ) ); } $type_settings = $this->settings[ $object_type ]; if ( ! isset( $this->pending_objects[ $object_type ] ) ) { $this->pending_objects[ $object_type ] = array(); } foreach ( $object_ids as $object_id ) { // Keyed by ID for faster lookup. if ( ! isset( $this->pending_objects[ $object_type ][ $object_id ] ) ) { $this->pending_objects[ $object_type ][ $object_id ] = 1; } } add_filter( $type_settings['filter'], $type_settings['callback'], 10, 5 ); /** * Fires after objects are added to the metadata lazy-load queue. * * @since 4.5.0 * * @param array $object_ids Array of object IDs. * @param string $object_type Type of object being queued. * @param WP_Metadata_Lazyloader $lazyloader The lazy-loader object. */ do_action( 'metadata_lazyloader_queued_objects', $object_ids, $object_type, $this ); } /** * Resets lazy-load queue for a given object type. * * @since 4.5.0 * * @param string $object_type Object type. Accepts 'comment' or 'term'. * @return void|WP_Error WP_Error on failure. */ public function reset_queue( $object_type ) { if ( ! isset( $this->settings[ $object_type ] ) ) { return new WP_Error( 'invalid_object_type', __( 'Invalid object type.' ) ); } $type_settings = $this->settings[ $object_type ]; $this->pending_objects[ $object_type ] = array(); remove_filter( $type_settings['filter'], $type_settings['callback'] ); } /** * Lazy-loads term meta for queued terms. * * This method is public so that it can be used as a filter callback. As a rule, there * is no need to invoke it directly. * * @since 4.5.0 * @deprecated 6.3.0 Use WP_Metadata_Lazyloader::lazyload_meta_callback() instead. * * @param mixed $check The `$check` param passed from the 'get_term_metadata' hook. * @return mixed In order not to short-circuit `get_metadata()`. Generally, this is `null`, but it could be * another value if filtered by a plugin. */ public function lazyload_term_meta( $check ) { _deprecated_function( __METHOD__, '6.3.0', 'WP_Metadata_Lazyloader::lazyload_meta_callback' ); return $this->lazyload_meta_callback( $check, 0, '', false, 'term' ); } /** * Lazy-loads comment meta for queued comments. * * This method is public so that it can be used as a filter callback. As a rule, there is no need to invoke it * directly, from either inside or outside the `WP_Query` object. * * @since 4.5.0 * @deprecated 6.3.0 Use WP_Metadata_Lazyloader::lazyload_meta_callback() instead. * * @param mixed $check The `$check` param passed from the {@see 'get_comment_metadata'} hook. * @return Services – ECOZEN ENERGY

A brighter future starts with sustainable energy

What Services We Offer

Photo Voltaic solutions from small, residential to utility-scale.

Energy collection

Our wide range of advanced PV collection products are suitable for various applications, such as residential, commercial, industrial, and utility-scale power generation.

Energy conversion

Our industry leading PV inverters and transmission systems perform reliably and without losses in various setups. Stabilize your local or large-scale grid with our products.

Energy storage

Ask us for a suitable energy storage solution for your local context. Our product lineup ranges from batteries to utility scale energy transfer solutions like Hydrogen.

Charging and use cases.

EV chargers

Charge your electric vehicle (EV) smart, fast and safe, with our proven and certified chargers from small to professional.

Smart home

Want to know how your house is using energy? Use our smart home application and connect your devices to monitor use, power collection, storage and efficiency.

Smart grid

Have a lot of roof space? Become a node in a local area power network or connect to the open grid. Sell your surplus energy to offset carbon and gain revenue.

We Can Inspire And Transform Your Business

Let our experts review your business and provide you with insights into your unique business case for sustainability. Our staff provide their expertise to governments, private businesses, NGO’s and though leaders in the space. Our finance arm withing GMA also provides the required financial backbone to make your sustainability project a reality. Reach out to one of our consultants now and start the conversation.

Work Process

Quick scan of your organization

Our mixed discipline team will perform a quick scan of your organization to provide the input for the project plan and solution directions.

Project plan and commitment

After an achievable project plan is signed, we work towards commitment within the project team and the wider stakeholders.

Execution and delivery

The right team for the job makes all the difference in achieving project goals and timeline. Our team will go above and beyond to deliver.

Ready to tell us what idea is in your mind?