ID ) ? $post->ID : 0, '_analytify_skip_tracking', true ); } /** * Check if pro version is active. * * @return bool */ public static function is_active_pro() { return ( is_plugin_active( 'wp-analytify-pro/wp-analytify-pro.php' ) ) ? true : false; } /** * Returns all the modules available in pro. * * @return array Pro modules. * @since 5.1.1 */ public static function get_pro_modules() { return get_option( 'wp_analytify_modules' ); } /** * Check if a module is active via options. * * @param string $slug Slug of the module. * @return boolean */ public static function is_module_active( $slug ) { $wp_analytify_modules = get_option( 'wp_analytify_modules' ); return ( $wp_analytify_modules && isset( $wp_analytify_modules[ $slug ] ) && isset( $wp_analytify_modules[ $slug ]['status'] ) && 'active' === $wp_analytify_modules[ $slug ]['status'] ) ? true : false; } /** * Get the last element of array. * * @param array $array The array to get the last element from. * @return mixed * @since 2.1.12 */ public static function end( $array ) { // phpcs:ignore Universal.NamingConventions.NoReservedKeywordParameterNames.arrayFound -- Array parameter name is acceptable for this context return end( $array ); } } // Admin assets deconfliction moved to a dedicated small file to keep this class lean.