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 ) { ?>

sg->get_freq_names() as $k => $v ) { echo "'; } } /** * Echos option fields for an select field containing the valid priorities (0- 1.0) * * @since 4.0 * @param string $current_val string The value which should be selected. * @return void */ public static function html_get_priority_values( $current_val ) { $current_val = (float) $current_val; for ( $i = 0.0; $i <= 1.0; $i += 0.1 ) { $v = number_format( $i, 1, '.', '' ); echo "'; } } /** * Returns the checked attribute if the given values match * * @since 4.0 * @param string $val string The current value. * @param string $equals string The value to match. * @return string The checked attribute if the given values match, an empty string if not */ public static function html_get_checked( $val, $equals ) { $is_equals = $val === $equals; if ( $is_equals ) { return self::html_get_attribute( 'checked' ); } else { return ''; } } /** * Returns the selected attribute if the given values match * * @since 4.0 * @param string $val string The current value. * @param string $equals string The value to match. * @return string The selected attribute if the given values match, an empty string if not */ public static function html_get_selected( $val, $equals ) { if ( is_numeric( $val ) && is_numeric( $equals ) ) { $is_equals = ( round( $val * 10 ) === round( $equals * 10 ) ); } else { $is_equals = $val === $equals; } if ( $is_equals ) { return self::html_get_attribute( 'selected' ); } else { return ''; } } /** * Active Sitemap listing . */ public function active_plugins() { $plugins = get_plugins(); foreach ( $plugins as $key => $val ) { if ( 'WooCommerce' === $val['Name'] && is_plugin_active( $key ) ) { $this->has_woo_commerce = true; } } } /** * Returns an formatted attribute. If the value is NULL, the name will be used. * * @since 4.0 * @param string $attr string The attribute name. * @param string $value string The attribute value. * @return string The formatted attribute */ public static function html_get_attribute( $attr, $value = null ) { if ( null === $value ) { $value = $attr; } return ' ' . $attr . '=' . esc_attr( $value ) . ' '; } /** * Returns an array with GoogleSitemapGeneratorPage objects which is generated from POST values * * @since 4.0 * @see GoogleSitemapGeneratorPage * @return array An array with GoogleSitemapGeneratorPage objects */ public function html_apply_pages() { //phpcs:disable // $pages_ur = ( ( ! isset( $_POST['sm_pages_ur'] ) ) ) && ( ! isset( $_POST['sm_pages_ur'] ) || ! is_array( $_POST['sm_pages_ur'] ) ? array() : esc_url_raw( wp_unslash( $_POST['sm_pages_ur'] ) ) ); // Array with all priorities. $pages_ur = array(); $pages_pr = array(); $pages_cf = array(); $pages_lm = array(); $pages_ur = ( ! isset( $_POST['sm_pages_ur'] ) || ! is_array( $_POST['sm_pages_ur'] ) ) ? array() : array_map( 'sanitize_text_field', wp_unslash( $_POST['sm_pages_ur'] ) ); // if ( isset( $_POST['sm_pages_pr'] ) && wp_verify_nonce( array_map( 'sanitize_text_field', ( wp_unslash( $_POST['sm_pages_pr'] ) ) ) ) ) { $pages_pr = ( ! isset( $_POST['sm_pages_pr'] ) || ! is_array( $_POST['sm_pages_pr'] ) ? array() : array_map( 'sanitize_text_field', wp_unslash( $_POST['sm_pages_pr'] ) ) ); // } // if ( isset( $_POST['sm_pages_cf'] ) && wp_verify_nonce( array_map( 'sanitize_text_field', ( wp_unslash( $_POST['sm_pages_cf'] ) ) ) ) ) { $pages_cf = ( ! isset( $_POST['sm_pages_cf'] ) || ! is_array( $_POST['sm_pages_cf'] ) ? array() : array_map( 'sanitize_text_field', wp_unslash( $_POST['sm_pages_cf'] ) ) ); // } // if ( isset( $_POST['sm_pages_lm'] ) && wp_verify_nonce( array_map( 'sanitize_text_field', ( wp_unslash( $_POST['sm_pages_lm'] ) ) ) ) ) { $pages_lm = ( ! isset( $_POST['sm_pages_lm'] ) || ! is_array( $_POST['sm_pages_lm'] ) ? array() : array_map( 'sanitize_text_field', wp_unslash( $_POST['sm_pages_lm'] ) ) ); // } // Array where the new pages are stored. $pages = array(); // Loop through all defined pages and set their properties into an object. if ( isset( $_POST['sm_pages_mark'] ) && is_array( $_POST['sm_pages_mark'] ) ) { $len = count( $_POST['sm_pages_mark'] ); // phpcs:enable for ( $i = 0; $i < $len; $i++ ) { // Create new object. $p = new GoogleSitemapGeneratorPage(); if ( substr( $pages_ur[ $i ], 0, 4 ) === 'www.' ) { $pages_ur[ $i ] = 'http://' . $pages_ur[ $i ]; } $p->set_url( $pages_ur[ $i ] ); $p->set_priority( $pages_pr[ $i ] ); $p->set_change_freq( $pages_cf[ $i ] ); // Try to parse last modified, if -1 (note ===) automatic will be used (0). $lm = ( ! empty( $pages_lm[ $i ] ) ? strtotime( $pages_lm[ $i ], time() ) : -1 ); if ( -1 === $lm ) { $p->set_last_mod( 0 ); } else { $p->set_last_mod( $lm ); } // Add it to the array. array_push( $pages, $p ); } } return $pages; } public function get_max_input_vars() { $form_inputs = 40; $max_input_vars = ini_get('max_input_vars'); return $max_input_vars - $form_inputs - (count($this->sg->get_pages())*5); } /** * Escape. * * @param string $v String. */ public static function escape( $v ) { // prevent html tags in strings where they are not required. return strtr( $v, '<>', '..' ); } /** * Array_map_r. * * @param array $func . * @param array $arr . */ public static function array_map_r( $func, $arr ) { $new_arr = array(); foreach ( $arr as $key => $value ) { $new_arr[ $key ] = ( is_array( $value ) ? self::array_map_r( $func, $value ) : ( is_array( $func ) ? call_user_func_array( $func, $value ) : $func( $value ) ) ); } foreach ( $new_arr as $k => $v ) { echo esc_html( ' [ ' . $k . ' ] => ' . $v ); echo '
'; } } /** * Displays the option page * * @since 3.0 * @access public * @author Arne Brachhold */ public function html_show_options_page() { $this->active_plugins(); global $wp_version; $snl = false; // SNL. $this->sg->initate(); $message = ''; if ( ! empty( $_REQUEST['sm_rebuild'] ) ) { // Pressed Button: Rebuild Sitemap. check_admin_referer( 'sitemap' ); if ( isset( $_GET['sm_do_debug'] ) && 'true' === $_GET['sm_do_debug'] ) { // Check again, just for the case that something went wrong before. if ( ! current_user_can( 'administrator' ) || ! is_super_admin() ) { echo '

Please log in as admin

'; return; } echo "
"; echo '

' . esc_html( __( 'XML Sitemap Generator for Google', 'google-sitemap-generator' ) ) . ' ' . esc_html( $this->sg->get_version() ) . '

'; 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 and PHP 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 '

Environment

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

WordPress Config

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

Sitemap Config

'; echo '
';
				self::array_map_r( 'strip_tags', $this->sg->get_options() );
				echo '
'; echo '

Sitemap Content and Errors, Warnings, Notices

'; echo '
'; $sitemaps = $this->sg->simulate_index(); foreach ( $sitemaps as $sitemap ) { // @var $s GoogleSitemapGeneratorSitemapEntry . $s = $sitemap['data']; echo '

Sitemap: get_url() ) . '\'>' . esc_html( $sitemap['type'] ) . '/' . ( esc_html( $sitemap['params'] ) ? esc_html( $sitemap['params'] ) : '(No parameters)' ) . ' by ' . esc_html( $sitemap['caller']['class'] ) . '

