<commit_before><?php
/**
 ** WP Present Settings
 **
 ** @since 0.9.6
 **/
class WP_Present_Settings {

	const REVISION = 20131229;

	public $plugins_url = '';
	public $nonce_fail_message = '';

	// Define and register singleton
	private static $instance = false;
	public static function instance() {
		if( ! self::$instance ) {
			self::$instance = new self;
			self::$instance->setup();
		}
		return self::$instance;
	}

	/**
	 * Constructor
     *
	 * @since 0.9.6
	 */
	private function __construct() { }

	/**
	 * Clone
     *
	 * @since 0.9.6
	 */
	private function __clone() { }

	/**
	 * Add actions and filters
	 *
	 * @uses add_action, add_filter
	 * @since 0.9.6
	 */
	function setup() {

		// Setup
		$this->plugins_url = plugins_url( '/wp-present' );
		$this->nonce_fail_message = __( 'Cheatin&#8217; huh?' );

		// Admin
		add_action( 'admin_enqueue_scripts', array( $this, 'action_admin_enqueue_scripts' ) );

	}

	/**
	 * Enqueue necessary admin scripts
	 *
	 * @uses wp_enqueue_script
	 * @return null
	 */
	public function action_admin_enqueue_scripts() {

		// Only add this variable on the settings page
		global $pagenow;
		if( 'edit.php' != $pagenow || ! isset( $_GET['page'] ) || 'presentation-options' != $_GET['page'] ) {
			return;
		}

		// Settings Styles
		wp_enqueue_style( 'wp-present-genericons', $this->plugins_url . '/fonts/genericons/genericons.css', '', self::REVISION );
		wp_enqueue_style( 'wp-present-admin', $this->plugins_url . '/css/settings.css', '', self::REVISION );
	}

	/**
	 * Markup for the Options page
	 *
	 * @return null
	 */
	public function settings_page(){

		// Get active tab
		$active_tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : 'general';

		?>
		<div id="wpbody">
			<div id="wpbody-content" aria-label="Main content" tabindex="0">
				<div class="wrap">
					<?php //screen_icon(); ?>
					<h2><?php _e( 'Presentation Options', WP_Present_Core::TEXT_DOMAIN );?></h2><commit_msg>Creates is_settings_page() helper method<commit_after><?php
/**
 ** WP Present Settings
 **
 ** @since 0.9.6
 **/
class WP_Present_Settings {

	const REVISION = 20131229;

	public $plugins_url = '';
	public $nonce_fail_message = '';

	// Define and register singleton
	private static $instance = false;
	public static function instance() {
		if( ! self::$instance ) {
			self::$instance = new self;
			self::$instance->setup();
		}
		return self::$instance;
	}

	/**
	 * Constructor
     *
	 * @since 0.9.6
	 */
	private function __construct() { }

	/**
	 * Clone
     *
	 * @since 0.9.6
	 */
	private function __clone() { }

	/**
	 * Add actions and filters
	 *
	 * @uses add_action, add_filter
	 * @since 0.9.6
	 */
	function setup() {

		// Setup
		$this->plugins_url = plugins_url( '/wp-present' );
		$this->nonce_fail_message = __( 'Cheatin&#8217; huh?' );

		// Admin
		add_action( 'admin_enqueue_scripts', array( $this, 'action_admin_enqueue_scripts' ) );

	}

	/**
	 * Are we looking at the settings page?
	 *
	 * @since 0.9.6
	 * @return bool
	 */
	function is_settings_page() {
		global $pagenow;

		if( is_admin() && 'edit.php' == $pagenow && isset( $_GET['page'] ) && 'presentation-options' == $_GET['page'] ) {
			return true;
		}
		return false;
	}

	/**
	 * Enqueue necessary admin scripts
	 *
	 * @uses wp_enqueue_script
	 * @return null
	 */
	public function action_admin_enqueue_scripts() {

		// Only add this variable on the settings page
		if( ! self::is_settings_page() ) {
			return;
		}

		// Settings Styles
		wp_enqueue_style( 'wp-present-genericons', $this->plugins_url . '/fonts/genericons/genericons.css', '', self::REVISION );
		wp_enqueue_style( 'wp-present-admin', $this->plugins_url . '/css/settings.css', '', self::REVISION );
	}

	/**
	 * Markup for the Options page
	 *
	 * @return null
	 */
	public function settings_page(){

		// Get active tab
		$active_tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : 'general';

		?>
		<div id="wpbody">
			<div id="wpbody-content" aria-label="Main content" tabindex="0">
				<div class="wrap">
					<?php //screen_icon(); ?>
					<h2><?php _e( 'Presentation Options', WP_Present_Core::TEXT_DOMAIN );?></h2>
{'fraction_non_alphanumeric': 0.1730070268960504, 'fraction_numerical': 0.013811485340440998, 'mean_word_length': 3.291060291060291, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 29, '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': '2742787', 'n_tokens_mistral': 1594, 'n_tokens_neox': 1420, 'n_words': 320}