public static function display_settings_field_secret_key($args)
 {
     if (defined('EASYAZON_SECRET_KEY')) {
         printf('<p class="description">%s</p>', __('You have defined this value in your <code>wp-config.php</code> file with the <code>EASYAZON_SECRET_KEY</code> constant'));
     } else {
         printf('<input type="text" class="code large-text" id="%s" name="%s" value="%s" />', esc_attr(easyazon_get_setting_field_id('secret_key')), esc_attr(easyazon_get_setting_field_name('secret_key')), esc_attr(easyazon_get_setting('secret_key', '')));
     }
 }
Example #2
0
 public static function display_settings_field_default_search_locale($args)
 {
     $options = array();
     $default = easyazon_get_setting('default_search_locale');
     $locales = easyazon_get_locales();
     foreach ($locales as $locale => $locale_name) {
         $options[] = sprintf('<option %s value="%s">%s</option>', $default === $locale ? 'selected="selected"' : '', esc_attr($locale), esc_html($locale_name));
     }
     printf('<select id="%s" name="%s">%s</select>', easyazon_get_setting_field_id('default_search_locale'), easyazon_get_setting_field_name('default_search_locale'), implode('', $options));
 }
 public static function display_settings_field_associates_us($args)
 {
     printf('<input type="text" class="code regular-text" id="%s" name="%s" value="%s" /> <a href="%s" target="_blank">%s</a>', esc_attr(easyazon_get_setting_field_id('associates_us')), esc_attr(easyazon_get_setting_field_name('associates_us')), esc_attr(easyazon_get_setting('associates_us')), easyazon_get_locale_associate_signup_url('US'), __('Sign up'));
     printf('<p class="description">%s</p>', __('(i.e. yourtrackingid-20'));
 }
Example #4
0
 public static function display_settings_field_link_nf($args)
 {
     printf('<input type="hidden" name="%s" value="no" />', easyazon_get_setting_field_name('link_nf'));
     printf('<label><input type="checkbox" %s id="%s" name="%s" value="y" /> %s</label>', 'y' === easyazon_get_setting('link_nf') ? 'checked="checked"' : '', easyazon_get_setting_field_id('link_nf'), easyazon_get_setting_field_name('link_nf'), __('I want the <code>nofollow</code> attribute applied to EasyAzon links by default'));
 }