'; $res = $this->sg->simulate_sitemap( $sitemap['type'], $sitemap['params'] ); echo "'; } $status = GoogleSitemapGeneratorStatus::load(); echo '
'; echo '

MySQL Queries

'; if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES ) { echo '
';
					// phpcs:disable.
					var_dump( $GLOBALS['wpdb']->queries );
					// phpcs:enable
					echo '
'; $total = 0; foreach ( $GLOBALS['wpdb']->queries as $q ) { $total += $q[1]; } echo '

Total Query Time

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

Build Process Results

'; echo '
';
				echo '
'; echo "

Done. Rebuild or Return

"; echo "

DO NOT POST THIS INFORMATION ON PUBLIC PAGES LIKE SUPPORT FORUMS AS IT MAY CONTAIN PASSWORDS OR SECRET SERVER INFORMATION!

"; echo '
'; return; } else { $redir_url = $this->sg->get_back_link() . '&sm_fromrb=true'; // Redirect so the sm_rebuild GET parameter no longer exists. header( 'location: ' . $redir_url ); // If there was already any other output, the header redirect will fail. echo ""; echo ""; exit; } } elseif ( ! empty( $_POST['sm_update'] ) ) { // Pressed Button: Update Config. check_admin_referer( 'sitemap' ); if ( isset( $_POST['sm_b_style'] ) && $_POST['sm_b_style'] === $this->sg->get_default_style() ) { $_POST['sm_b_style_default'] = true; $_POST['sm_b_style'] = ''; } $old_name = ''; foreach ( $this->sg->get_options() as $k => $v ) { // Skip some options if the user is not super admin... if ( ! is_super_admin() && in_array( $k, array( 'sm_b_time', 'sm_b_memory', 'sm_b_style', 'sm_b_style_default' ), true ) ) { continue; } // Check vor values and convert them into their types, based on the category they are in. if ( ! isset( $_POST[ $k ] ) ) { $_POST[ $k ] = ''; } // Empty string will get false on 2bool and 0 on 2float // Options of the category 'Basic Settings' are boolean, except the filename and the autoprio provider. if ( substr( $k, 0, 5 ) === 'sm_b_' ) { if ( 'sm_b_prio_provider' === $k || 'sm_b_style' === $k || 'sm_b_memory' === $k || 'sm_b_baseurl' === $k || 'sm_b_sitemap_name' === $k || 'sm_b_old_sm_name' === $k ) { if ( 'sm_b_filename_manual' === $k && strpos( sanitize_text_field( wp_unslash( $_POST[ $k ] ) ), '\\' ) !== false ) { $_POST[ $k ] = stripslashes( self::escape( sanitize_text_field( wp_unslash( $_POST[ $k ] ) ) ) ); } elseif ( 'sm_b_baseurl' === $k ) { $_POST[ $k ] = esc_url_raw( trim( self::escape( sanitize_text_field( wp_unslash( $_POST[ $k ] ) ) ) ) ); if ( ! empty( $_POST[ $k ] ) ) { $_POST[ $k ] = untrailingslashit( sanitize_text_field( wp_unslash( $_POST[ $k ] ) ) ); } } elseif ( 'sm_b_style' === $k ) { $_POST[ $k ] = esc_url_raw( trim( self::escape( sanitize_text_field( wp_unslash( $_POST[ $k ] ) ) ) ) ); if ( ! empty( $_POST[ $k ] ) ) { $_POST[ $k ] = untrailingslashit( sanitize_text_field( wp_unslash( $_POST[ $k ] ) ) ); } } elseif ( 'sm_b_sitemap_name' === $k ) { $old_name = $v; if ( '' === $_POST[ $k ] ) { $_POST[ $k ] = 'sitemap'; } else { $_POST[ $k ] = trim( self::escape( sanitize_text_field( wp_unslash( $_POST[ $k ] ) ) ) ); if ( $this->sg->old_file_exists() ) { $this->sg->delete_old_files(); } } } elseif ( 'sm_b_old_sm_name' === $k ) { $_POST[ $k ] = $old_name; } $this->sg->set_option( $k, (string) sanitize_text_field( wp_unslash( $_POST[ $k ] ) ) ); } elseif ( 'sm_b_time' === $k ) { if ( '' === $_POST[ $k ] ) { $_POST[ $k ] = -1; } $this->sg->set_option( $k, intval( $_POST[ $k ] ) ); } elseif ( 'sm_i_install_date' === $k ) { if ( $this->sg->get_option( 'i_install_date' ) <= 0 ) { $this->sg->set_option( $k, time() ); } } elseif ( 'sm_b_exclude' === $k ) { $id_ss = array(); $id_s = explode( ',', sanitize_text_field( wp_unslash( $_POST[ $k ] ) ) ); $len = count( $id_s ); for ( $x = 0; $x < $len; $x++ ) { $id = intval( trim( $id_s[ $x ] ) ); if ( $id > 0 ) { $id_ss[] = $id; } } $this->sg->set_option( $k, $id_ss ); } elseif ( 'sm_b_exclude_cats' === $k ) { $ex_cats = array(); if ( isset( $_POST['post_category'] ) ) { foreach ( (array) array_map( 'sanitize_text_field', ( wp_unslash( $_POST['post_category'] ) ) ) as $vv ) { if ( ! empty( $vv ) && is_numeric( $vv ) ) { $ex_cats[] = intval( $vv ); } } } if ( isset( $_POST['tax_input'] ) && isset( $_POST['tax_input']['product_cat'] ) ) { $prod_cat = array_map( 'sanitize_text_field', ( wp_unslash( $_POST['tax_input']['product_cat'] ) ) ); foreach ( (array) $prod_cat as $vv ) { if ( ! empty( $vv ) && is_numeric( $vv ) ) { $ex_cats[] = intval( $vv ); } } } $taxonomies = $this->sg->get_custom_taxonomies(); foreach ( $taxonomies as $key => $taxonomy ) { if ( isset( $_POST['tax_input'] ) && isset( $_POST['tax_input'][ $taxonomy ] ) ) { $custom_cat = array_map( 'sanitize_text_field', ( wp_unslash( $_POST['tax_input'][ $taxonomy ] ) ) ); foreach ( (array) $custom_cat as $vv ) { if ( ! empty( $vv ) && is_numeric( $vv ) ) { $ex_cats[] = intval( $vv ); } } } } $this->sg->set_option( $k, $ex_cats ); } else { $this->sg->set_option( $k, (bool) $_POST[ $k ] ); } // Options of the category 'Includes' are boolean. } elseif ( 'sm_i_tid' === $k ) { // $_POST[ $k ] = trim( self::escape( sanitize_text_field( wp_unslash( $_POST[ $k ] ) ) ) ); $this->sg->set_option( $k, trim( self::escape( sanitize_text_field( wp_unslash( $_POST[ $k ] ) ) ) ) ); } elseif ( 'sm_user_consent' === $k ) { $allow_cookies = (bool) sanitize_text_field( wp_unslash( $_POST[ $k ] ) ); if ( $allow_cookies ) { update_option( 'sm_user_consent', 'yes' ); } else { update_option( 'sm_user_consent', 'no' ); } } elseif ( substr( $k, 0, 6 ) === 'sm_in_' ) { if ( 'sm_in_tax' === $k ) { $enabled_taxonomies = array(); $sm_in_tax = isset( $_POST[ $k ] ) ? (array) array_map( 'sanitize_text_field', ( wp_unslash( is_array( $_POST[ $k ] ) ? $_POST[ $k ] : array() ) ) ) : array(); foreach ( array_keys( (array) $sm_in_tax ) as $tax_name ) { if ( empty( $tax_name ) || ! taxonomy_exists( $tax_name ) ) { continue; } $enabled_taxonomies[] = self::escape( $tax_name ); } $this->sg->set_option( $k, $enabled_taxonomies ); } elseif ( 'sm_in_customtypes' === $k ) { $enabled_post_types = array(); $sm_in_customtype = isset( $_POST[ $k ] ) ? (array) array_map( 'sanitize_text_field', wp_unslash( is_array( $_POST[ $k ] ) ? $_POST[ $k ] : array() ) ) : array(); foreach ( array_keys( (array) $sm_in_customtype ) as $post_type_name ) { if ( empty( $post_type_name ) || ! post_type_exists( $post_type_name ) ) { continue; } $enabled_post_types[] = self::escape( $post_type_name ); } $this->sg->set_option( $k, $enabled_post_types ); } else { $this->sg->set_option( $k, (bool) $_POST[ $k ] ); } // Options of the category 'Change frequencies' are string. } elseif ( substr( $k, 0, 6 ) === 'sm_cf_' ) { $this->sg->set_option( $k, (string) self::escape( sanitize_text_field( wp_unslash( $_POST[ $k ] ) ) ) ); // Options of the category 'Priorities' are float. } elseif ( substr( $k, 0, 6 ) === 'sm_pr_' ) { $this->sg->set_option( $k, (float) sanitize_text_field( wp_unslash( $_POST[ $k ] ) ) ); } elseif ( 'sm_links_page' === $k ) { $links_per_page = sanitize_text_field( wp_unslash( $_POST[ $k ] ) ); $links_per_page = (int) $links_per_page; if ( 0 >= $links_per_page || is_nan( $links_per_page ) ) { $links_per_page = 1000; } $this->sg->set_option( $k, (int) $links_per_page ); } elseif ( substr( $k, 0, 3 ) === 'sm_' ) { $this->sg->set_option( $k, (bool) sanitize_text_field( wp_unslash( $_POST[ $k ] ) ) ); } } GoogleSitemapGeneratorLoader::setup_rewrite_hooks(); GoogleSitemapGeneratorLoader::activate_rewrite(); // Apply page changes from POST. if ( is_super_admin() ) { $this->sg->set_pages( $this->html_apply_pages() ); } if(!$this->sg->get_option('sm_b_activate_indexnow')) $this->sg->set_option('sm_b_activate_indexnow', true); if ( $this->sg->save_options() ) { $message .= __( 'Configuration updated', 'google-sitemap-generator' ) . '
'; } else { $message .= __( 'Error while saving options', 'google-sitemap-generator' ) . '
'; } if ( is_super_admin() ) { if ( $this->sg->save_pages() ) { $message .= __( 'Pages saved', 'google-sitemap-generator' ) . '
'; } else { $message .= __( 'Error while saving pages', 'google-sitemap-generator' ) . '
'; } } } elseif ( ! empty( $_POST['sm_reset_config'] ) ) { // Pressed Button: Reset Config. $options = get_option('sm_options', array()); check_admin_referer( 'sitemap' ); delete_option( 'sm_show_beta_banner' ); delete_option( 'sm_beta_banner_discarded_on' ); delete_option( 'sm_beta_banner_discarded_count' ); delete_option( 'sm_beta_notice_dismissed_from_wp_admin' ); delete_option( 'sm_user_consent' ); delete_option( 'sm_hide_auto_update_banner' ); delete_option( 'sm_disabe_other_plugin' ); if(isset($options['sm_wp_sitemap_status'])) $wp_sitemap_status = $options['sm_wp_sitemap_status']; $this->sg->init_options(); $this->sg->save_options(); $options_new = get_option('sm_options', array()); if (isset($wp_sitemap_status) && $wp_sitemap_status === false) { $options_new['sm_wp_sitemap_status'] = false; } else if(isset($wp_sitemap_status) && $wp_sitemap_status === true) { $options_new['sm_wp_sitemap_status'] = true; } update_option('sm_options', $options_new); $message .= __( 'The default configuration was restored.', 'google-sitemap-generator' ); } elseif ( ! empty( $_GET['sm_delete_old'] ) ) { // Delete old sitemap files. 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; } 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 ''; 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 ); ?>

