ded_terms'] ) ) { $newOptions['excluded_terms'] = $this->sanitizeExcludedIds( $newOptions['excluded_terms'] ); } return $newOptions; } /** * Callback for the widgets options form. * * @since 4.1.3 * * @param array $instance The widget options. * @return void */ public function form( $instance ) { // phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable $instance = wp_parse_args( (array) $instance, $this->defaults ); $postTypeObjects = $this->getPublicPostTypes(); $postTypes = $this->getPublicPostTypes( true ); $taxonomyObjects = aioseo()->helpers->getPublicTaxonomies(); // phpcs:enable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable include AIOSEO_DIR . '/app/Common/Views/sitemap/html/widget-options.php'; } /** * Returns the public post types (without attachments). * * @since 4.1.3 * * @param boolean $namesOnly Whether only the names should be returned. * @return array The public post types. */ private function getPublicPostTypes( $namesOnly = false ) { $postTypes = aioseo()->helpers->getPublicPostTypes( $namesOnly ); foreach ( $postTypes as $k => $postType ) { if ( is_array( $postType ) && 'attachment' === $postType['name'] ) { unset( $postTypes[ $k ] ); break; } if ( ! is_array( $postType ) && 'attachment' === $postType ) { unset( $postTypes[ $k ] ); break; } } return array_values( $postTypes ); } /** * Sanitizes the excluded IDs by removing any non-integer values. * * @since 4.1.3 * * @param string $ids The IDs as a string, comma-separated. * @return string The sanitized IDs as a string, comma-separated. */ private function sanitizeExcludedIds( $ids ) { $ids = array_map( 'trim', explode( ',', $ids ) ); $ids = array_filter( $ids, 'is_numeric' ); $ids = esc_sql( implode( ', ', $ids ) ); return $ids; } }
Fatal error: Uncaught Error: Class "AIOSEO\Plugin\Common\Sitemap\Html\Widget" not found in /htdocs/wp-includes/class-wp-widget-factory.php:62 Stack trace: #0 /htdocs/wp-includes/widgets.php(123): WP_Widget_Factory->register('AIOSEO\\Plugin\\C...') #1 /htdocs/wp-content/plugins/all-in-one-seo-pack/app/Common/Sitemap/Html/Sitemap.php(76): register_widget('AIOSEO\\Plugin\\C...') #2 /htdocs/wp-includes/class-wp-hook.php(324): AIOSEO\Plugin\Common\Sitemap\Html\Sitemap->registerWidget('') #3 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #4 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #5 /htdocs/wp-includes/widgets.php(1870): do_action('widgets_init') #6 /htdocs/wp-includes/class-wp-hook.php(324): wp_widgets_init('') #7 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #8 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #9 /htdocs/wp-settings.php(704): do_action('init') #10 /htdocs/wp-config.php(85): require_once('/htdocs/wp-sett...') #11 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #12 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #13 /htdocs/index.php(17): require('/htdocs/wp-blog...') #14 {main} thrown in /htdocs/wp-includes/class-wp-widget-factory.php on line 62