PluginProbe
WP Coder – Insert & Manage Code Snippets / trunk
WP Coder – Insert & Manage Code Snippets vtrunk
4.5.1 1.1 2.3.1 2.3.2 2.4.1 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1 3.1.1 3.2 3.2.1 3.3 3.4 3.5 3.5.1 All 39 releases
wp-coder / classes / Snippets / pages / comments.php

comments.php in WP Coder – Insert & Manage Code Snippets trunk, at classes/Snippets/pages/comments.php

73 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 defined( 'ABSPATH' ) || exit;
4
5 ?>
6
7 <div class="wowp-snippets__header">
8 <h3 class="wowp-snippets__header-title">Comments & Feedback</h3>
9 <p class="wowp-snippets__header-description">Manage comments and user interaction.</p>
10 </div>
11
12 <?php
13
14 $snippets = [
15 'disable_comments' => [
16 'Disable Comments',
17 'Turn off comments site-wide, both frontend and admin.',
18 ],
19 'disable_comment_from_website_url' => [
20 'Disable Comment Form Website URL',
21 'Remove the URL field from the comment form.',
22 ],
23
24 'disable_self_pingbacks' => [
25 'Disable Self Pingbacks',
26 'Prevent pingbacks from your own site.',
27 ],
28
29 'disable_trackbacks_pingbacks' => [
30 'Disable Trackbacks & Pingbacks',
31 'Turn off trackbacks and pingbacks for all future posts.',
32 ],
33
34 'disable_comments_html' => [
35 'Disable HTML in Comments',
36 'Prevent HTML tags in comments.',
37 ],
38
39 ];
40
41 self::create_options( $snippets ); ?>
42
43 <div class="wowp-snippet__list">
44 <div class="wowp-snippet__item">
45 <div class="wowp-snippet__item-header">
46 <label for="enable_limit_comment_length">Limit Comment Length</label>
47 <p class="wowp-snippet__item-description">Limit the maximum number of characters in comments.</p>
48 </div>
49 <div class="wowp-field has-checkbox">
50 <label class="switch">
51 <?php self::field( 'checkbox', 'enable_limit_comment_length' ); ?>
52 <span class="slider"></span>
53 </label>
54 </div>
55 <div class="wowp-snippet__item-expand is-hidden">
56 <div class="wowp-fields__group">
57 <div class="wowp-field">
58 <label><span class="label">Max characters</span>
59 <?php self::field( 'number', 'limit_comment_length', '', '300' ); ?>
60 </label>
61 </div>
62 <div class="wowp-field">
63 <label><span class="label">Message</span>
64 <?php self::field( 'text', 'limit_comment_mess', '', 'Your comment is too long. Max 300 characters.' ); ?>
65 </label>
66 </div>
67 </div>
68 </div>
69 </div>
70
71 </div>
72 <?php
73