sg->set_option( 'i_hide_donated', true ); $this->sg->save_options(); } if ( isset( $_GET['sm_donated'] ) ) { $this->sg->set_option( 'i_donated', true ); $this->sg->save_options(); } if ( isset( $_GET['sm_hide_note'] ) ) { $this->sg->set_option( 'i_hide_note', true ); $this->sg->save_options(); } if ( isset( $_GET['sm_hide_survey'] ) ) { $this->sg->set_option( 'i_hide_survey', true ); $this->sg->save_options(); } if ( isset( $_GET['sm_hidedonors'] ) ) { $this->sg->set_option( 'i_hide_donors', true ); $this->sg->save_options(); } if ( isset( $_GET['sm_hide_works'] ) ) { $this->sg->set_option( 'i_hide_works', true ); $this->sg->save_options(); } if ( isset( $_GET['sm_disable_supportfeed'] ) ) { $this->sg->set_option( 'i_supportfeed', 'true' === $_GET['sm_disable_supportfeed'] ? false : true ); $this->sg->save_options(); } if ( isset( $_GET['sm_donated'] ) || ( $this->sg->get_option( 'i_donated' ) === true && $this->sg->get_option( 'i_hide_donated' ) !== true ) ) { ?> sg->get_option( 'i_donated' ) !== true && $this->sg->get_option( 'i_install_date' ) > 0 && $this->sg->get_option( 'i_hide_note' ) !== true && time() > ( $this->sg->get_option( 'i_install_date' ) + ( 60 * 60 * 24 * 30 ) ) ) { ?>

sg->get_option( 'i_install_date' ) > 0 && $this->sg->get_option( 'i_hide_works' ) !== true && time() > ( $this->sg->get_option( 'i_install_date' ) + ( 60 * 60 * 24 * 15 ) ) ) { ?>

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

get_max_input_vars() <= 0) { ?>

sg->show_survey() ) { $this->sg->html_survey(); } } ?>
user_email; ?>

