| @@ -170,12 +170,12 @@ | ||
| 170 | 170 | |
| 171 | 171 | $cf_context = imagify_get_context( 'custom-folders' ); |
| 172 | 172 | |
| 173 | 173 | // Main item: bulk optimization (custom folders). |
| 174 | - add_menu_page( __( 'Bulk Optimization', 'imagify' ), 'Imagify', $cf_context->current_user_can( 'bulk-optimize' ), $this->get_bulk_page_slug(), [ $this, 'display_bulk_page' ] ); | |
| 174 | + add_menu_page( __( 'Bulk Optimization', 'imagify' ), 'Imagify', $cf_context->get_capacity( 'bulk-optimize' ), $this->get_bulk_page_slug(), [ $this, 'display_bulk_page' ] ); | |
| 175 | 175 | |
| 176 | 176 | // Sub-menu item: custom folders list. |
| 177 | - $screen_id = add_submenu_page( $this->get_bulk_page_slug(), __( 'Other Media optimized by Imagify', 'imagify' ), __( 'Other Media', 'imagify' ), $cf_context->current_user_can( 'bulk-optimize' ), $this->get_files_page_slug(), [ $this, 'display_files_list' ] ); | |
| 177 | + $screen_id = add_submenu_page( $this->get_bulk_page_slug(), __( 'Other Media optimized by Imagify', 'imagify' ), __( 'Other Media', 'imagify' ), $cf_context->get_capacity( 'bulk-optimize' ), $this->get_files_page_slug(), [ $this, 'display_files_list' ] ); | |
| 178 | 178 | |
| 179 | 179 | // Sub-menu item: settings. |
| 180 | 180 | add_submenu_page( $this->get_bulk_page_slug(), 'Imagify', __( 'Settings', 'imagify' ), $wp_context->get_capacity( 'manage' ), $this->get_settings_page_slug(), [ $this, 'display_settings_page' ] ); |
| 181 | 181 | |