<commit_before><?php
/**
 * Handles legal things like cookie policy.
 */

namespace WPPRSC\Modules;

class LegalCouncil extends \WPPRSC\ModuleAbstract {
	protected $cookie_name = 'cookies_accepted';

	protected function __construct( $args = array() ) {
		parent::__construct( $args );

		$this->module_name = 'legal_council';
	}

	public function run() {
		if ( $this->get_setting( 'cookie_notice' ) && ! is_admin() && ! isset( $_COOKIE[ $this->cookie_name ] ) ) {
			add_action( 'wp_head', array( $this, 'print_cookie_notice_style' ), 7 );
			add_action( 'wp_head', array( $this, 'print_cookie_notice_script' ), 7 );
			add_action( 'wp_footer', array( $this, 'print_cookie_notice' ), 1000 );
			add_filter( 'body_class', array( $this, 'add_body_class' ) );
		}
	}

	public function print_cookie_notice_style() {
		?>
		<style type="text/css">
			.cookie-notice {
				position: fixed;
				right: 0;
				bottom: 0;
				left: 0;
				z-index: 100;
				padding: 5px 10px;
				color: white;
				background: black;
			}

			.cookie-notice-inner {
				margin: 0 auto;
				width: 100%;
				max-width: 1200px;
				text-align: center;
			}
		</style>
		<?php
	}

	public function print_cookie_notice_script() {
		$tracking_code = '';
		if ( class_exists( 'Yoast_GA_Options' ) ) {
			$tracking_code = Yoast_GA_Options::instance()->get_tracking_code();
		}
<commit_msg>fixed fatal error in legal council module<commit_after><?php
/**
 * Handles legal things like cookie policy.
 */

namespace WPPRSC\Modules;

class LegalCouncil extends \WPPRSC\ModuleAbstract {
	protected $cookie_name = 'cookies_accepted';

	protected function __construct( $args = array() ) {
		parent::__construct( $args );

		$this->module_name = 'legal_council';
	}

	public function run() {
		if ( $this->get_setting( 'cookie_notice' ) && ! is_admin() && ! isset( $_COOKIE[ $this->cookie_name ] ) ) {
			add_action( 'wp_head', array( $this, 'print_cookie_notice_style' ), 7 );
			add_action( 'wp_head', array( $this, 'print_cookie_notice_script' ), 7 );
			add_action( 'wp_footer', array( $this, 'print_cookie_notice' ), 1000 );
			add_filter( 'body_class', array( $this, 'add_body_class' ) );
		}
	}

	public function print_cookie_notice_style() {
		?>
		<style type="text/css">
			.cookie-notice {
				position: fixed;
				right: 0;
				bottom: 0;
				left: 0;
				z-index: 100;
				padding: 5px 10px;
				color: white;
				background: black;
			}

			.cookie-notice-inner {
				margin: 0 auto;
				width: 100%;
				max-width: 1200px;
				text-align: center;
			}
		</style>
		<?php
	}

	public function print_cookie_notice_script() {
		$tracking_code = '';
		if ( class_exists( 'Yoast_GA_Options' ) ) {
			$tracking_code = \Yoast_GA_Options::instance()->get_tracking_code();
		}

{'fraction_non_alphanumeric': 0.15056507473569086, 'fraction_numerical': 0.016769959897921984, 'mean_word_length': 3.7474048442906573, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6074799', 'n_tokens_mistral': 1160, 'n_tokens_neox': 963, 'n_words': 210}