sg->get_version() ); ?>

array(), 'p' => array(), 'a' => array( 'href' => array(), ), 'strong' => array(), ); /* translators: %s: search term */ echo wp_kses( str_replace( '%s', 'options-reading.php#blog_public', __( 'Your Reading Settings signal to search engines not to index your website. While your sitemap will still be generated, the "Search engine visibility" setting should de-selected for optimal indexation.', 'google-sitemap-generator' ) ), $arr ); ?>

html_print_box_header( 'sm_pnres', __( 'About this Plugin:', 'google-sitemap-generator' ), true ); ?> '> '> '> '> '> '> '> html_print_box_footer( true ); ?> html_print_box_header( 'sm_smres', __( 'Sitemap Resources:', 'google-sitemap-generator' ), true ); ?> '> '> '> '>
'> '> '> html_print_box_footer( true ); ?>
get_start_time() && $this->sg->get_option('b_indexnow') ) { $opt = get_option( 'gmt_offset' ); $st = intval($status->get_start_time() + ( $opt * 3600 )); /* translators: %s: search term */ $head = str_replace( '%date%', date_i18n( get_option( 'date_format' ), $st ) . ' ' . date_i18n( get_option( 'time_format' ), $st ), esc_html__( 'Result of the last ping, started on %date%.', 'google-sitemap-generator' ) ); } else esc_html__( '“Search engines have not been notified yet. Publish or update a post to update your sitemap modification dates and notify IndexNow-compatible search engines.”', 'google-sitemap-generator' ); $this->html_print_box_header( 'sm_rebuild', $head ); ?>
sg->get_option( 'i_supportfeed' ) ) { echo 'sg->get_back_link() ) . '&sm_disable_supportfeed=true' ) . '\'>' . esc_html__( 'Disable', 'google-sitemap-generator' ) . ''; $support_feed = $this->sg->get_support_feed(); if ( ! is_wp_error( $support_feed ) && $support_feed ) { $support_items = $support_feed->get_items( 0, $support_feed->get_item_quantity( 3 ) ); if ( count( $support_items ) > 0 ) { echo '
    '; foreach ( $support_items as $item ) { $url = esc_url( $item->get_permalink() ); $title = esc_html( $item->get_title() ); $title = html_entity_decode( $title ); $title = strip_tags( $title ); echo '
  • ' . esc_html( $title ) . '
  • '; } echo '
'; } } else { echo '
  • ' . esc_html__( 'No support topics available or an error occurred while fetching them.', 'google-sitemap-generator' ) . '
'; } } else { echo ''; } ?>
    sg->old_file_exists() ) { /* translators: %s: search term */ echo '
  • ' . esc_html( str_replace( '%s', ( $this->sg->get_back_link() ) . '&sm_delete_old=true', 'google-sitemap-generator' ) ), esc_html__( 'There is still a sitemap.xml or sitemap.xml.gz file in your site directory. Please delete them as no static files are used anymore or try to delete them automatically.', 'google-sitemap-generator' ) . '
  • '; } $arr = array( 'br' => array(), 'p' => array(), 'a' => array( 'href' => array(), ), 'strong' => array(), ); /* translators: %s: search term */ echo '
  • ' . wp_kses( str_replace( array( '%1$s', '%2$s' ), isset($custom_sitemap_name['sm_b_sitemap_name'])?home_url() .'/'. $custom_sitemap_name['sm_b_sitemap_name'] . '.xml':$this->sg->get_base_sitemap_url(), __( 'The URL to your sitemap index file is: %2$s.', 'google-sitemap-generator' ) ), $arr ) . '
  • '; if ( !$this->sg->get_option('b_indexnow') ) { //echo '
  • ' . esc_html__( 'Search engines haven\'t been notified yet. Write a post to let them know about your sitemap.', 'google-sitemap-generator' ) . '
  • '; } else { $services = (null !== $status) ? $status->get_used_ping_services() : array(); foreach ( $services as $service ) { $name = $status->get_service_name( $service ); if ( $status->get_ping_result( $service ) ) { $arr = array( 'b' => array(), 'a' => array( 'href' => array(), ), ); /* translators: %s: search term */ echo '
  • ' . wp_kses( sprintf( __( '%s was successfully notified about changes.', 'google-sitemap-generator' ), $name ), $arr ) . '
  • '; $dur = $status->get_ping_duration( $service ); if ( $dur > 4 ) { echo '
  • ' . wp_kses( str_replace( array( '%time%', '%name%' ), array( $dur, $name ), __( 'It took %time% seconds to notify %name%, maybe you want to disable this feature to reduce the building time.', 'google-sitemap-generator' ) ), $arr ) . '
  • '; } } else { /* translators: %s: search term */ //echo '
  • ' . wp_kses( str_replace( array( '%s', '%name%' ), array( wp_nonce_url( $this->sg->get_back_link() . '&sm_ping_service=' . $service . '&noheader=true', 'sitemap' ), $name ), __( 'There was a problem while notifying %name%. View result', 'google-sitemap-generator' ) ), $arr ) . '
  • '; } } } ?> sg->get_option('b_indexnow')) : ?>
  • Notify Search Engines about '>your sitemap or '>your main sitemap and all sub-sitemaps now.
  • array(), 'p' => array(), 'a' => array( 'href' => array(), ), 'strong' => array(), ); /* translators: %s: search term */ echo '
  • ' . wp_kses( str_replace( '%d', wp_nonce_url( $this->sg->get_back_link() . '&sm_rebuild=true&sm_do_debug=true', 'sitemap' ), __( 'If you encounter any problems with your sitemap you can use the debug function to get more information.', 'google-sitemap-generator' ) ), $arr ) . '
  • '; } ?>
  • array(), 'p' => array(), 'a' => array( 'href' => array(), ), 'strong' => array(), ); /* translators: %s: search term */ echo wp_kses( sprintf( __( 'If you like the plugin, please rate it 5 stars! :)', 'google-sitemap-generator' ), $this->sg->get_redirect_link( 'redir/sitemap-works-note' ), $this->sg->get_redirect_link( 'redirsitemap-paypal' ) ), $arr ); ?>
