lized array. global $wp_scripts; $data = $wp_scripts->get_data( 'aioseo/js/' . $this->scriptSlug, 'data' ); if ( ! is_array( $data ) ) { $data = json_decode( str_replace( 'var aioseo = ', '', substr( $data, 0, -1 ) ), true ); } // We have to temporarily modify the query here since the query incorrectly identifies // the current page as a category page when posts are filtered by a specific category. global $wp_query; $originalQuery = clone $wp_query; $wp_query->is_category = false; $wp_query->is_tag = false; $wp_query->is_tax = false; $posts = ! empty( $data['posts'] ) ? $data['posts'] : []; $postData = $this->getPostData( $postId, $columnName ); $addonsColumnData = array_filter( aioseo()->addons->doAddonFunction( 'admin', 'renderColumnData', [ $columnName, $postId, $postData ] ) ); $wp_query = $originalQuery; foreach ( $addonsColumnData as $addonColumnData ) { $postData = array_merge( $postData, $addonColumnData ); } $posts[] = $postData; $data['posts'] = $posts; $wp_scripts->add_data( 'aioseo/js/' . $this->scriptSlug, 'data', '' ); wp_localize_script( 'aioseo/js/' . $this->scriptSlug, 'aioseo', $data ); require AIOSEO_DIR . '/app/Common/Views/admin/posts/columns.php'; } /** * Gets the post data for the column. * * @since 4.5.0 * * @param int $postId The Post ID. * @param string $columnName The column name. * @return array The post data. */ protected function getPostData( $postId, $columnName ) { $nonce = wp_create_nonce( "aioseo_meta_{$columnName}_{$postId}" ); $thePost = Models\Post::getPost( $postId ); $postType = get_post_type( $postId ); $postData = [ 'id' => $postId, 'columnName' => $columnName, 'nonce' => $nonce, 'title' => $thePost->title, 'defaultTitle' => aioseo()->meta->title->getPostTypeTitle( $postType ), 'description' => $thePost->description, 'defaultDescription' => aioseo()->meta->description->getPostTypeDescription( $postType ), 'value' => ! empty( $thePost->seo_score ) ? (int) $thePost->seo_score : 0, 'showMedia' => false, 'isSpecialPage' => aioseo()->helpers->isSpecialPage( $postId ), 'postType' => $postType, 'isPostVisible' => aioseo()->helpers->isPostPubliclyViewable( $postId ) ]; return $postData; } /** * Checks whether the AIOSEO Details column should be registered. * * @since 4.0.0 * * @return bool Whether the column should be registered. */ public function shouldRegisterColumn( $screen, $postType ) { if ( 'type' === $postType ) { $postType = '_aioseo_type'; } if ( 'edit' === $screen || 'upload' === $screen ) { if ( aioseo()->options->advanced->postTypes->all && in_array( $postType, aioseo()->helpers->getPublicPostTypes( true ), true ) ) { return true; } $postTypes = aioseo()->options->advanced->postTypes->included; if ( in_array( $postType, $postTypes, true ) ) { return true; } } return false; } }
Fatal error: Uncaught Error: Class 'AIOSEO\Plugin\Common\Standalone\DetailsColumn' not found in /home/kordian1/domains/ostrabrama.pl/public_html/wp-content/plugins/all-in-one-seo-pack/app/Common/Standalone/Standalone.php:97 Stack trace: #0 /home/kordian1/domains/ostrabrama.pl/public_html/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php(316): AIOSEO\Plugin\Common\Standalone\Standalone->__construct() #1 /home/kordian1/domains/ostrabrama.pl/public_html/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php(97): AIOSEO\Plugin\AIOSEO->load() #2 /home/kordian1/domains/ostrabrama.pl/public_html/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php(76): AIOSEO\Plugin\AIOSEO->init() #3 /home/kordian1/domains/ostrabrama.pl/public_html/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php(387): AIOSEO\Plugin\AIOSEO::instance() #4 /home/kordian1/domains/ostrabrama.pl/public_html/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack.php(97): aioseo() #5 /home/kordian1/domains/ostrabrama.pl/public_html/wp-settings.php(522): in in /home/kordian1/domains/ostrabrama.pl/public_html/wp-content/plugins/all-in-one-seo-pack/app/Common/Standalone/Standalone.php on line 97