Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions includes/gutenberg/feedzy-rss-feeds-gutenberg-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ public function feedzy_register_rest_route() {
'methods' => 'POST',
'callback' => array( $this, 'feedzy_rest_route' ),
'permission_callback' => function () {
return is_user_logged_in();
return current_user_can( 'manage_options' );
},
'args' => array(
'url' => array(
Expand Down Expand Up @@ -398,12 +398,12 @@ public function feedzy_rest_route( $data ) {
*/
public function feedzy_sanitize_feeds( $input ) {
if ( count( $input ) === 1 ) {
$feed = esc_url( $input[0] );
$feed = wp_http_validate_url( $input[0] );
return $feed;
} else {
$feeds = array();
foreach ( $input as $item ) {
$feeds[] = esc_url( $item );
$feeds[] = wp_http_validate_url( $item );
}
return $feeds;
}
Expand Down
Loading