LLMS_Emails::get_button_style()

Get a string of inline CSS to add to an email button


Description Description

Use {button_style} merge code to output in HTML emails.


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/class.llms.emails.php

70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
public function get_button_style() {
    /**
     * Filters the default email button CSS rules
     *
     * @since 3.8.0
     *
     * @param array $email_button_css Associative array of the type css-property => definition.
     */
    $rules  = apply_filters(
        'llms_email_button_css',
        array(
            'background-color' => $this->get_css( 'button-background-color', false ),
            'color'            => $this->get_css( 'button-font-color', false ),
            'display'          => 'inline-block',
            'padding'          => '10px 15px',
            'text-decoration'  => 'none',
        )
    );
    $styles = '';
    foreach ( $rules as $rule => $style ) {
        $styles .= sprintf( '%1$s:%2$s !important;', $rule, $style );
    }
    return $styles;
}


Top ↑

Changelog Changelog

Changelog
Version Description
3.8.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.