PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 2.1.3
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v2.1.3
4.9.1 4.9.0 4.8.2 4.8.1 4.8.0 4.7.0 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 4.5.1 4.5.0 4.4.1 4.4.0 3.3.4 3.4.0 3.4.1 3.4.2 3.5.0 3.5.1 3.5.2 All 199 releases
betterdocs / admin / partials / betterdocs-field-display.php

betterdocs-field-display.php in BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot 2.1.3, at admin/partials/betterdocs-field-display.php

72 lines 3.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 $opt_alert_class = '';
3 if( isset( $field['disable'] ) && $field['disable'] === true ) {
4 $opt_alert_class = 'betterdocs-opt-alert';
5 }
6 ?>
7 <tr data-id="<?php echo $key; ?>" id="<?php echo esc_attr( $id ); ?>" class="betterdocs-field <?php echo $row_class.' type-'.$field['type']; ?>">
8 <?php if( $field['type'] == 'title' && !empty( $field['label'] )) : ?>
9 <th colspan="2" class="betterdocs-control betterdocs-title"><h3><?php esc_html_e( $field['label'], 'betterdocs' ); ?></h3></th>
10 <?php elseif( $field['type'] == 'card' && !empty( $field['label'] )) : ?>
11 <td class="betterdocs-control betterdocs-card"><a href="<?php echo esc_url($field['url']) ?>"><div class="betterdocs-card-content"><img src="<?php echo BETTERDOCS_ADMIN_URL; ?>/assets/img/betterdocs-customize.svg" alt="betterdocs-documentation"><p><?php _e('Design your templates and pages with live customizer.', 'betterdocs'); ?></p><p class="betterdocs-customize-button"><?php esc_html_e( $field['label'], 'betterdocs' ); ?></p></div></a></td>
12 <?php else: ?>
13 <?php if( empty( $field['label'] ) ) : ?>
14 <td class="betterdocs-control" colspan="2">
15 <?php else : ?>
16 <th class="betterdocs-label">
17 <label for="<?php echo esc_attr( $name ); ?>">
18 <?php
19 esc_html_e( $field['label'], 'betterdocs' );
20 if( isset( $field['disable'] ) && $field['disable'] === true ) {
21 echo '<sup class="pro-label">Pro</sup>';
22 }
23 ?>
24
25 </label>
26 </th>
27 <td class="betterdocs-control">
28 <?php
29 endif;
30 do_action( 'betterdocs_field_before_wrapper', $name, $value, $field, $post_id );
31
32 ?>
33 <div class="betterdocs-control-wrapper <?php echo $opt_alert_class; ?>">
34 <?php
35 if( $file_name ) {
36 $file = BETTERDOCS_ADMIN_DIR_PATH . 'includes/fields/betterdocs-'. $file_name .'.php';
37 if( file_exists( $file ) ) {
38 include $file;
39 }
40 }
41
42 if( isset( $field['view'] ) && ! empty( $field['view'] ) ) {
43 $args = array();
44 /* if( isset( $field['default'] ) ) {
45 $args['default'] = $field['default'];
46 }
47 if( isset( $field['options'] ) ) {
48 $args['options'] = $field['options'];
49 }
50 if( ! empty( $value ) ) {
51 $args['value'] = $value;
52 } */
53 call_user_func_array( $field['view'], $args );
54 }
55
56 if( isset( $field['description'] ) && ! empty( $field['description'] ) ) :
57 ?>
58 <p class="betterdocs-field-description"><?php _e( $field['description'], 'betterdocs' ); ?></p>
59 <?php
60 endif;
61 if( isset( $field['help'] ) && ! empty( $field['help'] ) ) :
62 ?>
63 <p class="betterdocs-field-help"><?php _e( $field['help'], 'betterdocs' ); ?></p>
64 <?php
65 endif;
66 ?>
67 </div>
68 <?php do_action( 'betterdocs_field_after_wrapper', $name, $value, $field, $post_id ); ?>
69 </td>
70 <?php endif; ?>
71 </tr>
72