acf.php
2 months ago
alignment.php
2 months ago
animation.php
2 months ago
beaver_builder.php
2 months ago
cache.php
2 months ago
classes.php
2 months ago
classic-widgets-screen.php
2 months ago
clone.php
2 months ago
columns.php
2 months ago
custom-sidebar.php
2 months ago
dates.php
2 months ago
devices.php
2 months ago
disable_widgets.php
2 months ago
elementor.php
2 months ago
fixed.php
2 months ago
import-export.php
2 months ago
links.php
2 months ago
logic.php
2 months ago
move.php
2 months ago
page-and-post-block.php
2 months ago
permission.php
2 months ago
roles.php
2 months ago
search.php
2 months ago
shortcodes.php
2 months ago
sidebar-more_plugins.php
2 months ago
sidebar-opt_in.php
2 months ago
sidebar-support_box.php
2 months ago
sidebar-upsell_pro.php
2 months ago
siteorigin.php
2 months ago
sliding.php
2 months ago
state.php
2 months ago
styling.php
2 months ago
taxonomies.php
2 months ago
title.php
2 months ago
urls.php
2 months ago
visibility.php
2 months ago
widget-area.php
2 months ago
page-and-post-block.php
76 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Widget Title Settings Module |
| 5 | * Settings > Widget Options :: Hide Title |
| 6 | * |
| 7 | * @copyright Copyright (c) 2016, Jeffrey Carandang |
| 8 | * @since 4.0 |
| 9 | */ |
| 10 | |
| 11 | // Exit if accessed directly |
| 12 | if (!defined('ABSPATH')) exit; |
| 13 | |
| 14 | /** |
| 15 | * Create Card Module for Hide Widget Title |
| 16 | * |
| 17 | * @since 4.0 |
| 18 | * @global $widget_options |
| 19 | * @return void |
| 20 | */ |
| 21 | |
| 22 | /* |
| 23 | * 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 |
| 24 | */ |
| 25 | |
| 26 | function widgetopts_settings_page_and_post_block() |
| 27 | { |
| 28 | global $widget_options; |
| 29 | $hide_page_and_post_block = (isset($widget_options['settings']['hide_page_and_post_block'])) ? $widget_options['settings']['hide_page_and_post_block'] : array(); |
| 30 | ?> |
| 31 | <li class="widgetopts-module-card <?php echo ($widget_options['hide_page_and_post_block'] == 'activate') ? 'widgetopts-module-type-enabled' : 'widgetopts-module-type-disabled'; ?>" id="widgetopts-module-card-hide_page_and_post_block" data-module-id="hide_page_and_post_block"> |
| 32 | <div class="widgetopts-module-card-content"> |
| 33 | <h2><?php _e('Gutenberg Page & Post Block Options', 'widget-options'); ?></h2> |
| 34 | <p class="widgetopts-module-desc"> |
| 35 | <?php _e('Extends widget options to Gutenberg blocks in pages, posts and other custom post types.', 'widget-options'); ?> |
| 36 | </p> |
| 37 | |
| 38 | <div class="widgetopts-module-actions hide-if-no-js"> |
| 39 | <?php if ($widget_options['hide_page_and_post_block'] == 'activate') { ?> |
| 40 | <button class="button button-secondary widgetopts-toggle-settings"><?php _e('Configure Settings', 'widget-options'); ?></button> |
| 41 | <button class="button button-secondary widgetopts-toggle-activation"><?php _e('Disable', 'widget-options'); ?></button> |
| 42 | <?php } else { ?> |
| 43 | <button class="button button-secondary widgetopts-toggle-settings"><?php _e('Learn More', 'widget-options'); ?></button> |
| 44 | <button class="button button-primary widgetopts-toggle-activation"><?php _e('Enable', 'widget-options'); ?></button> |
| 45 | <?php } ?> |
| 46 | |
| 47 | </div> |
| 48 | </div> |
| 49 | |
| 50 | <?php widgetopts_modal_start($widget_options['hide_page_and_post_block']); ?> |
| 51 | <span class="dashicons widgetopts-dashicons widgetopts-no-top dashicons-admin-generic"></span> |
| 52 | <h3 class="widgetopts-modal-header"><?php _e('Gutenberg Page & Post Block Options', 'widget-options'); ?></h3> |
| 53 | <p> |
| 54 | <?php _e("Widget Options offers a wide range of customization options for Gutenberg blocks on pages, posts, and other custom post types, enabling you more control than ever before over your site's content. Key features include alignment, roles, devices, days and dates, behaviour, logic, and animation.", 'widget-options'); ?> |
| 55 | </p> |
| 56 | <table class="form-table widgetopts-settings-section"> |
| 57 | <tr> |
| 58 | <th scope="row"> |
| 59 | <label for="widgetopts-hide_page_and_post_block-page_and_post_block"><?php _e("Pages and Posts", 'widget-options'); ?></label> |
| 60 | </th> |
| 61 | <td> |
| 62 | <input type="checkbox" id="widgetopts-hide_page_and_post_block-page_and_post_block" name="hide_page_and_post_block[page_and_post_block]" <?php echo widgetopts_is_checked($hide_page_and_post_block, 'page_and_post_block') ?> value="1" /> |
| 63 | <label for="widgetopts-hide_page_and_post_block-page_and_post_block"><?php _e('Hide on Pages and Posts Blocks', 'widget-options'); ?></label> |
| 64 | <p class="description"> |
| 65 | <?php printf(__("Don't show widget options on pages, posts and other custom post types blocks.", 'widget-options')); ?> |
| 66 | </p> |
| 67 | </td> |
| 68 | </tr> |
| 69 | </table> |
| 70 | <?php widgetopts_modal_end($widget_options['hide_page_and_post_block']); ?> |
| 71 | |
| 72 | </li> |
| 73 | <?php |
| 74 | } |
| 75 | add_action('widgetopts_module_cards', 'widgetopts_settings_page_and_post_block', 11); |
| 76 | ?> |