Code for longer string in the drupal site slogan

  $form['site_slogan'] = array(
    '#type' => 'textfield',
    '#title' => t('Slogan'),
    '#default_value' => variable_get('site_slogan', ''),
    '#maxlength' => 340,
    '#description' => t("Your site's motto, tag line, or catchphrase (often displayed alongside the title of the site).")

In the modules- system system.admin.inc add the maxlength