PluginProbe
MainWP Dashboard: Self-hosted WordPress Management for Agencies / 6.2.1
MainWP Dashboard: Self-hosted WordPress Management for Agencies v6.2.1
6.2.2 6.2.1 6.2 6.1.8 6.1.7 6.1.6 6.1.5 6.1.4 6.1.3 6.1.2 6.1.1 6.1 6.0.12 6.0.11 4.6.0.1 5.0 5.0.1 5.0.2 5.0.3 5.0.3.1 5.0.3.2 5.1 5.1.1 5.2 5.2.1 All 155 releases
← All changes | widgets/widget-mainwp-client-overview-contacts.php +88 -90 5.1 → 6.2.1 View file →
@@ -8,8 +8,14 @@
8 8 */
9 9
10 10 namespace MainWP\Dashboard;
11 11
12 +// Exit if accessed directly.
13 +if ( ! defined( 'ABSPATH' ) ) {
14 + exit;
15 +}
16 +
17 +
12 18 /**
13 19 * Class MainWP_Client_Overview_Contacts
14 20 *
15 21 * Displays the Client Contacts.
@@ -58,107 +64,99 @@
58 64 }
59 65
60 66 ?>
61 67 <div class="mainwp-widget-header">
62 - <h3 class="ui header handle-drag">
68 + <h2 class="ui header handle-drag">
69 + <?php
70 + /**
71 + * Filter: mainwp_clients_overview_contact_widget_title
72 + *
73 + * Filters the Site info widget title text.
74 + *
75 + * @param object $contact_info Object containing the child site info.
76 + *
77 + * @since 4.1
78 + */
79 + echo esc_html( apply_filters( 'mainwp_clients_overview_contact_widget_title', __( 'Client Contact', 'mainwp' ), $contact_info ) );
80 + ?>
81 + <div class="sub header">
82 + <?php echo esc_html( apply_filters( 'mainwp_clients_overview_contact_widget_sutbitle', __( 'Contact Information', 'mainwp' ), $contact_info ) ); ?>
83 + </div>
84 + </h2>
85 + </div>
86 + <div class="mainwp-widget-client-card mainwp-scrolly-overflow">
63 87 <?php
64 88 /**
65 - * Filter: mainwp_clients_overview_contact_widget_title
89 + * Actoin: mainwp_clients_overview_contact_widget_top
66 90 *
67 - * Filters the Site info widget title text.
91 + * Fires at the top of the Site Info widget on the Individual site overview page.
68 92 *
69 93 * @param object $contact_info Object containing the child site info.
70 94 *
71 - * @since 4.1
95 + * @since 4.0
72 96 */
73 - echo esc_html( apply_filters( 'mainwp_clients_overview_contact_widget_title', $contact_info['contact_name'], $contact_info ) );
97 + do_action( 'mainwp_clients_overview_contact_widget_top', $contact_info );
74 98 ?>
75 - <div class="sub header">
76 - <?php echo esc_html( apply_filters( 'mainwp_clients_overview_contact_widget_sutbitle', $contact_info['contact_role'], $contact_info ) ); ?>
77 - </div>
78 - </h3>
79 - </div>
80 - <div class="mainwp-widget-client-card mainwp-scrolly-overflow">
81 - <?php
82 - /**
83 - * Actoin: mainwp_clients_overview_contact_widget_top
84 - *
85 - * Fires at the top of the Site Info widget on the Individual site overview page.
86 - *
87 - * @param object $contact_info Object containing the child site info.
88 - *
89 - * @since 4.0
90 - */
91 - do_action( 'mainwp_clients_overview_contact_widget_top', $contact_info );
92 - ?>
93 - <?php if ( $contact_info ) { ?>
94 - <div class="ui stackable grid">
95 - <div class="four wide column">
96 - <?php
97 - $contact_display_image = MainWP_Client_Handler::get_client_contact_image( $contact_info, 'contact', 'card' );
98 - echo $contact_display_image; //phpcs:ignore -- ok.
99 - ?>
99 + <?php if ( $contact_info ) : ?>
100 + <div class="ui grid">
101 + <div class="sixteen wide center aligned column">
102 + <div class="ui image">
103 + <?php echo MainWP_Client_Handler::get_client_contact_image( $contact_info, 'contact', 'small' ); //phpcs:ignore -- ok. ?>
104 + </div>
105 + </div>
106 + <div class="sixteen wide center aligned column">
107 + <h2 class="ui center aligned header">
108 + <div class="content">
109 + <?php echo esc_html( $contact_info['contact_name'] ); ?>
110 + <?php if ( isset( $contact_info['contact_role'] ) && ! empty( $contact_info['contact_role'] ) ) : ?>
111 + <div class="sub header">
112 + <?php echo esc_html( $contact_info['contact_role'] ); ?>
100 113 </div>
101 - <div class="twelve wide middle aligned column">
102 - <div class="ui relaxed list">
103 - <?php if ( isset( $contact_info['contact_email'] ) && '' !== $contact_info['contact_email'] ) : ?>
104 - <div class="item">
105 - <i class="envelope grey icon"></i>
106 - <div class="content"><a href="mailto:<?php echo esc_url( $contact_info['contact_email'] ); ?>" target="_blank"><?php echo esc_html( $contact_info['contact_email'] ); ?></a> <i data-clipboard-text="<?php echo esc_html( $contact_info['contact_email'] ); ?>" style="cursor:pointer" class="copy green icon copy-to-clipboard"></i></div>
107 - </div>
108 114 <?php endif; ?>
109 - <?php if ( isset( $contact_info['contact_phone'] ) && '' !== $contact_info['contact_phone'] ) : ?>
110 - <div class="item">
111 - <i class="phone grey rotated icon"></i>
112 - <div class="content"><a href="tel:<?php echo esc_url( $contact_info['contact_phone'] ); ?>" target="_blank"><?php echo esc_html( $contact_info['contact_phone'] ); ?></a></div>
113 - </div>
114 - <?php endif; ?>
115 - <?php if ( isset( $contact_info['facebook'] ) && '' !== $contact_info['facebook'] ) : ?>
116 - <div class="item">
117 - <i class="facebook grey icon"></i>
118 - <div class="content"><a href="<?php echo esc_url( $contact_info['facebook'] ); ?>" target="_blank"><?php echo esc_html( $contact_info['facebook'] ); ?></a></div>
119 - </div>
120 - <?php endif; ?>
121 - <?php if ( isset( $contact_info['twitter'] ) && '' !== $contact_info['twitter'] ) : ?>
122 - <div class="item">
123 - <i class="twitter grey icon"></i>
124 - <div class="content"><a href="<?php echo esc_url( $contact_info['twitter'] ); ?>" target="_blank"><?php echo esc_html( $contact_info['twitter'] ); ?></a></div>
125 - </div>
126 - <?php endif; ?>
127 - <?php if ( isset( $contact_info['instagram'] ) && '' !== $contact_info['instagram'] ) : ?>
128 - <div class="item">
129 - <i class="instagram grey icon"></i>
130 - <div class="content"><a href="<?php echo esc_url( $contact_info['instagram'] ); ?>" target="_blank"><?php echo esc_html( $contact_info['instagram'] ); ?></a></div>
131 - </div>
132 - <?php endif; ?>
133 - <?php if ( isset( $contact_info['linkedin'] ) && '' !== $contact_info['linkedin'] ) : ?>
134 - <div class="item">
135 - <i class="linkedin grey icon"></i>
136 - <div class="content"><a href="<?php echo esc_url( $contact_info['linkedin'] ); ?>" target="_blank"><?php echo esc_html( $contact_info['linkedin'] ); ?></a></div>
137 - </div>
138 - <?php endif; ?>
139 - </div>
140 - </div>
141 - </div>
142 - <div class="ui hidden divider"></div>
143 - <script type="text/javascript">
144 - jQuery( document ).ready( function ($) {
145 - new ClipboardJS('.copy-to-clipboard');
146 - });
147 - </script>
148 - <?php } ?>
149 - <?php
150 - /**
151 - * Action: mainwp_clients_overview_contact_widget_bottom
152 - *
153 - * Fires at the bottom of the Site Info widget on the Individual site overview page.
154 - *
155 - * @param object $contact_info Object containing the child site info.
156 - *
157 - * @since 4.0
158 - */
159 - do_action( 'mainwp_clients_overview_contact_widget_bottom', $contact_info );
160 - ?>
161 - </div>
115 + </div>
116 + </h2>
117 + </div>
118 +
119 + <div class="sixteen wide center aligned column">
120 + <?php if ( isset( $contact_info['contact_email'] ) && '' !== $contact_info['contact_email'] ) : ?>
121 + <a href="mailto:<?php echo esc_attr( $contact_info['contact_email'] ); ?>" class="ui basic icon button" target="_blank" data-tooltip="<?php echo esc_attr( $contact_info['contact_email'] ); ?>" data-inverted="" data-position="top center">
122 + <i class="envelope grey icon"></i>
123 + </a>
124 + <?php endif; ?>
125 + <?php if ( isset( $contact_info['contact_phone'] ) && '' !== $contact_info['contact_phone'] ) : ?>
126 + <a href="tel:<?php echo esc_attr( $contact_info['contact_phone'] ); ?>" class="ui basic icon button" target="_blank" data-tooltip="<?php echo esc_attr( $contact_info['contact_phone'] ); ?>" data-inverted="" data-position="top center">
127 + <i class="phone grey icon"></i>
128 + </a>
129 + <?php endif; ?>
130 +
131 +
132 + <?php if ( isset( $contact_info['facebook'] ) && '' !== $contact_info['facebook'] ) : ?>
133 + <a href="<?php echo esc_url( $contact_info['facebook'] ); ?>" class="ui basic icon button" target="_blank"><i class="facebook grey icon"></i></a>
134 + <?php endif; ?>
135 + <?php if ( isset( $contact_info['twitter'] ) && '' !== $contact_info['twitter'] ) : ?>
136 + <a href="<?php echo esc_url( $contact_info['twitter'] ); ?>" class="ui basic icon button" target="_blank"><i class="twitter grey icon"></i></a>
137 + <?php endif; ?>
138 + <?php if ( isset( $contact_info['instagram'] ) && '' !== $contact_info['instagram'] ) : ?>
139 + <a href="<?php echo esc_url( $contact_info['instagram'] ); ?>" class="ui basic icon button" target="_blank"><i class="instagram grey icon"></i></a>
140 + <?php endif; ?>
141 + <?php if ( isset( $contact_info['linkedin'] ) && '' !== $contact_info['linkedin'] ) : ?>
142 + <a href="<?php echo esc_url( $contact_info['linkedin'] ); ?>" class="ui basic icon button" target="_blank"><i class="linkedin grey icon"></i></a>
143 + <?php endif; ?>
144 + </div>
145 + </div>
146 + <?php endif; ?>
162 147 <?php
148 + /**
149 + * Action: mainwp_clients_overview_contact_widget_bottom
150 + *
151 + * Fires at the bottom of the Site Info widget on the Individual site overview page.
152 + *
153 + * @param object $contact_info Object containing the child site info.
154 + *
155 + * @since 4.0
156 + */
157 + do_action( 'mainwp_clients_overview_contact_widget_bottom', $contact_info );
158 + ?>
159 + </div>
160 + <?php
163 161 }
164 162 }