html_print_box_footer(); ?> sg->is_nginx() && $this->sg->is_using_permalinks() ) : ?> html_print_box_header( 'ngin_x', __( 'Webserver Configuration', 'google-sitemap-generator' ) ); ?>

'; // phpcs:ignore } ?>

html_print_box_footer(); ?> html_print_box_header( 'sm_basic_options', __( 'Basic Options', 'google-sitemap-generator' ) ); ?> ' target='_blank'>

  • array(), 'p' => array(), 'a' => array( 'href' => array(), ), 'strong' => array(), ); if ($this->sg->get_option('b_indexnow') && $api_key = $this->index_now->getApiKey()) { esc_html_e(sprintf(__('Microsoft Bing API Key: %s', 'google-sitemap-generator'), $api_key)); echo '
    '; } /* translators: %s: search term */ echo wp_kses( str_replace( '%s', $this->sg->get_redirect_link( 'redir/sitemap-gwb/' ), __( 'No registration required, however, you can join the Microsoft Bing Webmaster Tools for more crawling details.', 'google-sitemap-generator' ) ), $arr ); ?>

' target='_blank'>
  • ( )
  • ()

  • sg->get_default_style() && $this->sg->get_option( 'b_style_default' ) === true ); ?> () sg->get_default_style() ) : ?>

  • ' target='_blank'>

  • ' target='_blank'>
