Astra_Breadcrumbs_Configs::is_third_party_breadcrumb_active()
Is third-party breadcrumb active.
Description
Decide if the Source 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_third_party_breadcrumb_active() { // Check if breadcrumb is turned on from WPSEO option. $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'] ) { // Check if breadcrumb is turned on from SEO Yoast plugin. return true; } elseif ( function_exists( 'bcn_display' ) ) { // Check if breadcrumb is turned on from Breadcrumb NavXT plugin. return true; } elseif ( function_exists( 'rank_math_the_breadcrumbs' ) ) { // Check if breadcrumb is turned on from Rank Math plugin. return true; } else { return false; } }
Expand full source code Collapse full source code View on Trac