File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -285,7 +285,7 @@ public function feedzy_register_rest_route() {
285285 'methods ' => 'POST ' ,
286286 'callback ' => array ( $ this , 'feedzy_rest_route ' ),
287287 'permission_callback ' => function () {
288- return is_user_logged_in ( );
288+ return current_user_can ( ' manage_options ' );
289289 },
290290 'args ' => array (
291291 'url ' => array (
@@ -398,12 +398,12 @@ public function feedzy_rest_route( $data ) {
398398 */
399399 public function feedzy_sanitize_feeds ( $ input ) {
400400 if ( count ( $ input ) === 1 ) {
401- $ feed = esc_url ( $ input [0 ] );
401+ $ feed = wp_http_validate_url ( $ input [0 ] );
402402 return $ feed ;
403403 } else {
404404 $ feeds = array ();
405405 foreach ( $ input as $ item ) {
406- $ feeds [] = esc_url ( $ item );
406+ $ feeds [] = wp_http_validate_url ( $ item );
407407 }
408408 return $ feeds ;
409409 }
You can’t perform that action at this time.
0 commit comments