← All changes
|
admin/views/sp-framework/fields/background_adv/background_adv.php
+54
-59
2.4.10
→
2.2.10
View file →
| @@ -33,9 +33,9 @@ | ||
| 33 | 33 | 'background_image_preview' => true, |
| 34 | 34 | 'preview' => true, |
| 35 | 35 | 'preview_text' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
| 36 | 36 | 'background_image_library' => 'image', |
| 37 | - 'background_image_placeholder' => esc_html__( 'No background selected', 'post-carousel' ), | |
| 37 | + 'background_image_placeholder' => esc_html__( 'No background selected', 'smart-post-show' ), | |
| 38 | 38 | ) |
| 39 | 39 | ); |
| 40 | 40 | |
| 41 | 41 | $default_value = array( |
| @@ -55,9 +55,9 @@ | ||
| 55 | 55 | $default_value = ( ! empty( $this->field['default'] ) ) ? wp_parse_args( $this->field['default'], $default_value ) : $default_value; |
| 56 | 56 | |
| 57 | 57 | $this->value = wp_parse_args( $this->value, $default_value ); |
| 58 | 58 | |
| 59 | - echo wp_kses_post( $this->field_before() ); | |
| 59 | + echo $this->field_before(); | |
| 60 | 60 | |
| 61 | 61 | echo '<div class="spf--blocks">'; |
| 62 | 62 | // |
| 63 | 63 | // Background Color. |
| @@ -63,9 +63,9 @@ | ||
| 63 | 63 | // Background Color. |
| 64 | 64 | if ( ! empty( $args['background_color'] ) ) { |
| 65 | 65 | |
| 66 | 66 | echo '<div class="spf--block">'; |
| 67 | - echo ( ! empty( $args['background_gradient'] ) ) ? '<div class="spf--title">' . esc_html__( 'From', 'post-carousel' ) . '</div>' : ''; | |
| 67 | + echo ( ! empty( $args['background_gradient'] ) ) ? '<div class="spf--title">' . esc_html__( 'From', 'smart-post-show' ) . '</div>' : ''; | |
| 68 | 68 | |
| 69 | 69 | SP_PC::field( |
| 70 | 70 | array( |
| 71 | 71 | 'id' => 'background-color', |
| @@ -85,9 +85,9 @@ | ||
| 85 | 85 | // Background Gradient Color. |
| 86 | 86 | if ( ! empty( $args['background_gradient_color'] ) && ! empty( $args['background_gradient'] ) ) { |
| 87 | 87 | |
| 88 | 88 | echo '<div class="spf--block">'; |
| 89 | - echo ( ! empty( $args['background_gradient'] ) ) ? '<div class="spf--title">' . esc_html__( 'To', 'post-carousel' ) . '</div>' : ''; | |
| 89 | + echo ( ! empty( $args['background_gradient'] ) ) ? '<div class="spf--title">' . esc_html__( 'To', 'smart-post-show' ) . '</div>' : ''; | |
| 90 | 90 | |
| 91 | 91 | SP_PC::field( |
| 92 | 92 | array( |
| 93 | 93 | 'id' => 'background-gradient-color', |
| @@ -107,9 +107,9 @@ | ||
| 107 | 107 | // Background Gradient Direction. |
| 108 | 108 | if ( ! empty( $args['background_gradient_direction'] ) && ! empty( $args['background_gradient'] ) ) { |
| 109 | 109 | |
| 110 | 110 | echo '<div class="spf--block spf--gradient">'; |
| 111 | - echo ( ! empty( $args['background_gradient'] ) ) ? '<div class="spf--title">' . esc_html__( 'Direction', 'post-carousel' ) . '</div>' : ''; | |
| 111 | + echo ( ! empty( $args['background_gradient'] ) ) ? '<div class="spf--title">' . esc_html__( 'Direction', 'smart-post-show' ) . '</div>' : ''; | |
| 112 | 112 | |
| 113 | 113 | SP_PC::field( |
| 114 | 114 | array( |
| 115 | 115 | 'id' => 'background-gradient-direction', |
| @@ -114,13 +114,13 @@ | ||
| 114 | 114 | array( |
| 115 | 115 | 'id' => 'background-gradient-direction', |
| 116 | 116 | 'type' => 'select', |
| 117 | 117 | 'options' => array( |
| 118 | - '' => esc_html__( 'Gradient Direction', 'post-carousel' ), | |
| 119 | - 'to bottom' => esc_html__( '⇓ top to bottom', 'post-carousel' ), | |
| 120 | - 'to right' => esc_html__( '⇒ left to right', 'post-carousel' ), | |
| 121 | - '135deg' => esc_html__( '⇘ corner top to right', 'post-carousel' ), | |
| 122 | - '-135deg' => esc_html__( '⇙ corner top to left', 'post-carousel' ), | |
| 118 | + '' => esc_html__( 'Gradient Direction', 'smart-post-show' ), | |
| 119 | + 'to bottom' => esc_html__( '⇓ top to bottom', 'smart-post-show' ), | |
| 120 | + 'to right' => esc_html__( '⇒ left to right', 'smart-post-show' ), | |
| 121 | + '135deg' => esc_html__( '⇘ corner top to right', 'smart-post-show' ), | |
| 122 | + '-135deg' => esc_html__( '⇙ corner top to left', 'smart-post-show' ), | |
| 123 | 123 | ), |
| 124 | 124 | ), |
| 125 | 125 | $this->value['background-gradient-direction'], |
| 126 | 126 | $this->field_name(), |
| @@ -168,18 +168,18 @@ | ||
| 168 | 168 | array( |
| 169 | 169 | 'id' => 'background-position', |
| 170 | 170 | 'type' => 'select', |
| 171 | 171 | 'options' => array( |
| 172 | - '' => esc_html__( 'Background Position', 'post-carousel' ), | |
| 173 | - 'left top' => esc_html__( 'Left Top', 'post-carousel' ), | |
| 174 | - 'left center' => esc_html__( 'Left Center', 'post-carousel' ), | |
| 175 | - 'left bottom' => esc_html__( 'Left Bottom', 'post-carousel' ), | |
| 176 | - 'center top' => esc_html__( 'Center Top', 'post-carousel' ), | |
| 177 | - 'center center' => esc_html__( 'Center Center', 'post-carousel' ), | |
| 178 | - 'center bottom' => esc_html__( 'Center Bottom', 'post-carousel' ), | |
| 179 | - 'right top' => esc_html__( 'Right Top', 'post-carousel' ), | |
| 180 | - 'right center' => esc_html__( 'Right Center', 'post-carousel' ), | |
| 181 | - 'right bottom' => esc_html__( 'Right Bottom', 'post-carousel' ), | |
| 172 | + '' => esc_html__( 'Background Position', 'smart-post-show' ), | |
| 173 | + 'left top' => esc_html__( 'Left Top', 'smart-post-show' ), | |
| 174 | + 'left center' => esc_html__( 'Left Center', 'smart-post-show' ), | |
| 175 | + 'left bottom' => esc_html__( 'Left Bottom', 'smart-post-show' ), | |
| 176 | + 'center top' => esc_html__( 'Center Top', 'smart-post-show' ), | |
| 177 | + 'center center' => esc_html__( 'Center Center', 'smart-post-show' ), | |
| 178 | + 'center bottom' => esc_html__( 'Center Bottom', 'smart-post-show' ), | |
| 179 | + 'right top' => esc_html__( 'Right Top', 'smart-post-show' ), | |
| 180 | + 'right center' => esc_html__( 'Right Center', 'smart-post-show' ), | |
| 181 | + 'right bottom' => esc_html__( 'Right Bottom', 'smart-post-show' ), | |
| 182 | 182 | ), |
| 183 | 183 | ), |
| 184 | 184 | $this->value['background-position'], |
| 185 | 185 | $this->field_name(), |
| @@ -199,13 +199,13 @@ | ||
| 199 | 199 | array( |
| 200 | 200 | 'id' => 'background-repeat', |
| 201 | 201 | 'type' => 'select', |
| 202 | 202 | 'options' => array( |
| 203 | - '' => esc_html__( 'Background Repeat', 'post-carousel' ), | |
| 204 | - 'repeat' => esc_html__( 'Repeat', 'post-carousel' ), | |
| 205 | - 'no-repeat' => esc_html__( 'No Repeat', 'post-carousel' ), | |
| 206 | - 'repeat-x' => esc_html__( 'Repeat Horizontally', 'post-carousel' ), | |
| 207 | - 'repeat-y' => esc_html__( 'Repeat Vertically', 'post-carousel' ), | |
| 203 | + '' => esc_html__( 'Background Repeat', 'smart-post-show' ), | |
| 204 | + 'repeat' => esc_html__( 'Repeat', 'smart-post-show' ), | |
| 205 | + 'no-repeat' => esc_html__( 'No Repeat', 'smart-post-show' ), | |
| 206 | + 'repeat-x' => esc_html__( 'Repeat Horizontally', 'smart-post-show' ), | |
| 207 | + 'repeat-y' => esc_html__( 'Repeat Vertically', 'smart-post-show' ), | |
| 208 | 208 | ), |
| 209 | 209 | ), |
| 210 | 210 | $this->value['background-repeat'], |
| 211 | 211 | $this->field_name(), |
| @@ -225,11 +225,11 @@ | ||
| 225 | 225 | array( |
| 226 | 226 | 'id' => 'background-attachment', |
| 227 | 227 | 'type' => 'select', |
| 228 | 228 | 'options' => array( |
| 229 | - '' => esc_html__( 'Background Attachment', 'post-carousel' ), | |
| 230 | - 'scroll' => esc_html__( 'Scroll', 'post-carousel' ), | |
| 231 | - 'fixed' => esc_html__( 'Fixed', 'post-carousel' ), | |
| 229 | + '' => esc_html__( 'Background Attachment', 'smart-post-show' ), | |
| 230 | + 'scroll' => esc_html__( 'Scroll', 'smart-post-show' ), | |
| 231 | + 'fixed' => esc_html__( 'Fixed', 'smart-post-show' ), | |
| 232 | 232 | ), |
| 233 | 233 | ), |
| 234 | 234 | $this->value['background-attachment'], |
| 235 | 235 | $this->field_name(), |
| @@ -249,11 +249,11 @@ | ||
| 249 | 249 | array( |
| 250 | 250 | 'id' => 'background-size', |
| 251 | 251 | 'type' => 'select', |
| 252 | 252 | 'options' => array( |
| 253 | - '' => esc_html__( 'Background Size', 'post-carousel' ), | |
| 254 | - 'cover' => esc_html__( 'Cover', 'post-carousel' ), | |
| 255 | - 'contain' => esc_html__( 'Contain', 'post-carousel' ), | |
| 253 | + '' => esc_html__( 'Background Size', 'smart-post-show' ), | |
| 254 | + 'cover' => esc_html__( 'Cover', 'smart-post-show' ), | |
| 255 | + 'contain' => esc_html__( 'Contain', 'smart-post-show' ), | |
| 256 | 256 | ), |
| 257 | 257 | ), |
| 258 | 258 | $this->value['background-size'], |
| 259 | 259 | $this->field_name(), |
| @@ -273,12 +273,12 @@ | ||
| 273 | 273 | array( |
| 274 | 274 | 'id' => 'background-origin', |
| 275 | 275 | 'type' => 'select', |
| 276 | 276 | 'options' => array( |
| 277 | - '' => esc_html__( 'Background Origin', 'post-carousel' ), | |
| 278 | - 'padding-box' => esc_html__( 'Padding Box', 'post-carousel' ), | |
| 279 | - 'border-box' => esc_html__( 'Border Box', 'post-carousel' ), | |
| 280 | - 'content-box' => esc_html__( 'Content Box', 'post-carousel' ), | |
| 277 | + '' => esc_html__( 'Background Origin', 'smart-post-show' ), | |
| 278 | + 'padding-box' => esc_html__( 'Padding Box', 'smart-post-show' ), | |
| 279 | + 'border-box' => esc_html__( 'Border Box', 'smart-post-show' ), | |
| 280 | + 'content-box' => esc_html__( 'Content Box', 'smart-post-show' ), | |
| 281 | 281 | ), |
| 282 | 282 | ), |
| 283 | 283 | $this->value['background-origin'], |
| 284 | 284 | $this->field_name(), |
| @@ -298,12 +298,12 @@ | ||
| 298 | 298 | array( |
| 299 | 299 | 'id' => 'background-clip', |
| 300 | 300 | 'type' => 'select', |
| 301 | 301 | 'options' => array( |
| 302 | - '' => esc_html__( 'Background Clip', 'post-carousel' ), | |
| 303 | - 'border-box' => esc_html__( 'Border Box', 'post-carousel' ), | |
| 304 | - 'padding-box' => esc_html__( 'Padding Box', 'post-carousel' ), | |
| 305 | - 'content-box' => esc_html__( 'Content Box', 'post-carousel' ), | |
| 302 | + '' => esc_html__( 'Background Clip', 'smart-post-show' ), | |
| 303 | + 'border-box' => esc_html__( 'Border Box', 'smart-post-show' ), | |
| 304 | + 'padding-box' => esc_html__( 'Padding Box', 'smart-post-show' ), | |
| 305 | + 'content-box' => esc_html__( 'Content Box', 'smart-post-show' ), | |
| 306 | 306 | ), |
| 307 | 307 | ), |
| 308 | 308 | $this->value['background-clip'], |
| 309 | 309 | $this->field_name(), |
| @@ -323,19 +323,19 @@ | ||
| 323 | 323 | array( |
| 324 | 324 | 'id' => 'background-blend-mode', |
| 325 | 325 | 'type' => 'select', |
| 326 | 326 | 'options' => array( |
| 327 | - '' => esc_html__( 'Background Blend Mode', 'post-carousel' ), | |
| 328 | - 'normal' => esc_html__( 'Normal', 'post-carousel' ), | |
| 329 | - 'multiply' => esc_html__( 'Multiply', 'post-carousel' ), | |
| 330 | - 'screen' => esc_html__( 'Screen', 'post-carousel' ), | |
| 331 | - 'overlay' => esc_html__( 'Overlay', 'post-carousel' ), | |
| 332 | - 'darken' => esc_html__( 'Darken', 'post-carousel' ), | |
| 333 | - 'lighten' => esc_html__( 'Lighten', 'post-carousel' ), | |
| 334 | - 'color-dodge' => esc_html__( 'Color Dodge', 'post-carousel' ), | |
| 335 | - 'saturation' => esc_html__( 'Saturation', 'post-carousel' ), | |
| 336 | - 'color' => esc_html__( 'Color', 'post-carousel' ), | |
| 337 | - 'luminosity' => esc_html__( 'Luminosity', 'post-carousel' ), | |
| 327 | + '' => esc_html__( 'Background Blend Mode', 'smart-post-show' ), | |
| 328 | + 'normal' => esc_html__( 'Normal', 'smart-post-show' ), | |
| 329 | + 'multiply' => esc_html__( 'Multiply', 'smart-post-show' ), | |
| 330 | + 'screen' => esc_html__( 'Screen', 'smart-post-show' ), | |
| 331 | + 'overlay' => esc_html__( 'Overlay', 'smart-post-show' ), | |
| 332 | + 'darken' => esc_html__( 'Darken', 'smart-post-show' ), | |
| 333 | + 'lighten' => esc_html__( 'Lighten', 'smart-post-show' ), | |
| 334 | + 'color-dodge' => esc_html__( 'Color Dodge', 'smart-post-show' ), | |
| 335 | + 'saturation' => esc_html__( 'Saturation', 'smart-post-show' ), | |
| 336 | + 'color' => esc_html__( 'Color', 'smart-post-show' ), | |
| 337 | + 'luminosity' => esc_html__( 'Luminosity', 'smart-post-show' ), | |
| 338 | 338 | ), |
| 339 | 339 | ), |
| 340 | 340 | $this->value['background-blend-mode'], |
| 341 | 341 | $this->field_name(), |
| @@ -349,25 +349,20 @@ | ||
| 349 | 349 | echo '<div class="clear"></div>'; |
| 350 | 350 | |
| 351 | 351 | // |
| 352 | 352 | // Preview. |
| 353 | - $always_preview = ( 'always' !== $args['preview'] ) ? ' hidden' : ''; | |
| 353 | + $always_preview = ( $args['preview'] !== 'always' ) ? ' hidden' : ''; | |
| 354 | 354 | |
| 355 | 355 | if ( ! empty( $args['preview'] ) ) { |
| 356 | - echo '<div class="spf--block spf--block-preview' . esc_attr( $always_preview ) . '">'; | |
| 357 | - echo '<div class="spf--preview">' . esc_html( $args['preview_text'] ) . '</div>'; | |
| 356 | + echo '<div class="spf--block spf--block-preview' . $always_preview . '">'; | |
| 357 | + echo '<div class="spf--preview">' . $args['preview_text'] . '</div>'; | |
| 358 | 358 | echo '</div>'; |
| 359 | 359 | } |
| 360 | 360 | echo '<div class="clear"></div>'; |
| 361 | - echo wp_kses_post( $this->field_after() ); | |
| 361 | + echo $this->field_after(); | |
| 362 | 362 | |
| 363 | 363 | } |
| 364 | 364 | |
| 365 | - /** | |
| 366 | - * The field output. | |
| 367 | - * | |
| 368 | - * @return mixedx | |
| 369 | - */ | |
| 370 | 365 | public function output() { |
| 371 | 366 | |
| 372 | 367 | $output = ''; |
| 373 | 368 | $bg_image = array(); |