PluginProbe
Wp-Insert / trunk
Wp-Insert vtrunk
trunk 1.0 1.1 1.2 1.2.1 1.2.2 1.3.0 1.3.1 1.3.3 1.4 1.5.0 1.5.1 1.5.2 1.5.3 1.6.0 1.6.1 1.6.2 1.7 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 2.0 All 63 releases
wp-insert / includes / modules / core / units / notes.php

notes.php in Wp-Insert trunk, at includes/modules/core/units/notes.php

56 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 function wp_insert_form_accordion_tabs_notes( $control, $identifier, $location ) {
3 echo '<h3>Notes</h3>';
4 echo '<div>';
5
6 $title = $identifier;
7 if ( ! isset( $control->values['title'] ) || ( $control->values['title'] == '' ) ) {
8 switch ( $identifier ) {
9 case 'above':
10 $title = 'Above Post Content';
11 break;
12 case 'middle':
13 $title = 'Middle of Post Content';
14 break;
15 case 'below':
16 $title = 'Below Post Content';
17 break;
18 case 'left':
19 $title = 'To the Left of Post Content';
20 break;
21 case 'right':
22 $title = 'To the Right of Post Content';
23 break;
24 default:
25 $title = $identifier;
26 break;
27 }
28 } else {
29 $title = $control->values['title'];
30 }
31 $control->add_control(
32 [
33 'type' => 'text',
34 'optionName' => 'title',
35 'helpText' => 'The title is used to identify your Ad Widget easily in future. A Random Title will be assigned to your Ad widget by default.',
36 'value' => $title,
37 ]
38 );
39 $control->create_section( 'Title' );
40 wp_insert_echo_html( $control->HTML );
41 $control->clear_controls();
42
43 $control->add_control(
44 [
45 'type' => 'textarea',
46 'optionName' => 'notes',
47 'style' => 'height: 220px;',
48 ]
49 );
50 $control->create_section( 'Notes' );
51 wp_insert_echo_html( $control->HTML );
52 $control->clear_controls();
53 echo '</div>';
54 return $control;
55 }
56