html_print_box_footer(); ?> html_print_box_header( 'sm_pages', __( 'Additional Pages', 'google-sitemap-generator' ) ); ?> array(), 'p' => array(), 'a' => array(), 'strong' => array(), ); echo wp_kses( 'Here you can specify files or URLs which should be included in the sitemap, but do not belong to your Site/WordPress.
For example, if your domain is www.foo.com and your site is located on www.foo.com/site you might want to include your homepage at www.foo.com', $arr ); echo '
  • '; echo '' . esc_html__( 'Note', 'google-sitemap-generator' ) . ': '; esc_html_e( 'If your site is in a subdirectory and you want to add pages which are NOT in the site directory or beneath, you MUST place your sitemap file in the root directory (Look at the "Location of your sitemap file" section on this page)!', 'google-sitemap-generator' ); echo '
  • '; echo '' . esc_html__( 'URL to the page', 'google-sitemap-generator' ) . ': '; esc_html_e( 'Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home ', 'google-sitemap-generator' ); echo '
  • '; echo '' . esc_html__( 'Priority', 'google-sitemap-generator' ) . ': '; esc_html_e( 'Choose the priority of the page relative to the other pages. For example, your homepage might have a higher priority than your imprint.', 'google-sitemap-generator' ); echo '
  • '; echo '' . esc_html__( 'Last Changed', 'google-sitemap-generator' ) . ': '; esc_html_e( 'Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional).', 'google-sitemap-generator' ); echo '
