PluginProbe ʕ •ᴥ•ʔ
Widget Options – Advanced Conditional Visibility for Gutenberg Blocks & Classic Widgets / 4.2.0
Widget Options – Advanced Conditional Visibility for Gutenberg Blocks & Classic Widgets v4.2.0
4.2.5 4.2.4 trunk 3.7.10 3.7.11 3.7.12 3.7.13 3.7.14 3.7.2 3.7.5 3.7.6 3.7.7 3.7.8 3.7.9 3.8 3.8.1 3.8.10 3.8.2 3.8.3 3.8.4 3.8.5 3.8.6 3.8.7 3.8.8 3.8.9 3.8.9.1 3.9.0 3.9.1 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.0.5.1 4.0.6 4.0.6.1 4.0.7 4.0.8 4.0.9 4.1.0 4.1.1 4.1.2 4.1.3 4.2.0 4.2.1 4.2.2 4.2.3
widget-options / includes / widgets / option-tabs / alignment.php
widget-options / includes / widgets / option-tabs Last commit date
alignment.php 3 months ago animation.php 3 months ago behavior.php 3 months ago days-dates.php 3 months ago devices.php 3 months ago settings.php 3 months ago state.php 3 months ago styling.php 3 months ago upsell.php 3 months ago visibility.php 3 months ago
alignment.php
86 lines
1 <?php
2
3 /**
4 * Alignment Widget Options
5 *
6 * @copyright Copyright (c) 2015, Jeffrey Carandang
7 * @since 1.0
8 */
9
10 // Exit if accessed directly
11 if (!defined('ABSPATH')) exit;
12
13 /**
14 * Add Alignment Widget Options Tab
15 *
16 * @since 1.0
17 * @return void
18 */
19
20 /**
21 * Called on 'extended_widget_opts_tabs'
22 * create new tab navigation for alignment options
23 */
24 function widgetopts_tab_alignment($args)
25 { ?>
26 <li class="extended-widget-opts-tab-alignment">
27 <a href="#extended-widget-opts-tab-<?php echo $args['id']; ?>-alignment" title="<?php _e('Alignment', 'widget-options'); ?>"><span class="dashicons dashicons-editor-aligncenter"></span> <span class="tabtitle"><?php _e('Alignment', 'widget-options'); ?></span></a>
28 </li>
29 <?php
30 }
31 add_action('extended_widget_opts_tabs', 'widgetopts_tab_alignment', 2);
32
33 /**
34 * Called on 'extended_widget_opts_tabcontent'
35 * create new tab content options for alignment options
36 */
37 function widgetopts_tabcontent_alignment($args)
38 {
39 $desktop = '';
40 if (isset($args['params']) && isset($args['params']['alignment'])) {
41 if (isset($args['params']['alignment']['desktop'])) {
42 $desktop = $args['params']['alignment']['desktop'];
43 }
44 }
45 $upgrade_link = apply_filters('widget_options_site_url', trailingslashit(WIDGETOPTS_PLUGIN_WEBSITE));
46 ?>
47 <div id="extended-widget-opts-tab-<?php echo $args['id']; ?>-alignment" class="extended-widget-opts-tabcontent extended-widget-opts-tabcontent-alignment">
48 <table class="form-table">
49 <tbody>
50 <tr valign="top">
51 <td scope="row"><strong><?php _e('Devices', 'widget-options'); ?></strong></td>
52 <td><strong><?php _e('Alignment', 'widget-options'); ?></strong></td>
53 </tr>
54 <tr valign="top">
55 <td scope="row"><span class="dashicons dashicons-desktop"></span> <?php _e('All Devices', 'widget-options'); ?></td>
56 <td>
57 <select class="widefat" name="<?php echo $args['namespace']; ?>[extended_widget_opts][alignment][desktop]">
58 <option value="default"><?php _e('Default', 'widget-options'); ?></option>
59 <option value="center" <?php if ($desktop == 'center') {
60 echo 'selected="selected"';
61 } ?>><?php _e('Center', 'widget-options'); ?></option>
62 <option value="left" <?php if ($desktop == 'left') {
63 echo 'selected="selected"';
64 } ?>><?php _e('Left', 'widget-options'); ?></option>
65 <option value="right" <?php if ($desktop == 'right') {
66 echo 'selected="selected"';
67 } ?>><?php _e('Right', 'widget-options'); ?></option>
68 <option value="justify" <?php if ($desktop == 'justify') {
69 echo 'selected="selected"';
70 } ?>><?php _e('Justify', 'widget-options'); ?></option>
71 </select>
72 </td>
73 </tr>
74 <tr valign="top" class="widgetopts-topro">
75 <td colspan="2">
76 <div class="extended-widget-opts-feature-warning">
77 <small><?php _e('<em>Upgrade to <a href="' . $upgrade_link . '" target="_blank">Pro Version</a> for Multiple Devices Alignment and Additional Widget Options.</em>', 'widget-options'); ?></small>
78 </div>
79 </td>
80 </tr>
81 </tbody>
82 </table>
83 </div>
84 <?php
85 }
86 add_action('extended_widget_opts_tabcontent', 'widgetopts_tabcontent_alignment'); ?>