PluginProbe
AutomatorWP – No-Code Workflow Automation, Integration & Webhooks Plugin, now with AI / 6.0.0
AutomatorWP – No-Code Workflow Automation, Integration & Webhooks Plugin, now with AI v6.0.0
6.0.3 6.0.2 6.0.1 6.0.0 5.8.6 5.8.5 5.8.4 5.8.3 5.8.2 5.8.1 5.8.0 5.7.9.2 5.7.9.1 5.7.8 5.7.9 5.7.6 5.7.7 5.7.5 5.7.4 5.7.3 5.7.2 5.7.1 trunk 5.6.0 5.6.1 All 34 releases
automatorwp / integrations / favorites / includes / functions.php

functions.php in AutomatorWP – No-Code Workflow Automation, Integration & Webhooks Plugin, now with AI 6.0.0, at integrations/favorites/includes/functions.php

41 lines 928 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Functions
4 *
5 * @package AutomatorWP\Integrations\Favorites\Functions
6 * @author AutomatorWP <[email protected]>, Ruben Garcia <[email protected]>
7 * @since 1.0.0
8 */
9 // Exit if accessed directly
10 if( !defined( 'ABSPATH' ) ) exit;
11
12 /**
13 * Post type options callback
14 *
15 * @since 1.0.0
16 *
17 * @return array
18 */
19 function automatorwp_favorites_post_type_cb() {
20
21 $post_types = array();
22
23 // Get favorites post type display options
24 $types = get_option('simplefavorites_display');
25
26 if ( ! empty( $types['posttypes'] ) && $types !== "" ) {
27
28 foreach ( $types['posttypes'] as $key => $type ) {
29
30 // If favorites display is active, then add the post type
31 if ( isset( $type['display'] ) && $type['display'] == 'true' ) {
32 $post_types[] = $key;
33 }
34
35 }
36
37 }
38
39 return $post_types;
40
41 }