acf.php
5 years ago
alignment.php
5 years ago
animation.php
5 years ago
beaver_builder.php
5 years ago
cache.php
5 years ago
classes.php
5 years ago
clone.php
5 years ago
columns.php
5 years ago
dates.php
5 years ago
devices.php
5 years ago
disable_widgets.php
5 years ago
elementor.php
5 years ago
fixed.php
5 years ago
import-export.php
5 years ago
links.php
5 years ago
logic.php
5 years ago
move.php
5 years ago
permission.php
5 years ago
roles.php
5 years ago
search.php
5 years ago
shortcodes.php
5 years ago
sidebar-more_plugins.php
5 years ago
sidebar-opt_in.php
5 years ago
sidebar-support_box.php
5 years ago
sidebar-upsell_pro.php
5 years ago
siteorigin.php
5 years ago
sliding.php
5 years ago
state.php
5 years ago
styling.php
5 years ago
taxonomies.php
5 years ago
title.php
5 years ago
urls.php
5 years ago
visibility.php
5 years ago
widget-area.php
5 years ago
acf.php
66 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Elementor Settings Module |
| 4 | * Settings > Widget Options :: ACF Support |
| 5 | * |
| 6 | * @copyright Copyright (c) 2017, Jeffrey Carandang |
| 7 | * @since 4.3 |
| 8 | */ |
| 9 | |
| 10 | // Exit if accessed directly |
| 11 | if ( ! defined( 'ABSPATH' ) ) exit; |
| 12 | |
| 13 | /** |
| 14 | * Create Card Module for Elementor Pagebuilder Support |
| 15 | * |
| 16 | * @since 4.3 |
| 17 | * @global $widget_options |
| 18 | * @return void |
| 19 | */ |
| 20 | |
| 21 | if( !class_exists( 'widgetopts_settings_acf' ) ){ |
| 22 | function widgetopts_settings_acf(){ |
| 23 | global $widget_options; |
| 24 | //avoid issue after update |
| 25 | if( !isset( $widget_options['acf'] ) ){ |
| 26 | $widget_options['acf'] = ''; |
| 27 | } |
| 28 | ?> |
| 29 | <li class="widgetopts-module-card widgetopts-module-card-no-settings <?php echo ( $widget_options['acf'] == 'activate' ) ? 'widgetopts-module-type-enabled' : 'widgetopts-module-type-disabled'; ?>" id="widgetopts-module-card-acf" data-module-id="acf"> |
| 30 | <div class="widgetopts-module-card-content"> |
| 31 | <h2><?php _e( 'Advanced Custom Fields Support', 'widget-options' );?></h2> |
| 32 | <div class="widgetopts-pro-label" style="background: transparent;color: #777;"><?php _e( 'BETA', 'widget-options' );?></div> |
| 33 | <p class="widgetopts-module-desc"> |
| 34 | <?php _e( 'Extends widget options visibility using Advanced Custom Fields Plugin.', 'widget-options' );?> |
| 35 | </p> |
| 36 | |
| 37 | <div class="widgetopts-module-actions hide-if-no-js"> |
| 38 | <?php if( $widget_options['acf'] == 'activate' ){ ?> |
| 39 | <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Configure Settings', 'widget-options' );?></button> |
| 40 | <button class="button button-secondary widgetopts-toggle-activation"><?php _e( 'Disable', 'widget-options' );?></button> |
| 41 | <?php }else{ ?> |
| 42 | <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Learn More', 'widget-options' );?></button> |
| 43 | <button class="button button-primary widgetopts-toggle-activation"><?php _e( 'Enable', 'widget-options' );?></button> |
| 44 | <?php } ?> |
| 45 | |
| 46 | </div> |
| 47 | </div> |
| 48 | |
| 49 | <?php widgetopts_modal_start( $widget_options['acf'] ); ?> |
| 50 | <span class="dashicons widgetopts-dashicons widgetopts-no-top dashicons-editor-textcolor"></span> |
| 51 | <h3 class="widgetopts-modal-header"><?php _e( 'Advanced Custom Fields Support', 'widget-options' );?></h3> |
| 52 | <p> |
| 53 | <?php _e( 'Enabling this feature will give you more visibility options for each widget and assign condition using ACF field.', 'widget-options' );?> |
| 54 | </p> |
| 55 | <p class="widgetopts-settings-section"> |
| 56 | <?php _e( 'No additional settings available.', 'widget-options' );?> |
| 57 | </p> |
| 58 | <?php widgetopts_modal_end( $widget_options['acf'] ); ?> |
| 59 | |
| 60 | </li> |
| 61 | <?php |
| 62 | } |
| 63 | add_action( 'widgetopts_module_cards', 'widgetopts_settings_acf', 67 ); |
| 64 | } |
| 65 | ?> |
| 66 |