sg = $sitemap_builder; $this->index_now = $index_now; } /** * Constructor function. * * @param string $id s . * @param string $title . */ private function html_print_box_header( $id, $title ) { ?>
Please log in as admin
'; return; } echo "This is the debug mode of the XML Sitemap Generator. It will show all PHP notices and warnings as well as the internal logs, messages and configuration.
'; echo "DO NOT POST THIS INFORMATION ON PUBLIC PAGES LIKE SUPPORT FORUMS AS IT MAY CONTAIN PASSWORDS OR SECRET SERVER INFORMATION!
"; echo 'WordPress ' . esc_html( $GLOBALS['wp_version'] ) . ' with DB ' . esc_html( $GLOBALS['wp_db_version'] ) . ' on PHP ' . esc_html( phpversion() ) . '
'; echo 'Plugin version: ' . esc_html( $this->sg->get_version() ) . ' (' . esc_html( $this->sg->get_svn_version() ) . ')'; echo '
';
$sc = $_SERVER;
$this->sg->get_svn_version();
unset( $sc['HTTP_COOKIE'] );
foreach ( $sc as $key => $value ) {
echo esc_html( ' [ ' . $key . ' ] => ' . $value );
echo '
';
}
echo '';
echo '';
$opts = array();
if ( function_exists( 'wp_load_alloptions' ) ) {
$opts = wp_load_alloptions();
} else {
// @var $wpdb wpdb .
global $wpdb;
$os = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options" ); // db call ok; no-cache ok.
foreach ( (array) $os as $o ) {
$opts[ $o->option_name ] = $o->option_value;
}
}
$popts = array();
foreach ( $opts as $k => $v ) {
// Try to filter out passwords etc...
if ( preg_match( '/pass|login|pw|secret|user|usr|key|auth|token/si', $k ) ) {
continue;
}
$popts[ $k ] = htmlspecialchars( $v );
}
foreach ( $popts as $key => $value ) {
echo esc_html( ' [ ' . $key . ' ] => ' . $value );
echo '
';
}
echo '';
echo ''; self::array_map_r( 'strip_tags', $this->sg->get_options() ); echo ''; echo '
'; // phpcs:disable. var_dump( $GLOBALS['wpdb']->queries ); // phpcs:enable echo ''; $total = 0; foreach ( $GLOBALS['wpdb']->queries as $q ) { $total += $q[1]; } echo '
' . count( $GLOBALS['wpdb']->queries ) . ' queries in ' . esc_html( round( $total, 2 ) ) . ' seconds.'; } else { echo '
Please edit wp-db.inc.php in wp-includes and set SAVEQUERIES to true if you want to see the queries.
'; } echo ''; echo ''; echo ""; echo "
DO NOT POST THIS INFORMATION ON PUBLIC PAGES LIKE SUPPORT FORUMS AS IT MAY CONTAIN PASSWORDS OR SECRET SERVER INFORMATION!
"; echo 'Please log in as admin
'; return; } if ( ! $this->sg->delete_old_files() ) { $message = __( 'The old files could NOT be deleted. Please use an FTP program and delete them by yourself.', 'google-sitemap-generator' ); } else { $message = __( 'The old files were successfully deleted.', 'google-sitemap-generator' ); } } elseif ( ! empty( $_GET['sm_ping_all'] ) ) { check_admin_referer( 'sitemap' ); // Check again, just for the case that something went wrong before. if ( ! current_user_can( 'administrator' ) ) { echo 'Please log in as admin
'; return; } ?> ' . esc_html( __( 'Notify Search Engines about all sitemaps', 'google-sitemap-generator' ) ) . ''; echo '' . esc_html( __( 'The plugin is notifying the selected search engines about your main sitemap and all sub-sitemaps. This might take a minute or two.', 'google-sitemap-generator' ) ) . '
'; flush(); $results = $this->sg->send_ping_all(); echo '' . esc_html( __( 'All done!', 'google-sitemap-generator' ) ) . '
'; ?> Please log in as admin'; return; } $this->sg->send_ping(); $message = __( 'Ping was executed, please see below for the result.', 'google-sitemap-generator' ); } elseif ( ! empty( $_GET['sm_ping_all_subsitemaps'] ) ) { check_admin_referer( 'sitemap' ); // Check again, just for the case that something went wrong before. if ( ! current_user_can( 'administrator' ) ) { echo 'Please log in as admin
'; return; } $this->sg->send_ping_all(); $message = __( 'Ping was executed, please see below for the result.', 'google-sitemap-generator' ); } elseif ( get_option( 'sm_beta_opt_in' ) ) { delete_option( 'sm_beta_opt_in' ); $message = __( 'Thanks for for supporting the project. We will reach out by email shortly.', 'google-sitemap-generator' ); } // Print out the message to the user, if any. if ( '' !== $message ) { ?>array(), 'p' => array(), 'strong' => array(), ); echo wp_kses( $message, $arr ); ?>
array(), 'p' => array(), 'a' => array( 'href' => array(), ), 'strong' => array(), ); /* translators: %s: search term */ echo wp_kses( str_replace( array( '%1$s', '%2$s' ), $this->sg->get_redirect_link( 'redir/sitemap-works-note' ), __( 'Thanks for using this plugin! You\'ve installed this plugin some time ago. If it works and your are satisfied, why not rate it. and recommend it to others? :-)', 'google-sitemap-generator' ) ), $arr ); ?> ' style='float:right; display:block; border:none;'>