'; ?> sg->get_plugin_url() . 'img/sitemap.js' ), '', '1.0.0', false ); ?>
html_print_box_footer(); ?> html_print_box_header( 'sm_postprio', __( 'Post Priority', 'google-sitemap-generator' ) ); ?>

    sg->get_prio_providers(); array_unshift( $provs, '' ); $len = count( $provs ); for ( $i = 0; $i < $len; $i++ ) { if ( 0 === $i ) { echo '
  • html_get_checked( $this->sg->get_option( 'b_prio_provider' ), $provs[ $i ] ) ) . ' />
    ' . esc_html__( 'All posts will have the same priority which is defined in "Priorities"', 'google-sitemap-generator' ) . '

  • '; } else { echo '
  • html_get_checked( $this->sg->get_option( 'b_prio_provider' ), $provs[ $i ] ) ) . ' />
    ' . esc_html__( call_user_func( array( $provs[ $i ], 'get_description' ) ), 'google-sitemap-generator' ) . '

  • '; } } ?>
html_print_box_footer(); ?> html_print_box_header( 'sm_includes', __( 'Sitemap Content', 'google-sitemap-generator' ) ); ?> :
  • sg->is_taxonomy_supported() ) : ?>
sg->is_taxonomy_supported() ) { $taxonomies = $this->sg->get_custom_taxonomies(); $enabled_taxonomies = $this->sg->get_option( 'in_tax' ); if ( count( $taxonomies ) > 0 ) { ?> :
    name, $enabled_taxonomies, true ); ?>
sg->is_custom_post_types_supported() ) { $custom_post_types = $this->sg->get_custom_post_types(); $enabled_post_types = $this->sg->get_option( 'in_customtypes' ); if ( count( $custom_post_types ) > 0 ) { ?> :
    name, $enabled_post_types, true ); } ?>
