on' => 'schema', 'feature' => 'job-posting' ], [ 'license_level' => 'elite', 'section' => 'tools', 'feature' => 'network-tools-site-activation' ], [ 'license_level' => 'elite', 'section' => 'tools', 'feature' => 'network-tools-database' ], [ 'license_level' => 'elite', 'section' => 'tools', 'feature' => 'network-tools-import-export' ], [ 'license_level' => 'elite', 'section' => 'tools', 'feature' => 'network-tools-robots' ], [ 'license_level' => 'elite', 'section' => 'search-statistics', 'feature' => 'seo-statistics' ], [ 'license_level' => 'elite', 'section' => 'search-statistics', 'feature' => 'keyword-rankings' ], [ 'license_level' => 'elite', 'section' => 'search-statistics', 'feature' => 'keyword-rankings-pages' ], [ 'license_level' => 'elite', 'section' => 'search-statistics', 'feature' => 'content-rankings' ], [ 'license_level' => 'elite', 'section' => 'search-statistics', 'feature' => 'post-detail' ], [ 'license_level' => 'elite', 'section' => 'search-statistics', 'feature' => 'post-detail-page-speed' ], [ 'license_level' => 'elite', 'section' => 'search-statistics', 'feature' => 'post-detail-seo-statistics' ], [ 'license_level' => 'elite', 'section' => 'search-statistics', 'feature' => 'post-detail-keywords' ], [ 'license_level' => 'elite', 'section' => 'search-statistics', 'feature' => 'post-detail-focus-keyword-trend' ], [ 'license_level' => 'elite', 'section' => 'search-statistics', 'feature' => 'keyword-tracking' ], [ 'license_level' => 'elite', 'section' => 'search-statistics', 'feature' => 'post-detail-keyword-tracking' ], [ 'license_level' => 'elite', 'section' => 'search-statistics', 'feature' => 'index-status' ] ] ), true ); } /** * Get the plans for a given feature. * * @since 4.3.0 * * @param string $sectionSlug The section name. * @param string $feature The feature name. * @return array The plans for the feature. */ public function getPlansForFeature( $sectionSlug, $feature = '' ) { $plans = []; // Loop through all the features and find the plans that have access to the feature. foreach ( $this->getFeatures() as $featureArray ) { if ( $featureArray->section !== $sectionSlug ) { continue; } if ( ! empty( $feature ) && $featureArray->feature !== $feature ) { continue; } $plans[] = ucfirst( $featureArray->license_level ); } return array_unique( $plans ); } }