plugin_status_permission_check example

$file = $upgrader->plugin_info();

        if ( ! $file ) {
            return new WP_Error(
                'unable_to_determine_installed_plugin',
                __( 'Unable to determine what plugin was installed.' ),
                array( 'status' => 500 )
            );
        }

        if ( 'inactive' !== $request['status'] ) {
            $can_change_status = $this->plugin_status_permission_check( $file$request['status'], 'inactive' );

            if ( is_wp_error( $can_change_status ) ) {
                return $can_change_status;
            }

            $changed_status = $this->handle_plugin_status( $file$request['status'], 'inactive' );

            if ( is_wp_error( $changed_status ) ) {
                return $changed_status;
            }
        }

        
Home | Imprint | This part of the site doesn't use cookies.