:

  • array(), ); echo wp_kses( __( 'This is highly recommended and helps the search engines to know when your content has changed. This option affects all sitemap entries.', 'google-sitemap-generator' ), $arr ); ?>
html_print_box_footer(); ?> html_print_box_header( 'sm_excludes', __( 'Excluded Items', 'google-sitemap-generator' ) ); ?> :
    sg->get_option( 'b_exclude_cats' ), false ); ?>
    has_woo_commerce ) { $defaults = array( 'descendants_and_self' => 0, 'selected_cats' => $this->sg->get_option( 'b_exclude_cats' ), 'popular_cats' => false, 'walker' => null, 'taxonomy' => 'product_cat', 'checked_ontop' => true, 'echo' => true, ); } else { $defaults = array( 'selected_cats' => $this->sg->get_option( 'b_exclude_cats' ), 'echo' => true, ); } wp_terms_checklist( 0, $defaults ); ?>
sg->get_custom_taxonomies(); foreach ( $taxonomies as $key => $taxonomy ) { ?>
    has_woo_commerce ) { $defaults = array( 'descendants_and_self' => 0, 'selected_cats' => $this->sg->get_option( 'b_exclude_cats' ), 'popular_cats' => false, 'walker' => null, 'taxonomy' => $taxonomy, 'checked_ontop' => true, 'echo' => true, ); } else { $defaults = array( 'selected_cats' => $this->sg->get_option( 'b_exclude_cats' ), 'echo' => true, ); } wp_terms_checklist( 0, $defaults ); ?>
:

:
html_print_box_footer(); ?> html_print_box_header( 'sm_change_frequencies', __( 'Change Frequencies', 'google-sitemap-generator' ) ); ?>

:

  • sg->is_taxonomy_supported() ) { $in_tax = $this->sg->get_option( 'in_tax' ); if( ! empty( $in_tax ) ) { foreach( $in_tax as $tax_name ) { $taxonomy = get_taxonomy( $tax_name ); $field_name = "cf_" . $tax_name; ?>
  • sg->is_taxonomy_supported() ) : ?>
html_print_box_footer(); ?> html_print_box_header( 'sm_priorities', __( 'Priorities', 'google-sitemap-generator' ) ); ?>
  • sg->is_taxonomy_supported() ) { $in_tax = $this->sg->get_option( 'in_tax' ); if( ! empty( $in_tax ) ) { foreach( $in_tax as $tax_name ) { $taxonomy = get_taxonomy( $tax_name ); $field_name = "pr_" . $tax_name; ?>
  • sg->is_taxonomy_supported() ) : ?>
html_print_box_footer(); ?>

' /> ' />

array( 'cc' => 'USD', 'lc' => 'US', ), 'en-GB' => array( 'cc' => 'GBP', 'lc' => 'GB', ), 'de' => array( 'cc' => 'EUR', 'lc' => 'DE', ), ); $my_lc = $lc['en']; $wpl = get_bloginfo( 'language' ); if ( ! empty( $wpl ) ) { if ( array_key_exists( $wpl, $lc ) ) { $my_lc = $lc[ $wpl ]; } else { $wpl = substr( $wpl, 0, 2 ); if ( array_key_exists( $wpl, $lc ) ) { $my_lc = $lc[ $wpl ]; } } } ?> ' /> ' /> ' /> ' /> ' />