diff --git a/amp.admin.inc b/amp.admin.inc index cd9d1f9..268f88d 100644 --- a/amp.admin.inc +++ b/amp.admin.inc @@ -9,6 +9,7 @@ * Form constructor for the AMP administration form. * * @ingroup forms + * * @see amp_admin_form_validate() * @see amp_admin_form_submit() */ @@ -33,7 +34,10 @@ function amp_admin_form($form, &$form_state) { '#default_value' => variable_get('amp_google_analytics_id'), '#size' => 15, '#maxlength' => 20, - '#description' => t('This ID is unique to each site you want to track separately, and is in the form of UA-xxxxxxx-yy. To get a Web Property ID, register your site with Google Analytics, or if you already have registered your site, go to your Google Analytics Settings page to see the ID next to every site profile. Find more information in the documentation.', array('@analytics' => 'http://www.google.com/analytics/', '@webpropertyid' => url('https://developers.google.com/analytics/resources/concepts/gaConceptsAccounts', array('fragment' => 'webProperty')))), + '#description' => t('This ID is unique to each site you want to track separately, and is in the form of UA-xxxxxxx-yy. To get a Web Property ID, register your site with Google Analytics, or if you already have registered your site, go to your Google Analytics Settings page to see the ID next to every site profile. Find more information in the documentation.', array( + '@analytics' => 'http://www.google.com/analytics/', + '@webpropertyid' => url('https://developers.google.com/analytics/resources/concepts/gaConceptsAccounts', array('fragment' => 'webProperty')) + )), ); $form['amp_google_adsense_id'] = array( '#type' => 'textfield', @@ -66,8 +70,10 @@ function amp_admin_form($form, &$form_state) { '#title' => t('amp-pixel domain name'), '#default_value' => variable_get('amp_pixel_domain_name'), '#description' => t('The domain name where the tracking pixel will be loaded: do not include http or https.'), - '#states' => array('visible' => array( - ':input[name="amp_pixel"]' => array('checked' => TRUE)) + '#states' => array( + 'visible' => array( + ':input[name="amp_pixel"]' => array('checked' => TRUE) + ) ), ); $form['pixel_group']['amp_pixel_query_string'] = array( @@ -75,8 +81,10 @@ function amp_admin_form($form, &$form_state) { '#title' => t('amp-pixel query path'), '#default_value' => variable_get('amp_pixel_query_string'), '#description' => t('The path at the domain where the GET request will be received, e.g. "pixel" in example.com/pixel?RANDOM.'), - '#states' => array('visible' => array( - ':input[name="amp_pixel"]' => array('checked' => TRUE)) + '#states' => array( + 'visible' => array( + ':input[name="amp_pixel"]' => array('checked' => TRUE) + ) ), ); $form['pixel_group']['amp_pixel_random_number'] = array( @@ -84,8 +92,10 @@ function amp_admin_form($form, &$form_state) { '#title' => t('Random number'), '#default_value' => variable_get('amp_pixel_random_number'), '#description' => t('Use the special string RANDOM to add a random number to the URL if required. Find more information in the amp-pixel documentation.'), - '#states' => array('visible' => array( - ':input[name="amp_pixel"]' => array('checked' => TRUE)) + '#states' => array( + 'visible' => array( + ':input[name="amp_pixel"]' => array('checked' => TRUE) + ) ), ); @@ -102,26 +112,23 @@ function amp_admin_form($form, &$form_state) { $form['amp_library']['amp_library_warnings_display'] = array( '#type' => 'checkbox', '#title' => t('Debugging: Show AMP PHP library warnings in all amp text formatters for all users'), - '#default_value' => variable_get('amp_library_warnings_display', false), - '#description' => t('