Changes from feedzy-rss-feeds/tags/4.4.2/includes/admin/feedzy-rss-feeds-admin.php at r3030538 to feedzy-rss-feeds/tags/4.4.3/includes/admin/feedzy-rss-feeds-admin.php at r3033749
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
feedzy-rss-feeds/tags/4.4.3/includes/admin/feedzy-rss-feeds-admin.php
r3030538 r3033749 267 267 'title', 268 268 ); 269 $capability = feedzy_current_user_can();270 269 $args = array( 271 270 'labels' => $labels, … … 284 283 'map_meta_cap' => true, 285 284 'capabilities' => array( 286 'publish_posts' => $capability, 287 'edit_posts' => $capability, 288 'edit_others_posts' => $capability, 289 'delete_posts' => $capability, 290 'delete_others_posts' => $capability, 291 'read_private_posts' => $capability, 285 'edit_post' => 'edit_feedzy_category', 286 'read_post' => 'read_feedzy_category', 287 'delete_post' => 'delete_feedzy_category', 288 'edit_posts' => 'edit_feedzy_categories', 289 'edit_others_posts' => 'edit_others_feedzy_categories', 290 'publish_posts' => 'publish_feedzy_categories', 291 'read_private_posts' => 'read_private_feedzy_categories', 292 292 ), 293 293 ); 294 294 $args = apply_filters( 'feedzy_post_type_args', $args ); 295 295 register_post_type( 'feedzy_categories', $args ); 296 } 297 298 /** 299 * Only allow admin to modify or delete categories. 300 * 301 * @return void 302 */ 303 public function register_admin_capabilities() { 304 $admin_role = get_role( 'administrator' ); 305 $admin_role->add_cap( 'edit_feedzy_category' ); 306 $admin_role->add_cap( 'read_feedzy_category' ); 307 $admin_role->add_cap( 'delete_feedzy_category' ); 308 $admin_role->add_cap( 'edit_feedzy_categories' ); 309 $admin_role->add_cap( 'edit_others_feedzy_categories' ); 310 $admin_role->add_cap( 'publish_feedzy_categories' ); 311 $admin_role->add_cap( 'read_private_feedzy_categories' ); 296 312 } 297 313 … … 877 893 switch ( $post->post_type ) { 878 894 case 'feedzy_categories': 879 $text = __( 'We found the following invalid URLs that we have removed from the list', 'feedzy-rss-feeds' );895 $text = __( 'We found the following invalid or unreachable by WordPress SimplePie URLs that we have removed from the list', 'feedzy-rss-feeds' ); 880 896 $invalid = get_post_meta( $post->ID, '__transient_feedzy_category_feed', true ); 881 897 delete_post_meta( $post->ID, '__transient_feedzy_category_feed' ); … … 886 902 $invalid_source_errors = get_post_meta( $post->ID, '__transient_feedzy_invalid_source_errors', true ); 887 903 if ( $invalid_source ) { 888 $text = __( 'This source has invalid URLs. Please correct/remove the following', 'feedzy-rss-feeds' );904 $text = __( 'This source has invalid or unreachable by WordPress SimplePie URLs. Please correct/remove the following', 'feedzy-rss-feeds' ); 889 905 $invalid = $invalid_source; 890 906 delete_post_meta( $post->ID, '__transient_feedzy_invalid_source' ); … … 1081 1097 */ 1082 1098 public function feedzy_wizard_step_process() { 1099 if ( ! feedzy_current_user_can() ) { 1100 return wp_send_json( array( 'status' => 0 ) ); 1101 } 1102 1083 1103 check_ajax_referer( FEEDZY_BASEFILE, 'security' ); 1084 1104 $step = ! empty( $_POST['step'] ) ? filter_input( INPUT_POST, 'step', FILTER_UNSAFE_RAW ) : 1;
Note: See TracChangeset
for help on using the changeset viewer.