# automatorwp/6.0.2/integrations/jetengine/includes/functions.php

AutomatorWP – No-Code Workflow Automation, Integration &amp; Webhooks Plugin, now with AI, version 6.0.2. 70 lines.

- Page: https://pluginprobe.com/plugins/automatorwp/6.0.2/code/integrations/jetengine/includes/functions.php
- Raw: https://pluginprobe.com/plugins/automatorwp/6.0.2/raw/integrations/jetengine/includes/functions.php
- Modified: 2026-09-14T10:29:36+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/automatorwp/6.0.2/code/integrations/jetengine/includes/functions.php#L10-L20`.

```php
<?php
/**
 * Functions
 *
 * @package     AutomatorWP\JetEngine\Functions
 * @author      AutomatorWP <contact@automatorwp.com>, Ruben Garcia <rubengcdev@gmail.com>
 * @since       1.0.0
 */
// Exit if accessed directly
if( !defined( 'ABSPATH' ) ) exit;

/**
 * Get JetEngine post type
 *
 * @since 1.0.0
 *
 * @return array
 */
function automatorwp_jetengine_options_cb_post_type( $field ) {

    // Setup vars
    $value = $field->escaped_value;
    $none_value = 'any';
    $none_label = __( 'any type', 'automatorwp' );
    $options = automatorwp_options_cb_none_option( $field, $none_value, $none_label );
    
    $post_types_obj = jet_engine()->cpt;
    $post_types = $post_types_obj->get_items();

    foreach ( $post_types as $post_type ) {
        
        if ( ! empty( $post_type['id'] ) && ! empty( $post_type['slug'] ) ) {

            $options[$post_type['slug']] = $post_type['labels']['name'];

        }
    }

    return $options;

}

/**
 * Check JetEngine post type
 *
 * @since 1.0.0
 * 
 * @param object $post  Post data
 *
 * @return bool
 */
function automatorwp_jetengine_check_type( $post ) {

    $array_types = array();

    // Get JetEngine post types
    $post_types_obj = jet_engine()->cpt;
    $post_types = $post_types_obj->get_items();

    foreach( $post_types as $post_type ) {
        $array_types[] = $post_type['slug'];
    }

    // Bail if the post is not a JetEngine type
    if ( !in_array( $post->post_type, $array_types ) ){
        return false;
    }

    return true;
}
```
