PluginProbe
ERP: Complete HR, Accounting & CRM Suite Built for WooCommerce / 1.3.13
ERP: Complete HR, Accounting & CRM Suite Built for WooCommerce v1.3.13
1.17.9 1.17.8 1.17.7 1.17.6 1.17.5 1.17.4 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.3.0 1.3.1 1.3.11 1.3.12 1.3.13 1.3.14 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 All 143 releases
erp / includes / admin / functions.php

functions.php in ERP: Complete HR, Accounting & CRM Suite Built for WooCommerce 1.3.13, at includes/admin/functions.php

36 lines 1008 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Dashboard metabox
5 *
6 * @param string title of the metabox
7 * @param string|array function callback
8 *
9 * @return void
10 */
11 function erp_admin_dash_metabox( $title = '', $callback = null, $class = '' ) {
12 if ( is_array( $callback ) && isset( $callback[1] ) ) {
13 $metabox_callback = $callback[1];
14 } else {
15 $metabox_callback = $callback;
16 }
17
18 if ( is_string( $metabox_callback ) && apply_filters( 'erp_admin_dash_metabox_hide_' . $metabox_callback, false ) ) {
19 return;
20 }
21
22 $class_name = ! empty( $class ) ? ' ' . $class : '';
23 ?>
24 <div class="postbox<?php echo $class_name; ?>">
25 <h3 class="hndle"><span><?php echo $title; ?></span></h3>
26 <div class="inside">
27 <div class="main">
28 <?php if ( is_callable( $callback ) ) {
29 call_user_func( $callback );
30 } ?>
31 </div> <!-- .main -->
32 </div> <!-- .inside -->
33 </div> <!-- .postbox -->
34 <?php
35 }
36