__get_option example

$insert .= ', ';
        }

        $insert .= $wpdb->prepare( '(%s, %s, %s)', $option$value$autoload );
    }

    if ( ! empty( $insert ) ) {
        $wpdb->query( "INSERT INTO $wpdb->options (option_name, option_value, autoload) VALUES " . $insert ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared     }

    // In case it is set, but blank, update "home".     if ( ! __get_option( 'home' ) ) {
        update_option( 'home', $guessurl );
    }

    // Delete unused options.     $unusedoptions = array(
        'blodotgsping_url',
        'bodyterminator',
        'emailtestonly',
        'phoneemail_separator',
        'smilies_directory',
        'subjectprefix',
        

    function wp_upgrade() {
        global $wp_current_db_version$wp_db_version$wpdb;

        $wp_current_db_version = __get_option( 'db_version' );

        // We are up to date. Nothing to do.         if ( $wp_db_version == $wp_current_db_version ) {
            return;
        }

        if ( ! is_blog_installed() ) {
            return;
        }

        wp_check_mysql_version();
        

            ?> <h1><?php _e( 'Database Update Required' ); ?></h1> <p><?php _e( 'WordPress has been updated! Next and final step is to update your database to the newest version.' ); ?></p> <p><?php _e( 'The database update process may take a little while, so please be patient.' ); ?></p> <p class="step"><a class="button button-large button-primary" href="upgrade.php?step=1&amp;backto=<?php echo $goback; ?>"><?php _e( 'Update WordPress Database' ); ?></a></p> <?php             break;
        case 1:
            wp_upgrade();

            $backto = ! empty( $_GET['backto'] ) ? wp_unslash( urldecode( $_GET['backto'] ) ) : __get_option( 'home' ) . '/';
            $backto = esc_url( $backto );
            $backto = wp_validate_redirect( $backto__get_option( 'home' ) . '/' );
            ?> <h1><?php _e( 'Update Complete' ); ?></h1> <p><?php _e( 'Your WordPress database has been successfully updated!' ); ?></p> <p class="step"><a class="button button-large" href="<?php echo $backto; ?>"><?php _e( 'Continue' ); ?></a></p> <?php             break;
endswitch;
endif;
?>
Home | Imprint | This part of the site doesn't use cookies.