LLMS_Emails::get_css( string $rule = '', boolean $echo = true )
Get css rules specific to the the email templates
Parameters Parameters
- $rule
-
(string) (Optional) Name of the css rule. Default is empty string. If not provided an empty string will be returned/echoed.
Default value: ''
- $echo
-
(boolean) (Optional) If true, echo the definition. Default is
true
.Default value: true
Return Return
(string)
Source Source
File: includes/class.llms.emails.php
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | public function get_css( $rule = '' , $echo = true ) { if ( empty ( $rule ) ) { return '' ; } /** * Filters the default email CSS rules * * @since 3.8.0 * * @param array $email_css Associative array of the type css-property => definition. */ $css = apply_filters( 'llms_email_css' , array ( 'background-color' => '#f6f6f6' , 'border-radius' => '3px' , 'button-background-color' => '#2295ff' , 'button-font-color' => '#ffffff' , 'divider-color' => '#cecece' , 'font-color' => '#222222' , 'font-family' => 'sans-serif' , 'font-size' => '15px' , 'font-size-small' => '13px' , 'heading-background-color' => '#2295ff' , 'heading-font-color' => '#ffffff' , 'main-color' => '#2295ff' , 'max-width' => '580px' , ) ); if ( isset( $css [ $rule ] ) ) { if ( $echo ) { echo $css [ $rule ]; } return $css [ $rule ]; } } |
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.2.0 | Early bail if no rule is provided. |
3.8.0 | Introduced. |