acf.php
4 years ago
alignment.php
4 years ago
animation.php
4 years ago
beaver_builder.php
4 years ago
cache.php
4 years ago
classes.php
4 years ago
classic-widgets-screen.php
4 years ago
clone.php
4 years ago
columns.php
4 years ago
dates.php
4 years ago
devices.php
4 years ago
disable_widgets.php
4 years ago
elementor.php
4 years ago
fixed.php
4 years ago
import-export.php
4 years ago
links.php
4 years ago
logic.php
4 years ago
move.php
4 years ago
permission.php
4 years ago
roles.php
4 years ago
search.php
4 years ago
shortcodes.php
4 years ago
sidebar-more_plugins.php
4 years ago
sidebar-opt_in.php
4 years ago
sidebar-support_box.php
4 years ago
sidebar-upsell_pro.php
4 years ago
siteorigin.php
4 years ago
sliding.php
4 years ago
state.php
4 years ago
styling.php
4 years ago
taxonomies.php
4 years ago
title.php
4 years ago
urls.php
4 years ago
visibility.php
4 years ago
widget-area.php
4 years ago
move.php
67 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Move Widgets Module |
| 4 | * Settings > Widget Options :: Move Widget |
| 5 | * |
| 6 | * @copyright Copyright (c) 2017, Jeffrey Carandang |
| 7 | * @since 3.4 |
| 8 | */ |
| 9 | |
| 10 | // Exit if accessed directly |
| 11 | if ( ! defined( 'ABSPATH' ) ) exit; |
| 12 | |
| 13 | /** |
| 14 | * Create Card Module for Move Widget Feature |
| 15 | * |
| 16 | * @since 3.4 |
| 17 | * @global $widget_options |
| 18 | * @return void |
| 19 | */ |
| 20 | |
| 21 | if( !function_exists( 'widgetopts_settings_move' ) ): |
| 22 | function widgetopts_settings_move(){ |
| 23 | global $widget_options; |
| 24 | |
| 25 | //avoid issue after update |
| 26 | if( !isset( $widget_options['move'] ) ){ |
| 27 | $widget_options['move'] = ''; |
| 28 | } |
| 29 | ?> |
| 30 | <li class="widgetopts-module-card widgetopts-module-card-no-settings <?php echo ( $widget_options['move'] == 'activate' ) ? 'widgetopts-module-type-enabled' : 'widgetopts-module-type-disabled'; ?>" id="widgetopts-module-card-move" data-module-id="move"> |
| 31 | <div class="widgetopts-module-card-content"> |
| 32 | <h2><?php _e( 'Move Widget', 'widget-options' );?></h2> |
| 33 | <p class="widgetopts-module-desc"> |
| 34 | <?php _e( 'Easily move widgets to any sidebar widget area without drag and drop.', 'widget-options' );?> |
| 35 | </p> |
| 36 | |
| 37 | <div class="widgetopts-module-actions hide-if-no-js"> |
| 38 | <?php if( $widget_options['move'] == '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 | |
| 48 | </div> |
| 49 | |
| 50 | <?php widgetopts_modal_start( $widget_options['move'] ); ?> |
| 51 | <span class="dashicons widgetopts-dashicons widgetopts-no-top dashicons-image-rotate-right"></span> |
| 52 | <h3 class="widgetopts-modal-header"><?php _e( 'Move Widget', 'widget-options' );?></h3> |
| 53 | <p> |
| 54 | <?php _e( 'Move Widget feature will automatically add <strong>Move</strong> button that will let you easily move any widgets to any sidebar widget areas without dragging them. This will definitely increase your productivity and widget management specially on smaller screen devices such as mobile phones. You can check how this feature works on this <a href="https://vimeo.com/229112330" target="_blank">video</a>. Thanks!', 'widget-options' );?> |
| 55 | </p> |
| 56 | <p class="widgetopts-settings-section"> |
| 57 | <?php _e( 'No additional settings available.', 'widget-options' );?> |
| 58 | </p> |
| 59 | <?php widgetopts_modal_end( $widget_options['move'] ); ?> |
| 60 | |
| 61 | </li> |
| 62 | <?php |
| 63 | } |
| 64 | add_action( 'widgetopts_module_cards', 'widgetopts_settings_move', 64 ); |
| 65 | endif; |
| 66 | ?> |
| 67 |