Version Description
- FIX: Stop plugin CSS from loading on other admin pages.
Download this release
Release Info
Developer | sethta |
Plugin | No Page Comment |
Version | 1.0.2 |
Comparing to | |
See all releases |
Code changes from version 1.0 to 1.0.2
- no-page-comment-settings.php +1 -1
- no-page-comment.css +14 -14
- no-page-comment.php +8 -5
- readme.txt +6 -0
no-page-comment-settings.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
|
2 |
-
<form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>" class="wrap">
|
3 |
|
4 |
<?php
|
5 |
// Prints out the admin settings page
|
1 |
|
2 |
+
<form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>" class="wrap npc-settings">
|
3 |
|
4 |
<?php
|
5 |
// Prints out the admin settings page
|
no-page-comment.css
CHANGED
@@ -1,28 +1,28 @@
|
|
1 |
-
.inside > div {
|
2 |
padding: 10px 0 0;
|
3 |
float: left;
|
4 |
width: 100%;
|
5 |
}
|
6 |
-
.inside .post-type {
|
7 |
width: 20%;
|
8 |
min-width: 120px;
|
9 |
margin-bottom: 10px;
|
10 |
float: left;
|
11 |
}
|
12 |
-
.inner {
|
13 |
float: left;
|
14 |
width: 80%;
|
15 |
}
|
16 |
-
.inner > div {
|
17 |
float: left;
|
18 |
width: 50%;
|
19 |
}
|
20 |
-
.inner label {
|
21 |
padding-right: 50px;
|
22 |
margin-bottom: 10px;
|
23 |
float:left;
|
24 |
}
|
25 |
-
.buttons input {
|
26 |
margin:0 1% 5px !important;
|
27 |
float:left;
|
28 |
width: 47%;
|
@@ -30,43 +30,43 @@
|
|
30 |
}
|
31 |
|
32 |
@media (max-width: 1200px) {
|
33 |
-
.inside .post-type {
|
34 |
width: 30%;
|
35 |
}
|
36 |
-
.inner {
|
37 |
width: 70%;
|
38 |
}
|
39 |
.buttons .post-type {
|
40 |
min-width: 200px;
|
41 |
}
|
42 |
-
.buttons .inner {
|
43 |
width: 100%;
|
44 |
}
|
45 |
}
|
46 |
|
47 |
@media (max-width: 1152px) {
|
48 |
-
.buttons input {
|
49 |
margin:0 1% 5px !important;
|
50 |
width: 97%;
|
51 |
}
|
52 |
}
|
53 |
|
54 |
@media (max-width: 600px) {
|
55 |
-
.buttons input {
|
56 |
margin:0 1% 5px !important;
|
57 |
width: 97%;
|
58 |
}
|
59 |
}
|
60 |
|
61 |
@media (max-width: 380px) {
|
62 |
-
.inside .post-type {
|
63 |
min-width: 200px;
|
64 |
}
|
65 |
-
.inner > div {
|
66 |
width: 100%;
|
67 |
margin-bottom: 5px;
|
68 |
}
|
69 |
-
.buttons input {
|
70 |
margin:0 0 5px !important;
|
71 |
width: 100%;
|
72 |
}
|
1 |
+
.npc-settings .inside > div {
|
2 |
padding: 10px 0 0;
|
3 |
float: left;
|
4 |
width: 100%;
|
5 |
}
|
6 |
+
.npc-settings .inside .post-type {
|
7 |
width: 20%;
|
8 |
min-width: 120px;
|
9 |
margin-bottom: 10px;
|
10 |
float: left;
|
11 |
}
|
12 |
+
.npc-settings .inner {
|
13 |
float: left;
|
14 |
width: 80%;
|
15 |
}
|
16 |
+
.npc-settings .inner > div {
|
17 |
float: left;
|
18 |
width: 50%;
|
19 |
}
|
20 |
+
.npc-settings .inner label {
|
21 |
padding-right: 50px;
|
22 |
margin-bottom: 10px;
|
23 |
float:left;
|
24 |
}
|
25 |
+
.npc-settings .buttons input {
|
26 |
margin:0 1% 5px !important;
|
27 |
float:left;
|
28 |
width: 47%;
|
30 |
}
|
31 |
|
32 |
@media (max-width: 1200px) {
|
33 |
+
.npc-settings .inside .post-type {
|
34 |
width: 30%;
|
35 |
}
|
36 |
+
.npc-settings .inner {
|
37 |
width: 70%;
|
38 |
}
|
39 |
.buttons .post-type {
|
40 |
min-width: 200px;
|
41 |
}
|
42 |
+
.npc-settings .buttons .inner {
|
43 |
width: 100%;
|
44 |
}
|
45 |
}
|
46 |
|
47 |
@media (max-width: 1152px) {
|
48 |
+
.npc-settings .buttons input {
|
49 |
margin:0 1% 5px !important;
|
50 |
width: 97%;
|
51 |
}
|
52 |
}
|
53 |
|
54 |
@media (max-width: 600px) {
|
55 |
+
.npc-settings .buttons input {
|
56 |
margin:0 1% 5px !important;
|
57 |
width: 97%;
|
58 |
}
|
59 |
}
|
60 |
|
61 |
@media (max-width: 380px) {
|
62 |
+
.npc-settings .inside .post-type {
|
63 |
min-width: 200px;
|
64 |
}
|
65 |
+
.npc-settings .inner > div {
|
66 |
width: 100%;
|
67 |
margin-bottom: 5px;
|
68 |
}
|
69 |
+
.npc-settings .buttons input {
|
70 |
margin:0 0 5px !important;
|
71 |
width: 100%;
|
72 |
}
|
no-page-comment.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: No Page Comment
|
4 |
Plugin URI: http://sethalling.com/plugins/no-page-comment
|
5 |
Description: A plugin that uses javascript to disable comments by default on posts, pages and/or custom post types but leave them enabled on others, while still giving you the ability to individually set them on a page or post basis.
|
6 |
-
Version: 1.0
|
7 |
Author: Seth Alling
|
8 |
Author URI: http://sethalling.com/
|
9 |
|
@@ -64,7 +64,7 @@ if ( ! function_exists( 'sta_npc_load' ) ) {
|
|
64 |
'revision',
|
65 |
'nav_menu_item',
|
66 |
);
|
67 |
-
public $plugin_ver = '1.0';
|
68 |
|
69 |
// Plugin Constructor
|
70 |
function sta_npc_plugin() {
|
@@ -113,9 +113,11 @@ if ( ! function_exists( 'sta_npc_load' ) ) {
|
|
113 |
}
|
114 |
|
115 |
// Add stylesheet to admin page
|
116 |
-
function sta_npc_admin_styles() {
|
117 |
-
|
118 |
-
|
|
|
|
|
119 |
}
|
120 |
|
121 |
// Add settings link to plugins page
|
@@ -149,6 +151,7 @@ if ( ! function_exists( 'sta_npc_load' ) ) {
|
|
149 |
jQuery('label[for="default_comment_status"]').prev('br').remove();
|
150 |
jQuery('label[for="default_comment_status"]').next('br').remove();
|
151 |
jQuery('label[for="default_comment_status"]').next('p').html('<?php echo $settings_link; ?>');
|
|
|
152 |
jQuery('label[for="default_comment_status"]').remove();
|
153 |
});
|
154 |
</script>
|
3 |
Plugin Name: No Page Comment
|
4 |
Plugin URI: http://sethalling.com/plugins/no-page-comment
|
5 |
Description: A plugin that uses javascript to disable comments by default on posts, pages and/or custom post types but leave them enabled on others, while still giving you the ability to individually set them on a page or post basis.
|
6 |
+
Version: 1.0.2
|
7 |
Author: Seth Alling
|
8 |
Author URI: http://sethalling.com/
|
9 |
|
64 |
'revision',
|
65 |
'nav_menu_item',
|
66 |
);
|
67 |
+
public $plugin_ver = '1.0.1';
|
68 |
|
69 |
// Plugin Constructor
|
70 |
function sta_npc_plugin() {
|
113 |
}
|
114 |
|
115 |
// Add stylesheet to admin page
|
116 |
+
function sta_npc_admin_styles( $hook ) {
|
117 |
+
if ( $hook == 'settings_page_no-page-comment' ) {
|
118 |
+
wp_register_style( 'sta_npc', $this->plugin_dir . '/no-page-comment.css', false, $this->plugin_ver );
|
119 |
+
wp_enqueue_style( 'sta_npc' );
|
120 |
+
}
|
121 |
}
|
122 |
|
123 |
// Add settings link to plugins page
|
151 |
jQuery('label[for="default_comment_status"]').prev('br').remove();
|
152 |
jQuery('label[for="default_comment_status"]').next('br').remove();
|
153 |
jQuery('label[for="default_comment_status"]').next('p').html('<?php echo $settings_link; ?>');
|
154 |
+
jQuery('label[for="default_comment_status"]').next('small').html('<?php echo $settings_link; ?>');
|
155 |
jQuery('label[for="default_comment_status"]').remove();
|
156 |
});
|
157 |
</script>
|
readme.txt
CHANGED
@@ -77,6 +77,12 @@ Of course, although *it is highly recommended that you backup your blog's databa
|
|
77 |
|
78 |
== Changelog ==
|
79 |
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
= 1.0 =
|
81 |
* UPDATE: Rewrite plugin to decrease code bloat
|
82 |
* UPDATE: Remove javascript dependency by default for WordPress versions 3.4 and up
|
77 |
|
78 |
== Changelog ==
|
79 |
|
80 |
+
= 1.0.2 =
|
81 |
+
* FIX: Stop plugin CSS from loading on other admin pages.
|
82 |
+
|
83 |
+
= 1.0.1 =
|
84 |
+
* FIX: Added missing files from failed SVN commit.
|
85 |
+
|
86 |
= 1.0 =
|
87 |
* UPDATE: Rewrite plugin to decrease code bloat
|
88 |
* UPDATE: Remove javascript dependency by default for WordPress versions 3.4 and up
|