2
2
3
3
/*
4
4
Plugin Name: Quick Weblog
5
- Plugin URI: https://fexd.com /wordpress/plugins/ quick-weblog
6
- Description: Create new weblog posts quickly and easily .
5
+ Plugin URI: https://fexd.github.io /wordpress-plugin- quick-weblog/
6
+ Description: Quickly create a simple Post that highlights an existing news article .
7
7
Version: 0.0.1
8
8
Author: Arlin Schaffel
9
- Author URI: https://fexd .com
10
- License: GPL2
11
- License URI: https://www.gnu.org/licenses/gpl-2.0.html
9
+ Author URI: https://github .com/FeXd
10
+ License: MIT
11
+ License URI: https://github.com/FeXd/wordpress-plugin-quick-weblog/blob/main/LICENSE.md
12
12
Text Domain: quick-weblog
13
- Domain Path: /languages/
14
13
*/
15
14
16
15
function quick_weblog_form () {
@@ -31,6 +30,9 @@ function quick_weblog_form() {
31
30
#quick-weblog div label {
32
31
font-weight: 600;
33
32
}
33
+ #quick-weblog-description {
34
+ max-width: 520px;
35
+ }
34
36
#quick-weblog div input,
35
37
#quick-weblog div textarea,
36
38
#quick-weblog div select {
@@ -43,6 +45,8 @@ function quick_weblog_form() {
43
45
}
44
46
</style>
45
47
48
+ <p id="quick-weblog-description">Quickly create a simple Post that highlights an existing news article. Posts include a captioned image and quote with URL citation of original article. All fields are required.</p>
49
+
46
50
<div class="card">
47
51
<form id="quick-weblog" method="post" action="<?php echo esc_url ( admin_url ('admin-post.php ' ) ); ?> ">
48
52
<div>
@@ -90,20 +94,15 @@ function quick_weblog_form() {
90
94
<?php
91
95
}
92
96
93
- function quick_weblog_add_form_to_page () {
94
- add_shortcode ( 'quick-weblog-form ' , 'quick_weblog_form ' );
95
- }
96
- add_action ( 'init ' , 'quick_weblog_add_form_to_page ' );
97
-
98
97
function quick_weblog_add_menu_page () {
99
98
add_menu_page (
100
99
__ ( 'Quick Weblog ' , 'quick-weblog ' ), // Page title
101
100
__ ( 'Quick Weblog ' , 'quick-weblog ' ), // Menu title
102
101
'manage_options ' , // Capability required to access the page
103
102
'quick-weblog ' , // Menu slug
104
103
'quick_weblog_menu_page ' , // Callback function to render the page
105
- 'dashicons-admin-post ' , // Icon
106
- 30 // Position in the menu
104
+ 'dashicons-welcome-write-blog ' , // Icon
105
+ 4.9021042 // Position in the menu
107
106
);
108
107
}
109
108
add_action ( 'admin_menu ' , 'quick_weblog_add_menu_page ' );
@@ -161,6 +160,7 @@ function quick_weblog_submit_form() {
161
160
wp_redirect ( get_permalink ( $ post_id ) );
162
161
exit ();
163
162
}
163
+
164
164
add_action ( 'admin_post_quick_weblog_submit_form ' , 'quick_weblog_submit_form ' );
165
165
166
166
?>
0 commit comments