# automatorwp/6.0.3/integrations/favorites/includes/functions.php

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

- Page: https://pluginprobe.com/plugins/automatorwp/6.0.3/code/integrations/favorites/includes/functions.php
- Raw: https://pluginprobe.com/plugins/automatorwp/6.0.3/raw/integrations/favorites/includes/functions.php
- Modified: 2026-09-30T10:02:50+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.3/code/integrations/favorites/includes/functions.php#L10-L20`.

```php
<?php
/**
 * Functions
 *
 * @package     AutomatorWP\Integrations\Favorites\Functions
 * @author      AutomatorWP <contact@automatorwp.com>, Ruben Garcia <rubengcdev@gmail.com>
 * @since       1.0.0
 */
// Exit if accessed directly
if( !defined( 'ABSPATH' ) ) exit;

/**
 * Post type options callback
 *
 * @since 1.0.0
 *
 * @return array
 */
function automatorwp_favorites_post_type_cb() {

    $post_types = array();

    // Get favorites post type display options
    $types = get_option('simplefavorites_display');

    if ( ! empty( $types['posttypes'] ) && $types !== "" ) {

        foreach ( $types['posttypes'] as $key => $type ) {

            // If favorites display is active, then add the post type
            if ( isset( $type['display'] ) && $type['display'] == 'true' ) {
                $post_types[] = $key;
            }

        }

    }

    return $post_types;

}
```
