コード例 #1
0
ファイル: image.vars.php プロジェクト: brkrishna/freelance
/**
 * Pre-processes variables for the "image" theme hook.
 *
 * See theme function for list of available variables.
 *
 * @see theme_image()
 *
 * @ingroup theme_preprocess
 */
function bootstrap_preprocess_image(&$variables)
{
    // Add image shape, if necessary.
    if ($shape = bootstrap_setting('image_shape')) {
        _bootstrap_add_class($shape, $variables);
    }
    // Add responsiveness, if necessary.
    if (bootstrap_setting('image_responsive')) {
        _bootstrap_add_class('img-responsive', $variables);
    }
}
コード例 #2
0
/**
 * Implements hook_form_FORM_ID_alter().
 */
function bootstrap_subtheme_form_api_search_form_alter(&$form, &$form_state)
{
    _bootstrap_add_class('navbar-form', $form);
    _bootstrap_add_class('navbar-right', $form);
    _bootstrap_add_class('col-sm-3', $form);
    $form['search']['#attributes']['placeholder'] = $form['search']['#title'];
    $form['search']['#input_group_button'] = TRUE;
    $form['search']['#maxlength'] = NULL;
    $form['search']['#size'] = 25;
    $form['search']['#title_display'] = 'invisible';
}