/**
  * Create a test input field
  *
  * @covers Yoast_GA_Admin_Form:input()
  */
 public function test_input()
 {
     Yoast_GA_Admin_Form::create_form('phpunit');
     $output = null;
     $output .= '<div class="ga-form ga-form-input">';
     $output .= '<input type="text" id="yoast-ga-form-text-phpunit-" name="" class="ga-form ga-form-text " value="" />';
     $output .= '</div>';
     $this->assertEquals(Yoast_GA_Admin_Form::input('text'), $output);
 }
コード例 #2
0
ファイル: settings.php プロジェクト: StefanBonilla/CoupSoup
		<?php 
echo '<h2>' . __('Custom dimensions', 'google-analytics-for-wordpress') . '</h2>';
do_action('yst_ga_custom_dimensions_tab-content');
?>
	</div>
	<?php 
do_action('yst_ga_custom_tabs-content');
?>
	<div id="debugmode" class="gatab">
		<?php 
echo '<h2>' . __('Debug', 'google-analytics-for-wordpress') . '</h2>';
echo '<div id="ga-promote">';
echo '<p class="ga-topdescription">' . __('If you want to confirm that tracking on your blog is working as it should, enable this option and check the console of your browser. Be absolutely sure to disable debugging afterwards, as it is slower than normal tracking.', 'google-analytics-for-wordpress') . '</p>';
echo '<p class="ga-topdescription">' . __('<strong>Note</strong> the debugging is only loaded for administrators.', 'google-analytics-for-wordpress') . '</p>';
echo '</div>';
echo Yoast_GA_Admin_Form::input('checkbox', __('Enable debug mode', 'google-analytics-for-wordpress'), 'debug_mode');
?>
	</div>
</div>
<?php 
echo Yoast_GA_Admin_Form::end_form(__('Save changes', 'google-analytics-for-wordpress'), 'settings', 'yst_closepopupwindow();');
echo $yoast_ga_admin->content_footer();
?>
<script type="text/javascript">
	jQuery(document).ready(
		function () {
			jQuery('#yoast-ga-form-select-settings-analytics_profile').chosen({
				group_search: true
			});
			jQuery('#yoast-ga-form-select-settings-ignore_users').chosen({placeholder_text_multiple: '<?php 
echo __('Select the users to ignore', 'google-analytics-for-wordpress');
コード例 #3
0
<?php

/**
 * @package GoogleAnalytics\Premium
 */
?>
<div id="custommetrics" class="gatab">
<?php 
echo '<h2>' . __('Custom Metrics', 'ga-premium') . '</h2>';
/** translators: %1$s / %2$s: links to an article about setting up the code to track your AdSense sites in Analytics  on google.com */
$integration_required = sprintf(__('This requires integration of your Analytics and AdSense account. For how to do this, see %1$sthis help page%2$s.', 'ga-premium'), '<a href="https://support.google.com/adsense/answer/94743?ref_topic=23415&hl=' . get_locale() . '" target="_blank">', '</a>');
// Showing checkbox for enabling/disabling adsense tracking
echo Yoast_GA_Admin_Form::input('checkbox', __('Google Metrics', 'ga-premium'), 'track_adsense', null, $integration_required);
?>
</div>
コード例 #4
0
 /**
  * Get the render adsense option for the dashboard.
  *
  * @return string
  */
 protected function render_adsense_tracking()
 {
     /** translators: %1$s / %2$s: links to an article about setting up the code to track your AdSense sites in Google Analytics on google.com */
     $adsense_help = sprintf(__('This requires integration of your Analytics and AdSense account, for help, %1$slook here%2$s.', 'ga-premium'), '<a href="https://support.google.com/adsense/answer/94743?&ref_topic=23415?hl=' . get_locale() . '" target="_blank">', '</a>');
     return Yoast_GA_Admin_Form::input('checkbox', __('Google Adsense tracking', 'ga-premium'), 'track_adsense', null, $adsense_help);
 }