<commit_before><?php defined( 'ABSPATH' ) OR die( 'No direct access.' );
if ( ! class_exists( 'Admin_External_Links' ) ):

/**
 * Class Admin_External_Links
 * @category WordPress Plugins
 */
final class Admin_External_Links {

	/**
	 * Options to be saved and their default values
	 * @var array
	 */
	public $save_options = array(
		'meta' => array(
			'version' => NULL,
		),
		'main' => array(
			'target' => '_none',
			'filter_page' => 1,
			'filter_posts' => 1,
			'filter_comments' => 1,
			'filter_widgets' => 1,
			'ignore' => '//twitter.com/share',
			'ignore_subdomains' => 0,
		),
		'seo' => array(
			'external' => 1,
			'nofollow' => 1,
			'overwrite_follow' => 0,
			'title' => '%title%',
			'use_js' => 1,
			'load_in_footer' => 1,
		),
		'style' => array(
			'class_name' => 'ext-link',
			'icon' => 0,
			'image_no_icon' => 1,
			'no_icon_class' => 'no-ext-icon',
			'no_icon_same_window' => 0,
		),
		'extra' => array(
			'fix_js' => 0,
			'phpquery' => 0,
			'filter_excl_sel' => '.excl-ext-link',
		),
		'screen' => array(
			'menu_position' => NULL,
		),
	);

	/**
	 * Meta box page object
	 * @var WP_Meta_Box_Page
	 */
	public $meta_box_page = NULL;

	/**
	 * Ajax form object
	 * @var WP_Ajax_Option_Form
	 */
	public $form = NULL;
	static public $staticForm = NULL;


	/**
	 * Constructor
	 */
	public function __construct() {
		$this->check_version_update();

		// set meta box page
		$this->meta_box_page = new WP_Meta_Box_Page_01();

		// set ajax forms (also used by front-end)
		$this->form = new WP_Option_Forms_01( WP_EXTERNAL_LINKS_KEY, $this->save_options );
		self::$staticForm = $this->form;

		// init admin
		add_action( 'admin_init', array( $this, 'admin_init' ) );

		if ( is_admin() ) {
			// set options for add_page_method
			$menu_pos = $this->form->set_current_option( 'screen' )->value( 'menu_position' );

			// init meta box page
			$this->meta_box_page->init(
				// settings
				array(
					'page_title' => $this->__( 'WP External Links' ),
					'menu_title' => $this->__( 'External Links' ),
					'page_slug' => strtolower( WP_EXTERNAL_LINKS_KEY ),
					'add_page_method' => ( ! empty( $menu_pos ) AND $menu_pos != 'admin.php' ) ? 'add_submenu_page' : 'add_menu_page',
					'parent_slug' => ( ! empty( $menu_pos ) AND $menu_pos != 'admin.php' ) ? $menu_pos : NULL,
					'column_widths' => array(
						1 => array( 99 ),
						2 => array( 69, 29 ),
					),
					'icon_url' => plugins_url( 'images/icon-wp-external-links-16.png', WP_EXTERNAL_LINKS_FILE ),
				),
				// load callback
				array( $this, 'call_load_meta_box' )
			);
		}
	}

	/**
	 * Initialize Admin
	 */
	public function admin_init() {
		// set uninstall hook
		register_uninstall_hook( WP_EXTERNAL_LINKS_FILE, array( 'Admin_External_Links', 'call_uninstall' ) );

		// load text domain for translations
		load_plugin_textdomain( WP_EXTERNAL_LINKS_KEY, FALSE, dirname( plugin_basename( WP_EXTERNAL_LINKS_FILE ) ) . '/lang/' );
	}

