plugin_info example

array( 'status' => 500 )
                );
            }

            return new WP_Error(
                'unable_to_connect_to_filesystem',
                __( 'Unable to connect to the filesystem. Please confirm your credentials.' ),
                array( 'status' => 500 )
            );
        }

        $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' );

            
$this->plugin_network_active = is_plugin_active_for_network( $this->plugin );

        parent::__construct( $args );
    }

    /** * Performs an action following a single plugin update. * * @since 2.8.0 */
    public function after() {
        $this->plugin = $this->upgrader->plugin_info();
        if ( ! empty( $this->plugin ) && ! is_wp_error( $this->result ) && $this->plugin_active ) {
            // Currently used only when JS is off for a single plugin update?             printf(
                '<iframe title="%s" style="border:0;overflow:hidden" width="100%%" height="170" src="%s"></iframe>',
                esc_attr__( 'Update progress' ),
                wp_nonce_url( 'update.php?action=activate-plugin&networkwide=' . $this->plugin_network_active . '&plugin=' . urlencode( $this->plugin ), 'activate-plugin_' . $this->plugin )
            );
        }

        $this->decrement_update_count( 'plugin' );

        
/** * Performs an action following a plugin install. * * @since 2.8.0 */
    public function after() {
        // Check if the plugin can be overwritten and output the HTML.         if ( $this->do_overwrite() ) {
            return;
        }

        $plugin_file = $this->upgrader->plugin_info();

        $install_actions = array();

        $from = isset( $_GET['from'] ) ? wp_unslash( $_GET['from'] ) : 'plugins';

        if ( 'import' === $from ) {
            $install_actions['activate_plugin'] = sprintf(
                '<a class="button button-primary" href="%s" target="_parent">%s</a>',
                wp_nonce_url( 'plugins.php?action=activate&amp;from=import&amp;plugin=' . urlencode( $plugin_file ), 'activate-plugin_' . $plugin_file ),
                __( 'Activate Plugin &amp; Run Importer' )
            );
        }
Home | Imprint | This part of the site doesn't use cookies.