Astra_Breadcrumbs_Configs::is_selected_breadcrumb_active()
Is selected third-party breadcrumb active.
Description
Decide if the Separator option should be visible depending on third party plugins.
Return
(bool) True - If the option should be displayed, False - If the option should be hidden.
Source
File: inc/addons/breadcrumbs/customizer/class-astra-breadcrumbs-configs.php
public function is_selected_breadcrumb_active() { // Check if breadcrumb is turned on from WPSEO option. $selected_breadcrumb_source = astra_get_option( 'select-breadcrumb-source' ); $breadcrumb_enable = is_callable( 'WPSEO_Options::get' ) ? WPSEO_Options::get( 'breadcrumbs-enable' ) : false; $wpseo_option = get_option( 'wpseo_internallinks' ) ? get_option( 'wpseo_internallinks' ) : $breadcrumb_enable; if ( ! is_array( $wpseo_option ) ) { unset( $wpseo_option ); $wpseo_option = array( 'breadcrumbs-enable' => $breadcrumb_enable, ); } if ( function_exists( 'yoast_breadcrumb' ) && true === $wpseo_option['breadcrumbs-enable'] && 'yoast-seo-breadcrumbs' === $selected_breadcrumb_source ) { // Check if breadcrumb is turned on from SEO Yoast plugin. return false; } elseif ( function_exists( 'bcn_display' ) && 'breadcrumb-navxt' === $selected_breadcrumb_source ) { // Check if breadcrumb is turned on from Breadcrumb NavXT plugin. return false; } elseif ( function_exists( 'rank_math_the_breadcrumbs' ) && 'rank-math' === $selected_breadcrumb_source ) { // Check if breadcrumb is turned on from Rank Math plugin. return false; } else { return true; } }
Expand full source code Collapse full source code View on Trac