>backup['taxonomies'][ $taxonomy ]['social']['facebook'], [ 'social', 'facebook', 'general', 'taxonomies', $taxonomy ] ); unset( $this->backup['taxonomies'][ $taxonomy ]['social']['facebook'] ); $this->shouldBackup = true; } } } /** * Restores the dynamic Archives options. * * @since 4.1.3 * * @return void */ protected function restoreArchives() { foreach ( $this->archives as $postType ) { // Restore the archives for Search Appearance. if ( ! empty( $this->backup['archives'][ $postType ]['searchAppearance'] ) ) { $this->restoreOptions( $this->backup['archives'][ $postType ]['searchAppearance'], [ 'searchAppearance', 'archives', $postType ] ); unset( $this->backup['archives'][ $postType ]['searchAppearance'] ); $this->shouldBackup = true; } } } /** * Restores the backuped options. * * @since 4.1.3 * * @param array $backupOptions The options to be restored. * @param array $groups The group that the option should be restored. * @return void */ protected function restoreOptions( $backupOptions, $groups ) { $groupPath = $this->options; foreach ( $groups as $group ) { if ( ! isset( $groupPath[ $group ] ) ) { return false; } $groupPath = $groupPath[ $group ]; } $options = aioseo()->dynamicOptions->noConflict(); foreach ( $backupOptions as $setting => $value ) { // Check if the option exists by checking if the type is defined. $type = ! empty( $groupPath[ $setting ]['type'] ) ? $groupPath[ $setting ]['type'] : ''; if ( ! $type ) { continue; } foreach ( $groups as $group ) { $options = $options->$group; } $options->$setting = $value; } } /** * Maybe backup the options if it has disappeared. * * @since 4.1.3 * * @param array $newOptions An array of options to check. * @return void */ public function maybeBackup( $newOptions ) { $this->maybeBackupPostType( $newOptions ); $this->maybeBackupTaxonomy( $newOptions ); $this->maybeBackupArchives( $newOptions ); } /** * Maybe backup the Post Types. * * @since 4.1.3 * * @param array $newOptions An array of options to check. * @return void */ protected function maybeBackupPostType( $newOptions ) { // Maybe backup the post types for Search Appearance. foreach ( $newOptions['searchAppearance']['postTypes'] as $dynamicPostTypeName => $dynamicPostTypeSettings ) { $found = in_array( $dynamicPostTypeName, $this->postTypes, true ); if ( ! $found ) { $this->backup['postTypes'][ $dynamicPostTypeName ]['searchAppearance'] = $dynamicPostTypeSettings; $this->shouldBackup = true; } } // Maybe backup the post types for Social Networks. foreach ( $newOptions['social']['facebook']['general']['postTypes'] as $dynamicPostTypeName => $dynamicPostTypeSettings ) { $found = in_array( $dynamicPostTypeName, $this->postTypes, true ); if ( ! $found ) { $this->backup['postTypes'][ $dynamicPostTypeName ]['social']['facebook'] = $dynamicPostTypeSettings; $this->shouldBackup = true; } } } /** * Maybe backup the Taxonomies. * * @since 4.1.3 * * @param array $newOptions An array of options to check. * @return void */ protected function maybeBackupTaxonomy( $newOptions ) { // Maybe backup the taxonomies for Search Appearance. foreach ( $newOptions['searchAppearance']['taxonomies'] as $dynamicTaxonomyName => $dynamicTaxonomySettings ) { $found = in_array( $dynamicTaxonomyName, $this->taxonomies, true ); if ( ! $found ) { $this->backup['taxonomies'][ $dynamicTaxonomyName ]['searchAppearance'] = $dynamicTaxonomySettings; $this->shouldBackup = true; } } } /** * Maybe backup the Archives. * * @since 4.1.3 * * @param array $newOptions An array of options to check. * @return void */ protected function maybeBackupArchives( $newOptions ) { // Maybe backup the archives for Search Appearance. foreach ( $newOptions['searchAppearance']['archives'] as $archiveName => $archiveSettings ) { $found = in_array( $archiveName, $this->archives, true ); if ( ! $found ) { $this->backup['archives'][ $archiveName ]['searchAppearance'] = $archiveSettings; $this->shouldBackup = true; } } } }
Fatal error: Uncaught Error: Class "AIOSEO\Plugin\Common\Options\DynamicBackup" not found in /htdocs/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php:286 Stack trace: #0 /htdocs/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php(97): AIOSEO\Plugin\AIOSEO->load() #1 /htdocs/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php(76): AIOSEO\Plugin\AIOSEO->init() #2 /htdocs/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php(414): AIOSEO\Plugin\AIOSEO::instance() #3 /htdocs/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack.php(96): aioseo() #4 /htdocs/wp-settings.php(522): include_once('/htdocs/wp-cont...') #5 /htdocs/wp-config.php(98): require_once('/htdocs/wp-sett...') #6 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #7 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #8 /htdocs/index.php(17): require('/htdocs/wp-blog...') #9 {main} thrown in /htdocs/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php on line 286