acf.php
3 months ago
alignment.php
3 months ago
animation.php
3 months ago
beaver_builder.php
3 months ago
cache.php
3 months ago
classes.php
3 months ago
classic-widgets-screen.php
3 months ago
clone.php
3 months ago
columns.php
3 months ago
custom-sidebar.php
3 months ago
dates.php
3 months ago
devices.php
3 months ago
disable_widgets.php
3 months ago
elementor.php
3 months ago
fixed.php
3 months ago
import-export.php
3 months ago
links.php
3 months ago
logic.php
3 months ago
move.php
3 months ago
page-and-post-block.php
3 months ago
permission.php
3 months ago
roles.php
3 months ago
search.php
3 months ago
shortcodes.php
3 months ago
sidebar-more_plugins.php
3 months ago
sidebar-opt_in.php
3 months ago
sidebar-support_box.php
3 months ago
sidebar-upsell_pro.php
3 months ago
siteorigin.php
3 months ago
sliding.php
3 months ago
state.php
3 months ago
styling.php
3 months ago
taxonomies.php
3 months ago
title.php
3 months ago
urls.php
3 months ago
visibility.php
3 months ago
widget-area.php
3 months ago
alignment.php
64 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Alignment Settings Module |
| 4 | * Settings > Widget Options :: Custom Alignment |
| 5 | * |
| 6 | * @copyright Copyright (c) 2016, Jeffrey Carandang |
| 7 | * @since 3.0 |
| 8 | */ |
| 9 | |
| 10 | // Exit if accessed directly |
| 11 | if ( ! defined( 'ABSPATH' ) ) exit; |
| 12 | |
| 13 | /** |
| 14 | * Create Card Module for Custom Alignment Options |
| 15 | * |
| 16 | * @since 3.0 |
| 17 | * @global $widget_options |
| 18 | * @return void |
| 19 | */ |
| 20 | |
| 21 | /* |
| 22 | * Note: Please add a class "no-settings" in the <li> card if the card has no additional configuration, if there are configuration please remove the class |
| 23 | */ |
| 24 | |
| 25 | if( !function_exists( 'widgetopts_settings_alignment' ) ): |
| 26 | function widgetopts_settings_alignment(){ |
| 27 | global $widget_options; ?> |
| 28 | <li class="widgetopts-module-card widgetopts-module-card-no-settings no-settings <?php echo ( $widget_options['alignment'] == 'activate' ) ? 'widgetopts-module-type-enabled' : 'widgetopts-module-type-disabled'; ?>" id="widgetopts-module-card-alignment" data-module-id="alignment"> |
| 29 | <div class="widgetopts-module-card-content"> |
| 30 | <h2><?php _e( 'Custom Alignment', 'widget-options' );?></h2> |
| 31 | <p class="widgetopts-module-desc"> |
| 32 | <?php _e( 'Easily assign custom alignments on each widgets which will be relected on all devices.', 'widget-options' );?> |
| 33 | </p> |
| 34 | |
| 35 | <div class="widgetopts-module-actions hide-if-no-js"> |
| 36 | <?php if( $widget_options['alignment'] == 'activate' ){ ?> |
| 37 | <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Learn More', 'widget-options' );?></button> |
| 38 | <button class="button button-secondary widgetopts-toggle-activation"><?php _e( 'Disable', 'widget-options' );?></button> |
| 39 | <?php }else{ ?> |
| 40 | <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Learn More', 'widget-options' );?></button> |
| 41 | <button class="button button-primary widgetopts-toggle-activation"><?php _e( 'Enable', 'widget-options' );?></button> |
| 42 | <?php } ?> |
| 43 | |
| 44 | </div> |
| 45 | </div> |
| 46 | |
| 47 | <?php widgetopts_modal_start( $widget_options['alignment'] ); ?> |
| 48 | <span class="dashicons widgetopts-dashicons widgetopts-no-top dashicons-editor-aligncenter"></span> |
| 49 | <h3 class="widgetopts-modal-header"><?php _e( 'Custom Alignment', 'widget-options' );?></h3> |
| 50 | <p> |
| 51 | <?php _e( 'Custom alignment widget options will allow you to assign different content alignments for each widgets. You can choose whether you want them to be left, right, justify or centered aligned.', 'widget-options' );?> |
| 52 | </p> |
| 53 | <p class="widgetopts-settings-section"> |
| 54 | <?php _e( 'No additional settings available.', 'widget-options' );?> |
| 55 | </p> |
| 56 | <?php widgetopts_modal_end( $widget_options['alignment'] ); ?> |
| 57 | |
| 58 | </li> |
| 59 | <?php |
| 60 | } |
| 61 | add_action( 'widgetopts_module_cards', 'widgetopts_settings_alignment', 30 ); |
| 62 | endif; |
| 63 | ?> |
| 64 |