PluginProbe ʕ •ᴥ•ʔ
YITH WooCommerce Wishlist / 4.0.1
YITH WooCommerce Wishlist v4.0.1
trunk 2.1.0 2.1.1 2.1.2 2.2.0 2.2.1 2.2.10 2.2.11 2.2.12 2.2.13 2.2.14 2.2.15 2.2.16 2.2.17 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 3.0.0 3.0.1 3.0.10 3.0.11 3.0.12 3.0.13 3.0.14 3.0.15 3.0.16 3.0.17 3.0.18 3.0.19 3.0.2 3.0.20 3.0.21 3.0.22 3.0.23 3.0.25 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.10.0 3.11.0 3.12.0 3.13.0 3.14.0 3.15.0 3.16.0 3.17.0 3.18.0 3.19.0 3.2.0 3.20.0 3.21.0 3.22.0 3.23.0 3.24.0 3.25.0 3.26.0 3.27.0 3.28.0 3.29.0 3.3.0 3.30.0 3.31.0 3.32.0 3.33.0 3.34.0 3.35.0 3.36.0 3.37.0 3.38.0 3.4.0 3.5.0 3.6.0 3.7.0 3.8.0 3.9.0 4.0.0 4.0.1 4.1.0 4.10.0 4.10.1 4.10.2 4.11.0 4.12.0 4.13.0 4.14.0 4.15.0 4.2.0 4.3.0 4.4.0 4.5.0 4.6.0 4.7.0 4.8.0 4.9.0
yith-woocommerce-wishlist / plugin-fw / templates / components / action-button.php
yith-woocommerce-wishlist / plugin-fw / templates / components Last commit date
resources 1 year ago action-button.php 3 years ago list-items.php 3 years ago list-table-blank-state.php 4 years ago notice-banner.php 1 year ago notice.php 3 years ago tag.php 3 years ago
action-button.php
65 lines
1 <?php
2 /**
3 * Template for displaying the action-button component
4 *
5 * @var array $component The component.
6 * @package YITH\PluginFramework\Templates\Components
7 */
8
9 defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
10
11 list ( $component_id, $class, $the_title, $attributes, $data, $button_action, $icon, $icon_class, $url, $action_button_menu, $confirm_data ) = yith_plugin_fw_extract( $component, 'id', 'class', 'title', 'attributes', 'data', 'action', 'icon', 'icon_class', 'url', 'menu', 'confirm_data' );
12
13 $button_action = isset( $button_action ) ? $button_action : '';
14 $icon = isset( $icon ) ? $icon : $button_action;
15 $icon_class = isset( $icon_class ) ? $icon_class : "yith-icon yith-icon-{$icon}";
16 $url = isset( $url ) ? $url : '#';
17 $class = isset( $class ) ? $class : '';
18 $the_title = isset( $the_title ) ? $the_title : '';
19 $action_button_menu = isset( $action_button_menu ) ? $action_button_menu : array();
20 $confirm_data = isset( $confirm_data ) ? $confirm_data : array();
21
22 $classes = array( 'yith-plugin-fw__action-button', "yith-plugin-fw__action-button--{$button_action}-action", $class );
23
24 if ( ! ! $action_button_menu ) {
25 $classes[] = 'yith-plugin-fw__action-button--has-menu';
26 }
27
28 $link_classes = array( 'yith-plugin-fw__action-button__link' );
29 $link_data = array();
30 if ( isset( $confirm_data['title'], $confirm_data['message'] ) && '#' !== $url ) {
31 $link_classes[] = 'yith-plugin-fw__require-confirmation-link';
32 $link_data = $confirm_data;
33 }
34
35 if ( $the_title ) {
36 $link_classes[] = 'yith-plugin-fw__tips';
37 }
38
39 $class = implode( ' ', $classes );
40 $link_class = implode( ' ', array_filter( $link_classes ) );
41 ?>
42 <span
43 id="<?php echo esc_attr( $component_id ); ?>"
44 class="<?php echo esc_attr( $class ); ?>"
45 <?php echo yith_plugin_fw_html_attributes_to_string( $attributes ); ?>
46 <?php echo yith_plugin_fw_html_data_to_string( $data ); ?>
47 >
48 <a class="<?php echo esc_attr( $link_class ); ?>"
49 aria-label="<?php echo esc_attr( $the_title ); ?>"
50 href="<?php echo esc_url( $url ); ?>"
51 <?php if ( $the_title ) : ?>
52 data-tip="<?php echo esc_attr( $the_title ); ?>"
53 <?php endif; ?>
54
55 <?php yith_plugin_fw_html_data_to_string( $link_data, true ); ?>
56 >
57 <?php if ( $icon ) : ?>
58 <i class="yith-plugin-fw__action-button__icon <?php echo esc_attr( $icon_class ); ?>"></i>
59 <?php endif; ?>
60 </a>
61 <?php if ( $action_button_menu ) : ?>
62 <?php yith_plugin_fw_include_fw_template( '/components/resources/action-button-menu.php', compact( 'action_button_menu' ) ); ?>
63 <?php endif; ?>
64 </span>
65