	/**
	 * Add to head of Admin page
	 */
	public function admin_head() {
            echo <<< style
<style type="text/css">
/* WP External Links */
.postbox-container { margin-left:1%; }
.tooltip-help { text-decoration: none; }
.tipsy { padding: 5px; }
.tipsy-inner { padding: 5px 8px 4px 8px; color: white; max-width: 200px; text-align: center; text-shadow: 0 -1px 0 #333;
	border-top:1px solid #808080; border-botom:1px solid #6d6d6d; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px;
	background-color:#777; background-image:-ms-linear-gradient(bottom,#6d6d6d,#808080); background-image:-moz-linear-gradient(bottom,#6d6d6d,#808080); background-image:-o-linear-gradient(bottom,#6d6d6d,#808080); background-image:-webkit-gradient(linear,left bottom,left top,from(#6d6d6d),to(#808080)); background-image:-webkit-linear-gradient(bottom,#6d6d6d,#808080); background-image:linear-gradient(bottom,#6d6d6d,#808080);
}
.tipsy-north { background-position: top center; }
.tipsy-south { background-position: bottom center; }
.tipsy-east { background-position: right center; }
.tipsy-west { background-position: center bottom; }
<style>
style;
	}

	/**
	 * Translate text in current domain
	 * @param string $text
	 * @return string
	 */
	public function __( $text ) {
		return translate( $text, WP_EXTERNAL_LINKS_KEY );
	}

	/**
	 * Translate text in current domain
	 * @param string $text
	 * @return string
	 */
	public function _e( $text ) {
		echo translate( $text, WP_EXTERNAL_LINKS_KEY );
	}

	/**
	 * Load meta box action
	 */
	public function call_load_meta_box( $meta_box ) {
        add_action( 'admin_head', array($this, 'admin_head') );

		// add filters
		$meta_box->add_title_filter( array( $this, 'call_page_title' ) )
							->add_contextual_help_filter( array( $this, 'call_contextual_help' ) );

		// add meta boxes
		// add_meta_box( $title, $callback, $context = 'normal', $id = NULL, $priority = 'default', $callback_args = NULL )
		$meta_box->add_meta_box( $this->__( 'General Settings' ), array( $this, 'call_box_general_settings' ), 1 )
							->add_meta_box( $this->__( 'SEO Settings' ), array( $this, 'call_box_seo_settings' ), 1 )
							->add_meta_box( $this->__( 'Style Settings' ), array( $this, 'call_box_style_settings' ), 1 )
							->add_meta_box( $this->__( 'Extra Settings' ), array( $this, 'call_box_extra_settings' ), 1 )
							->add_meta_box( $this->__( 'Admin Settings' ), array( $this, 'call_box_admin_settings' ), 1 )
							//->add_meta_box( $this->__( 'About this Plugin' ), array( $this, 'call_box_about' ), 2 )
							->add_meta_box( $this->__( 'Other Plugins' ), array( $this, 'call_box_other_plugins' ), 2 );

        // scripts
		wp_enqueue_script( 'admin-wp-external-links', plugins_url( '/js/admin-wp-external-links.js', WP_EXTERNAL_LINKS_FILE ), array( 'jquery', 'postbox' ), WP_EXTERNAL_LINKS_VERSION, true );
	}

	/**
	 * Contextual_help (callback)
	 * @param string $content
	 * @return string
	 */
	public function call_contextual_help( $content ) {
		$help = '';
		$help .= $this->meta_box_page->get_ob_callback( array( $this, 'call_box_about' ) );
		return $help . $content;
	}

	/**
	 * Add icon to page title
	 * @return string
	 */
	public function call_page_title( $title ) {
		// when updated set the update message
		if ( isset($_GET[ 'settings-updated' ]) && $_GET[ 'settings-updated' ] == 'true' ) {
			$title .= '<div class="updated settings-error" id="setting-error-settings_updated">'
				. '<p><strong>' . __( 'Settings saved.' ) .'</strong></p>'
				. '</div>';
		}

		$title = '<div class="icon32" id="icon-options-custom" style="background:url( '. plugins_url( 'images/icon-wp-external-links-32.png', WP_EXTERNAL_LINKS_FILE ) .' ) no-repeat 50% 50%"><br></div>'
				. $title;

		return $title;
	}

