do_overwrite example



        return false;
    }

    /** * Performs an action following a single theme install. * * @since 2.8.0 */
    public function after() {
        if ( $this->do_overwrite() ) {
            return;
        }

        if ( empty( $this->upgrader->result['destination_name'] ) ) {
            return;
        }

        $theme_info = $this->upgrader->theme_info();
        if ( empty( $theme_info ) ) {
            return;
        }

        
return false;
    }

    /** * 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(
                
Home | Imprint | This part of the site doesn't use cookies.