Skip to content

Commit 2d24aa3

Browse files
Merge pull request #1 from victorandeloci/dev
get current user id for post author
2 parents 6401f85 + 000ed6d commit 2d24aa3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

one_wp_feed_rss_monitor.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
* Plugin Name: One WP Feed RSS Monitor
55
* Description: Monitor and auto-publish podcast episodes as wordpress posts
6-
* Version: 1.0.0
6+
* Version: 1.0.1
77
* Author: Victor Andeloci
88
* Author URI: https://github.com/victorandeloci
99
*/
@@ -142,7 +142,7 @@ function one_wp_feed_rss_monitor_create_podcast_post($episode) {
142142
'post_status' => 'publish',
143143
'post_type' => 'post',
144144
'post_date' => date('Y-m-d', strtotime($episode['pub_date'])),
145-
'post_author' => 1,
145+
'post_author' => (get_current_user_id() ?? 1),
146146
'meta_input' => array(
147147
'episode_link' => $episode['link'],
148148
'episode_mp3_url' => $episode['mp3_url'],

0 commit comments

Comments
 (0)