	/**
	 * Meta Box: General Settings
	 */
	public function call_box_general_settings() {
		echo $this->form->set_current_option( 'main' )->open_form();
?>
		<fieldset class="options">
			<table class="form-table">
			<tr>
				<th style="width:250px;"><?php $this->_e( 'Open external links in...' ) ?>
						<?php echo $this->tooltip_help( 'Specify the target (window or tab) for opening external links.' ) ?></th>
				<td class="target_external_links">
					<label><?php echo $this->form->radio( 'target', '_none', array( 'class' => 'field_target' ) ); ?>
						<span><?php $this->_e( 'Same window or tab (<code>_none</code>)' ) ?></span></label>
						<?php echo $this->tooltip_help( 'Open in current window or tab, when framed in the same frame.' ) ?>
					<br/>
					<label><?php echo $this->form->radio( 'target', '_blank', array( 'class' => 'field_target' ) ); ?>
						<span><?php $this->_e( 'New window or tab (<code>_blank</code>)' ) ?></span></label>
						<?php echo $this->tooltip_help( 'Open every external link in a new window or tab.' ) ?>
					<br  style="margin-bottom:15px;" />
					<label><?php echo $this->form->radio( 'target', '_top', array( 'class' => 'field_target' ) ); ?>
						<span><?php $this->_e( 'Topmost frame (<code>_top</code>)' ) ?></span></label>
						<?php echo $this->tooltip_help( 'Open in current window or tab, when framed in the topmost frame.' ) ?>
					<br/>
					<label><?php echo $this->form->radio( 'target', '_new', array( 'class' => 'field_target' ) ); ?>
						<span><?php $this->_e( 'Seperate window or tab (<code>_new</code>)' ) ?></span></label>
						<?php echo $this->tooltip_help( 'Open new window the first time and use this window for each external link.' ) ?>
				</td>
			</tr>
			<tr>
				<th style="width:250px;"><?php $this->_e( 'Apply plugin settings on...' ) ?>
						<?php echo $this->tooltip_help( 'Choose contents for applying settings to external links.' ) ?></th>
				<td>
					<label><?php echo $this->form->checkbox( 'filter_page', 1 ); ?>
					<span><?php $this->_e( 'All contents' ) ?></span> <span class="description"><?php $this->_e('(the whole <code>&lt;body&gt;</code>)') ?></span></label>
					<br/>&nbsp;&nbsp;&nbsp;<label><?php echo $this->form->checkbox( 'filter_posts', 1 ); ?>
							<span><?php $this->_e( 'Post contents' ) ?></span></label>
					<br/>&nbsp;&nbsp;&nbsp;<label><?php echo $this->form->checkbox( 'filter_comments', 1 ); ?>
							<span><?php $this->_e( 'Comments' ) ?></span></label>
					<br/>&nbsp;&nbsp;&nbsp;<label><?php echo $this->form->checkbox( 'filter_widgets', 1 ); ?>
							<span><?php
								if ( self::check_widget_content_filter() ):
									$this->_e( 'All widgets' );
									echo $this->tooltip_help( 'Applied to all widgets by using the "widget_content" filter of the Widget Logic plugin' );
								else:
									$this->_e( 'All text widgets' );
									echo $this->tooltip_help( 'Only the text widget will be applied. To apply to all widget you should select "All contents" option.' );
								endif;
							?></span></label>
				</td>
			</tr>
			<tr>
				<th><?php $this->_e( 'Ignore links (URL) containing...' ) ?>
					<?php echo $this->tooltip_help( 'This plugin will completely ignore links that contain one of the given texts in the URL. Use enter to seperate each text. This check is not case sensitive.' ) ?></th>
				<td><label><?php echo $this->form->textarea( 'ignore' ); ?>
						<span class="description"><?php _e( 'Be as specific as you want, f.e.: <code>twitter.com</code> or <code>https://twitter.com</code>. Seperate each by an enter.' ) ?></span></label>
				</td>
			</tr>
			<tr>
				<th style="width:250px;"><?php $this->_e( 'Ignore subdomains' ) ?>
						<?php echo $this->tooltip_help( 'Ignore all links to the site\'s domain and subdomains. These links will be threaded as internal links.' ) ?></th>
				<td>
					<label><?php echo $this->form->checkbox( 'ignore_subdomains', 1 ); ?>
					<span><?php $this->_e( 'Ignore all links to the site\'s domain and subdomains' ) ?></span> <span class="description"><?php $this->_e('These links will be threaded as internal links.') ?></span></label>
				</td>
			</tr>
			</table>
		</fieldset>

<?php
		echo $this->form->submit();
		echo $this->form->close_form();
	}

