Source
$is_skipped = Helper::is_plugin_active_for_network() ? get_blog_option( get_main_site_id(), 'rank_math_registration_skip' ) : get_option( 'rank_math_registration_skip' );
<?php
/**
* The Conditional helpers.
*
* @since 0.9.0
* @package RankMath
* @subpackage RankMath\Helpers
* @author Rank Math <support@rankmath.com>
*/
namespace RankMath\Helpers;
use RankMath\Helper;
use RankMath\Admin\Admin_Helper;
defined( 'ABSPATH' ) || exit;
/**
* Conditional class.
*/
trait Conditional {
/**
* Check if whitelabel filter is active.
*
* @return boolean
*/
public static function is_whitelabel() {
/**
* Enable whitelabel.
*
* @param bool $whitelabel Enable whitelabel.
*/
return apply_filters( 'rank_math/whitelabel', false );
}
/**
* Check if module is active.
*
* @param string $id Module ID.
* @return boolean
*/
public static function is_module_active( $id ) {
$active_modules = get_option( 'rank_math_modules', [] );
if ( ! is_array( $active_modules ) || ! isset( rank_math()->manager ) || is_null( rank_math()->manager ) ) {
return false;
}
return in_array( $id, $active_modules, true ) && array_key_exists( $id, rank_math()->manager->modules );
}
/**
* Checks if the plugin is configured.
*
* @param bool $value If this param is set, the option will be updated.
* @return bool Return the option value if param is not set.
*/
public static function is_configured( $value = null ) {
$key = 'rank_math_is_configured';
if ( is_null( $value ) ) {
$value = get_option( $key );
return ! empty( $value );
}