File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 44Plugin Name: Quick Weblog
55Plugin URI: https://github.com/FeXd/wordpress-plugin-quick-weblog
66Description: Quickly create a simple Post that highlights an existing news article.
7- Version: 0.0.2
7+ Version: 0.0.3
88Author: Arlin Schaffel
99Author URI: https://github.com/FeXd
1010License: MIT
@@ -176,6 +176,7 @@ function quick_weblog_submit_form()
176176 $ url = esc_url_raw ($ _POST ['url ' ]);
177177 $ category = intval ($ _POST ['category ' ]);
178178 $ tags = sanitize_text_field ($ _POST ['tags ' ]);
179+ $ post_date = sanitize_text_field ($ _POST ['post_date ' ]);
179180
180181 // Create block content
181182 $ image_block = '<!-- wp:image {"url":" ' . esc_attr ($ image_url ) . '","alt":" ' . esc_attr ($ image_description ) . '"} --> ' .
@@ -198,7 +199,8 @@ function quick_weblog_submit_form()
198199 'post_content ' => $ block_content ,
199200 'post_category ' => array ($ category ),
200201 'tags_input ' => $ tags ,
201- 'post_status ' => 'publish '
202+ 'post_status ' => 'publish ' ,
203+ 'post_date ' => $ post_date
202204 );
203205 $ post_id = wp_insert_post ($ post_data );
204206
You can’t perform that action at this time.
0 commit comments