	/**
	 * Meta Box: SEO Settings
	 */
	public function call_box_seo_settings() {
		echo $this->form->set_current_option( 'seo' )->open_form();
?>
		<fieldset class="options">
			<table class="form-table">
			<tr>
				<th style="width:250px;"><?php $this->_e( 'Add to <code>rel</code>-attribute' ) ?>
						<?php echo $this->tooltip_help( 'Set values for the "rel"-atribute of external links.' ) ?></th>
				<td><label><?php echo $this->form->checkbox( 'nofollow', 1 ); ?>
						<span><?php $this->_e( 'Add <code>"nofollow"</code> to external links' ) ?></span></label>
						<?php echo $this->tooltip_help( 'Add "nofollow" to the "rel"-attribute of external links (unless link already has "follow").' ) ?>
					<br/>&nbsp;&nbsp;&nbsp;<label><?php echo $this->form->checkbox( 'overwrite_follow', 1 ); ?>
						<span><?php $this->_e( 'Also apply to external links containing <code>"follow"</code>' ) ?></span></label>
						<?php echo $this->tooltip_help( 'Also change external links with "follow" to "nofollow".' ) ?>

                    <br/><br/><commit_msg>changed description subdomains<commit_after><?php defined( 'ABSPATH' ) OR die( 'No direct access.' );
if ( ! class_exists( 'Admin_External_Links' ) ):

/**
 * Class Admin_External_Links
 * @category WordPress Plugins
 */
final class Admin_External_Links {

	/**
	 * Options to be saved and their default values
	 * @var array
	 */
	public $save_options = array(
		'meta' => array(
			'version' => NULL,
		),
		'main' => array(
			'target' => '_none',
			'filter_page' => 1,
			'filter_posts' => 1,
			'filter_comments' => 1,
			'filter_widgets' => 1,
			'ignore' => '//twitter.com/share',
			'ignore_subdomains' => 0,
		),
		'seo' => array(
			'external' => 1,
			'nofollow' => 1,
			'overwrite_follow' => 0,
			'title' => '%title%',
			'use_js' => 1,
			'load_in_footer' => 1,
		),
		'style' => array(
			'class_name' => 'ext-link',
			'icon' => 0,
			'image_no_icon' => 1,
			'no_icon_class' => 'no-ext-icon',
			'no_icon_same_window' => 0,
		),
		'extra' => array(
			'fix_js' => 0,
			'phpquery' => 0,
			'filter_excl_sel' => '.excl-ext-link',
		),
		'screen' => array(
			'menu_position' => NULL,
		),
	);

	/**
	 * Meta box page object
	 * @var WP_Meta_Box_Page
	 */
	public $meta_box_page = NULL;

	/**
	 * Ajax form object
	 * @var WP_Ajax_Option_Form
	 */
	public $form = NULL;
	static public $staticForm = NULL;


	/**
	 * Constructor
	 */
	public function __construct() {
		$this->check_version_update();

		// set meta box page
		$this->meta_box_page = new WP_Meta_Box_Page_01();

		// set ajax forms (also used by front-end)
		$this->form = new WP_Option_Forms_01( WP_EXTERNAL_LINKS_KEY, $this->save_options );
		self::$staticForm = $this->form;

		// init admin
		add_action( 'admin_init', array( $this, 'admin_init' ) );

		if ( is_admin() ) {
			// set options for add_page_method
			$menu_pos = $this->form->set_current_option( 'screen' )->value( 'menu_position' );

			// init meta box page
			$this->meta_box_page->init(
				// settings
				array(
					'page_title' => $this->__( 'WP External Links' ),
					'menu_title' => $this->__( 'External Links' ),
					'page_slug' => strtolower( WP_EXTERNAL_LINKS_KEY ),
					'add_page_method' => ( ! empty( $menu_pos ) AND $menu_pos != 'admin.php' ) ? 'add_submenu_page' : 'add_menu_page',
					'parent_slug' => ( ! empty( $menu_pos ) AND $menu_pos != 'admin.php' ) ? $menu_pos : NULL,
					'column_widths' => array(
						1 => array( 99 ),
						2 => array( 69, 29 ),
					),
					'icon_url' => plugins_url( 'images/icon-wp-external-links-16.png', WP_EXTERNAL_LINKS_FILE ),
				),
				// load callback
				array( $this, 'call_load_meta_box' )
			);
		}
	}

	/**
	 * Initialize Admin
	 */
	public function admin_init() {
		// set uninstall hook
		register_uninstall_hook( WP_EXTERNAL_LINKS_FILE, array( 'Admin_External_Links', 'call_uninstall' ) );

		// load text domain for translations
		load_plugin_textdomain( WP_EXTERNAL_LINKS_KEY, FALSE, dirname( plugin_basename( WP_EXTERNAL_LINKS_FILE ) ) . '/lang/' );
	}

	/**
	 * Add to head of Admin page
	 */
	public function admin_head() {
            echo <<< style
<style type="text/css">
/* WP External Links */
.postbox-container { margin-left:1%; }
.tooltip-help { text-decoration: none; }
.tipsy { padding: 5px; }
.tipsy-inner { padding: 5px 8px 4px 8px; color: white; max-width: 200px; text-align: center; text-shadow: 0 -1px 0 #333;
	border-top:1px solid #808080; border-botom:1px solid #6d6d6d; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px;
	background-color:#777; background-image:-ms-linear-gradient(bottom,#6d6d6d,#808080); background-image:-moz-linear-gradient(bottom,#6d6d6d,#808080); background-image:-o-linear-gradient(bottom,#6d6d6d,#808080); background-image:-webkit-gradient(linear,left bottom,left top,from(#6d6d6d),to(#808080)); background-image:-webkit-linear-gradient(bottom,#6d6d6d,#808080); background-image:linear-gradient(bottom,#6d6d6d,#808080);
}
.tipsy-north { background-position: top center; }
.tipsy-south { background-position: bottom center; }
.tipsy-east { background-position: right center; }
.tipsy-west { background-position: center bottom; }
<style>
style;
	}

	/**
	 * Translate text in current domain
	 * @param string $text
	 * @return string
	 */
	public function __( $text ) {
		return translate( $text, WP_EXTERNAL_LINKS_KEY );
	}

	/**
	 * Translate text in current domain
	 * @param string $text
	 * @return string
	 */
	public function _e( $text ) {
		echo translate( $text, WP_EXTERNAL_LINKS_KEY );
	}

	/**
	 * Load meta box action
	 */
	public function call_load_meta_box( $meta_box ) {
        add_action( 'admin_head', array($this, 'admin_head') );

		// add filters
		$meta_box->add_title_filter( array( $this, 'call_page_title' ) )
							->add_contextual_help_filter( array( $this, 'call_contextual_help' ) );

		// add meta boxes
		// add_meta_box( $title, $callback, $context = 'normal', $id = NULL, $priority = 'default', $callback_args = NULL )
		$meta_box->add_meta_box( $this->__( 'General Settings' ), array( $this, 'call_box_general_settings' ), 1 )
							->add_meta_box( $this->__( 'SEO Settings' ), array( $this, 'call_box_seo_settings' ), 1 )
							->add_meta_box( $this->__( 'Style Settings' ), array( $this, 'call_box_style_settings' ), 1 )
							->add_meta_box( $this->__( 'Extra Settings' ), array( $this, 'call_box_extra_settings' ), 1 )
							->add_meta_box( $this->__( 'Admin Settings' ), array( $this, 'call_box_admin_settings' ), 1 )
							//->add_meta_box( $this->__( 'About this Plugin' ), array( $this, 'call_box_about' ), 2 )
							->add_meta_box( $this->__( 'Other Plugins' ), array( $this, 'call_box_other_plugins' ), 2 );

        // scripts
		wp_enqueue_script( 'admin-wp-external-links', plugins_url( '/js/admin-wp-external-links.js', WP_EXTERNAL_LINKS_FILE ), array( 'jquery', 'postbox' ), WP_EXTERNAL_LINKS_VERSION, true );
	}

	/**
	 * Contextual_help (callback)
	 * @param string $content
	 * @return string
	 */
	public function call_contextual_help( $content ) {
		$help = '';
		$help .= $this->meta_box_page->get_ob_callback( array( $this, 'call_box_about' ) );
		return $help . $content;
	}

	/**
	 * Add icon to page title
	 * @return string
	 */
	public function call_page_title( $title ) {
		// when updated set the update message
		if ( isset($_GET[ 'settings-updated' ]) && $_GET[ 'settings-updated' ] == 'true' ) {
			$title .= '<div class="updated settings-error" id="setting-error-settings_updated">'
				. '<p><strong>' . __( 'Settings saved.' ) .'</strong></p>'
				. '</div>';
		}

		$title = '<div class="icon32" id="icon-options-custom" style="background:url( '. plugins_url( 'images/icon-wp-external-links-32.png', WP_EXTERNAL_LINKS_FILE ) .' ) no-repeat 50% 50%"><br></div>'
				. $title;

		return $title;
	}

	/**
	 * Meta Box: General Settings
	 */
	public function call_box_general_settings() {
		echo $this->form->set_current_option( 'main' )->open_form();
?>
		<fieldset class="options">
			<table class="form-table">
			<tr>
				<th style="width:250px;"><?php $this->_e( 'Open external links in...' ) ?>
						<?php echo $this->tooltip_help( 'Specify the target (window or tab) for opening external links.' ) ?></th>
				<td class="target_external_links">
					<label><?php echo $this->form->radio( 'target', '_none', array( 'class' => 'field_target' ) ); ?>
						<span><?php $this->_e( 'Same window or tab (<code>_none</code>)' ) ?></span></label>
						<?php echo $this->tooltip_help( 'Open in current window or tab, when framed in the same frame.' ) ?>
					<br/>
					<label><?php echo $this->form->radio( 'target', '_blank', array( 'class' => 'field_target' ) ); ?>
						<span><?php $this->_e( 'New window or tab (<code>_blank</code>)' ) ?></span></label>
						<?php echo $this->tooltip_help( 'Open every external link in a new window or tab.' ) ?>
					<br  style="margin-bottom:15px;" />
					<label><?php echo $this->form->radio( 'target', '_top', array( 'class' => 'field_target' ) ); ?>
						<span><?php $this->_e( 'Topmost frame (<code>_top</code>)' ) ?></span></label>
						<?php echo $this->tooltip_help( 'Open in current window or tab, when framed in the topmost frame.' ) ?>
					<br/>
					<label><?php echo $this->form->radio( 'target', '_new', array( 'class' => 'field_target' ) ); ?>
						<span><?php $this->_e( 'Seperate window or tab (<code>_new</code>)' ) ?></span></label>
						<?php echo $this->tooltip_help( 'Open new window the first time and use this window for each external link.' ) ?>
				</td>
			</tr>
			<tr>
				<th style="width:250px;"><?php $this->_e( 'Apply plugin settings on...' ) ?>
						<?php echo $this->tooltip_help( 'Choose contents for applying settings to external links.' ) ?></th>
				<td>
					<label><?php echo $this->form->checkbox( 'filter_page', 1 ); ?>
					<span><?php $this->_e( 'All contents' ) ?></span> <span class="description"><?php $this->_e('(the whole <code>&lt;body&gt;</code>)') ?></span></label>
					<br/>&nbsp;&nbsp;&nbsp;<label><?php echo $this->form->checkbox( 'filter_posts', 1 ); ?>
							<span><?php $this->_e( 'Post contents' ) ?></span></label>
					<br/>&nbsp;&nbsp;&nbsp;<label><?php echo $this->form->checkbox( 'filter_comments', 1 ); ?>
							<span><?php $this->_e( 'Comments' ) ?></span></label>
					<br/>&nbsp;&nbsp;&nbsp;<label><?php echo $this->form->checkbox( 'filter_widgets', 1 ); ?>
							<span><?php
								if ( self::check_widget_content_filter() ):
									$this->_e( 'All widgets' );
									echo $this->tooltip_help( 'Applied to all widgets by using the "widget_content" filter of the Widget Logic plugin' );
								else:
									$this->_e( 'All text widgets' );
									echo $this->tooltip_help( 'Only the text widget will be applied. To apply to all widget you should select "All contents" option.' );
								endif;
							?></span></label>
				</td>
			</tr>
			<tr>
				<th><?php $this->_e( 'Ignore links (URL) containing...' ) ?>
					<?php echo $this->tooltip_help( 'This plugin will completely ignore links that contain one of the given texts in the URL. Use enter to seperate each text. This check is not case sensitive.' ) ?></th>
				<td><label><?php echo $this->form->textarea( 'ignore' ); ?>
						<span class="description"><?php _e( 'Be as specific as you want, f.e.: <code>twitter.com</code> or <code>https://twitter.com</code>. Seperate each by an enter.' ) ?></span></label>
				</td>
			</tr>
			<tr>
				<th style="width:250px;"><?php $this->_e( 'Make subdomains internal' ) ?>
						<?php echo $this->tooltip_help( 'Threat all links to the site\'s domain and subdomains as internal links.' ) ?></th>
				<td>
					<label><?php echo $this->form->checkbox( 'ignore_subdomains', 1 ); ?>
					<span><?php $this->_e( 'Threat all links to the site\'s domain and subdomains as internal links' ) ?></span></label>
				</td>
			</tr>
			</table>
		</fieldset>

<?php
		echo $this->form->submit();
		echo $this->form->close_form();
	}

	/**
	 * Meta Box: SEO Settings
	 */
	public function call_box_seo_settings() {
		echo $this->form->set_current_option( 'seo' )->open_form();
?>
		<fieldset class="options">
			<table class="form-table">
			<tr>
				<th style="width:250px;"><?php $this->_e( 'Add to <code>rel</code>-attribute' ) ?>
						<?php echo $this->tooltip_help( 'Set values for the "rel"-atribute of external links.' ) ?></th>
				<td><label><?php echo $this->form->checkbox( 'nofollow', 1 ); ?>
						<span><?php $this->_e( 'Add <code>"nofollow"</code> to external links' ) ?></span></label>
						<?php echo $this->tooltip_help( 'Add "nofollow" to the "rel"-attribute of external links (unless link already has "follow").' ) ?>
					<br/>&nbsp;&nbsp;&nbsp;<label><?php echo $this->form->checkbox( 'overwrite_follow', 1 ); ?>
						<span><?php $this->_e( 'Also apply to external links containing <code>"follow"</code>' ) ?></span></label>
						<?php echo $this->tooltip_help( 'Also change external links with "follow" to "nofollow".' ) ?>

                    <br/><br/>
{'fraction_non_alphanumeric': 0.1880907765979596, 'fraction_numerical': 0.0125754736622944, 'mean_word_length': 3.606944178016497, 'pattern_counts': {'":': 0, '<': 346, '<?xml version=': 0, '>': 615, 'https://': 2, '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': '3091602', 'n_tokens_mistral': 9564, 'n_tokens_neox': 8218, 'n_words': 2023}