PluginProbe
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages / 3.4.3
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages v3.4.3
3.4.3 3.4.2 3.4.1 3.4.0 3.3.9 3.3.8 3.3.7 3.3.6 3.3.5 3.3.4 3.3.3 3.3.2 3.3.1 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 2.3.0 2.3.1 All 196 releases
← All changes | includes/class-convertkit-broadcasts-exporter.php +7 -2 3.3.23.4.3 View file →
@@ -108,12 +108,17 @@
108 108 if ( $action !== $this->action_name ) {
109 109 return;
110 110 }
111 111
112 + // Bail if the current user cannot edit the Post being exported.
113 + if ( ! current_user_can( 'edit_post', $post_id ) ) {
114 + wp_die( esc_html__( 'Sorry, you are not allowed to export this Post.', 'convertkit' ) );
115 + }
116 +
112 117 // Export Post to a draft ConvertKit Broadcast.
113 118 $result = $this->export_post_to_broadcast( $post_id );
114 119
115 - // If an error occured, display an error message.
120 + // If an error occurred, display an error message.
116 121 if ( is_wp_error( $result ) ) {
117 122 wp_die( esc_html( $result->get_error_message() ) );
118 123 }
119 124
@@ -236,9 +241,9 @@
236 241 $content,
237 242 $post->post_excerpt
238 243 );
239 244
240 - // If an error occured, return it now.
245 + // If an error occurred, return it now.
241 246 if ( is_wp_error( $result ) ) {
242 247 return $result;
243 248 }
244 249