Elementor Essential Addons - Version 2.7.5

Version Description

  • (Make sure to clear cache nad hrad refresh the page after update)
  • Post elements improved and optimized
  • Info Box element improved
  • Flip Box element improved
  • Few minor bugfix and improvements

=

Download this release

Release Info

Developer re_enter_rupok
Plugin Icon 128x128 Elementor Essential Addons
Version 2.7.5
Comparing to
See all releases

Code changes from version 2.7.4 to 2.7.5

admin/assets/images/icon-bolt.svg ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="icon-bolt" x="0px" y="0px" viewBox="0 0 64 64" style="enable-background:new 0 0 64 64;" xml:space="preserve">
2
+ <linearGradient id="SVGID_1__52550" gradientUnits="userSpaceOnUse" x1="32" y1="5.625" x2="32" y2="59.1799" spreadMethod="reflect">
3
+ <stop offset="0" style="stop-color:#1A6DFF"></stop>
4
+ <stop offset="1" style="stop-color:#C822FF"></stop>
5
+ </linearGradient>
6
+ <path style="fill:url(#SVGID_1__52550);" d="M24.028,58h-1.963c-0.688,0-1.318-0.347-1.688-0.927c-0.369-0.582-0.416-1.302-0.123-1.926 L27.011,40H15.999c-1.188,0-2.232-0.673-2.726-1.757c-0.494-1.086-0.313-2.32,0.471-3.219L38.468,6.684 C38.848,6.249,39.396,6,39.971,6h1.964c0.687,0,1.316,0.346,1.686,0.926c0.371,0.581,0.417,1.302,0.126,1.926L36.667,24h11.335 c1.188,0,2.232,0.673,2.726,1.757c0.494,1.086,0.313,2.32-0.471,3.219L25.531,57.316C25.153,57.75,24.605,58,24.028,58z M39.971,8 l-24.72,28.339c-0.395,0.452-0.221,0.938-0.157,1.077C15.157,37.553,15.406,38,15.999,38h14.095l-8.021,17.979L24.028,56 l24.721-28.339c0.395-0.452,0.221-0.938,0.157-1.077C48.843,26.447,48.594,26,48.001,26H33.524l8.41-17.995L39.971,8z"></path>
7
+ <linearGradient id="SVGID_2__52550" gradientUnits="userSpaceOnUse" x1="31.9999" y1="18.75" x2="31.9999" y2="44.8088" spreadMethod="reflect">
8
+ <stop offset="0" style="stop-color:#6DC7FF"></stop>
9
+ <stop offset="1" style="stop-color:#E6ABFF"></stop>
10
+ </linearGradient>
11
+ <path style="fill:url(#SVGID_2__52550);" d="M31.226,43.457l4.006-8.011C35.564,34.782,35.081,34,34.338,34H23.093 c-0.849,0-1.313-0.99-0.769-1.642l9.974-11.968c0.393-0.472,1.128,0.038,0.823,0.571l-4.311,7.545 C28.428,29.171,28.909,30,29.676,30h11.231c0.833,0,1.302,0.958,0.79,1.616l-9.625,12.375C31.7,44.47,30.954,44.001,31.226,43.457z"></path>
12
+ </svg>
assets/css/essential-addons-elementor.css CHANGED
@@ -1735,9 +1735,10 @@ body:not(.x-ethos):not(.x-integrity):not(.x-renew):not(.x-icon) .eael-product-ca
1735
  /**
1736
  * Infobox Style
1737
  */
 
1738
  /* Image/Icon On Top */
1739
  .eael-infobox .infobox-icon {
1740
- height: auto;
1741
  }
1742
  .eael-infobox .infobox-icon .infobox-icon-wrap {
1743
  display: block;
@@ -1794,7 +1795,6 @@ height: auto;
1794
  border-radius: 50%;
1795
  }
1796
  .eael-infobox-icon-bg-shape-square .infobox-icon .infobox-icon-wrap i,
1797
- .eael-infobox-icon-bg-shape-radius .infobox-icon .infobox-icon-wrap i,
1798
  .eael-infobox-icon-bg-shape-circle .infobox-icon .infobox-icon-wrap i {
1799
  margin-top: 50%;
1800
  transform: translateY(-50%);
@@ -1849,6 +1849,9 @@ height: auto;
1849
  height: auto;
1850
  display: block;
1851
  }
 
 
 
1852
  .eael-infobox.icon-on-left .infobox-icon .infobox-icon-wrap i {
1853
  margin-top: 0px;
1854
  transform: translateY(0%);
@@ -1893,22 +1896,22 @@ height: auto;
1893
  /* Imgae Circle On Top */
1894
 
1895
  .eael-infobox .infobox-icon img {
1896
- -webkit-transition: all 300ms ease-in-out 0s;
1897
- -o-transition: all 300ms ease-in-out 0s;
1898
- transition: all 300ms ease-in-out 0s;
1899
  }
1900
 
1901
  .eael-infobox-hover-img-shape-square:hover .eael-infobox .infobox-icon img {
1902
- border-radius: 0;
1903
  }
1904
 
1905
  .eael-infobox-shape-circle .eael-infobox .infobox-icon img,
1906
  .eael-infobox-hover-img-shape-circle:hover .eael-infobox .infobox-icon img {
1907
- border-radius: 50%;
1908
  }
1909
  .eael-infobox-shape-radius .eael-infobox .infobox-icon img,
1910
  .eael-infobox-hover-img-shape-radius:hover .eael-infobox .infobox-icon img {
1911
- border-radius: 15px;
1912
  }
1913
 
1914
 
@@ -1916,111 +1919,139 @@ border-radius: 15px;
1916
  * Flipbox Style
1917
  */
1918
  .eael-elements-progression-flip-box-container {
1919
- position: relative;
1920
- height: 300px;
1921
- width: 100%;
 
 
 
 
 
 
 
1922
  }
 
1923
  .eael-elements-progression-flip-box-container a {
1924
- display: block;
1925
  }
 
1926
  .eael-elements-flip-box-vertical-align {
1927
- width: 100%;
1928
  }
 
1929
  .eael-elements-flip-box-padding {
1930
- padding: 0px 30px 5px 30px;
1931
  }
 
1932
  .eael-elements-flip-box-icon-image {
1933
- display: inline-block;
1934
- margin: 0 auto 0px auto;
1935
- line-height: 1;
1936
  }
 
1937
  .eael-elements-flip-box-icon-image.eael_eleements_flip_front_icon_style_background {
1938
- background: #cccccc;
1939
  }
 
1940
  .eael_eleements_flip_front_icon_style_bordered {
1941
- border: 2px solid #ffffff;
1942
  }
 
1943
  .eael_flip_box_icon_border_round {
1944
- border-radius: 100px;
1945
  }
1946
  .eael_eleements_flip_front_icon_style_background,
1947
  .eael_eleements_flip_front_icon_style_bordered {
1948
- padding: 15px;
1949
  }
1950
  .eael-elements-flip-box-icon-image i {
1951
- font-size: 40px;
1952
- line-height: 40px;
1953
- width: 40px;
1954
  }
1955
  .eael-elements-slider-display-table {
1956
  width: 100%;
1957
  }
1958
  .eael-elements-flip-box-front-container {
1959
- text-align: center;
1960
- position: absolute;
1961
- top: 0px;
1962
- left: 0px;
1963
  z-index: 2;
1964
- width: 100%;
1965
- height: 100%;
1966
- background: #0e9dd2;
1967
- color: #ffffff;
1968
- border-color: #000000;
1969
  -webkit-display: flex;
1970
  display: flex;
1971
  -webkit-align-items: center;
1972
  align-items: center;
1973
  }
 
1974
  .eael-elements-flip-box-content,
1975
- h2.eael-elements-flip-box-heading {
1976
- color: #ffffff;
1977
  }
 
 
 
 
 
 
 
1978
  .eael-elements-flip-box-rear-container {
1979
- text-align: center;
1980
- position: absolute;
1981
- top: 0px;
1982
- left: 0px;
1983
- width: 100%;
1984
- height: 100%;
1985
- background: #444444;
1986
- color: #ffffff;
1987
  display: flex;
1988
  -webkit-align-items: center;
1989
  align-items: center;
 
1990
  }
1991
- /* Floating Button Styles */
1992
 
 
1993
  .eael-elements-progression-button-floating-container {
1994
- position: fixed;
1995
- z-index: 100;
1996
  }
 
1997
  .eael-elements-progression-button-floating-container .eael-elements-button {
1998
- margin-top: 0px;
1999
- font-size: 14px;
2000
- position: relative;
2001
- padding: 14px 20px;
2002
  }
 
2003
  .eael-elements-button {
2004
- cursor: pointer;
2005
- display: inline-block;
2006
- background: #077bbe;
2007
- color: #ffffff;
2008
- line-height: 1;
2009
- padding: 16px 25px;
2010
- margin-top: 15px;
2011
  }
 
2012
  .eael-elements-button:hover {
2013
- background: #077bbe;
2014
- color: #ffffff;
2015
  }
2016
- /* CSS3 Transitions */
2017
 
 
 
2018
  .eael-elements-progression-flip-box-container {
2019
  perspective: 1000px;
2020
  }
 
2021
  .eael-elements-flip-box-front-container,
2022
  .eael-elements-flip-box-rear-container {
2023
- transition-duration: 500ms;
2024
  transition-property: all;
2025
  transition-timing-function: ease;
2026
  }
@@ -2038,106 +2069,89 @@ h2.eael-elements-flip-box-heading {
2038
  transform: rotateX(0deg);
2039
  transform: rotateY(0deg);
2040
  }
2041
- /* Flip */
2042
 
 
2043
  .eael-animate-flip.eael-animate-up.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-flip-card,
2044
- .eael-animate-flip.eael-animate-up .eael-elements-flip-box-rear-container {
2045
- transform: rotateX(180deg);
2046
- }
2047
  .eael-animate-flip.eael-animate-down.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-flip-card,
2048
- .eael-animate-flip.eael-animate-down .eael-elements-flip-box-rear-container {
2049
- transform: rotateX(-180deg);
2050
- }
2051
  .eael-animate-flip.eael-animate-left.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-flip-card,
2052
- .eael-animate-flip.eael-animate-left .eael-elements-flip-box-rear-container {
2053
- transform: rotateY(-180deg);
2054
- }
2055
  .eael-animate-flip.eael-animate-right.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-flip-card,
2056
- .eael-animate-flip.eael-animate-right .eael-elements-flip-box-rear-container {
2057
- transform: rotateY(180deg);
2058
- }
2059
- /* Slide */
2060
 
 
 
2061
  .eael-animate-push.eael-elements-progression-flip-box-container,
2062
- .eael-animate-slide.eael-elements-progression-flip-box-container {
2063
- overflow: hidden;
2064
- }
2065
  .eael-animate-push .eael-elements-flip-box-rear-container,
2066
- .eael-animate-slide .eael-elements-flip-box-rear-container {
2067
- z-index: 3;
2068
- }
2069
  .eael-animate-push.eael-animate-up .eael-elements-flip-box-rear-container,
2070
- .eael-animate-slide.eael-animate-up .eael-elements-flip-box-rear-container {
2071
- top: 100%;
2072
- }
2073
  .eael-animate-push.eael-animate-up.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-rear-container,
2074
- .eael-animate-slide.eael-animate-up.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-rear-container {
2075
- top: 0;
2076
- }
2077
  .eael-animate-push.eael-animate-down .eael-elements-flip-box-rear-container,
2078
- .eael-animate-slide.eael-animate-down .eael-elements-flip-box-rear-container {
2079
- top: auto;
2080
- bottom: 100%;
2081
- }
2082
  .eael-animate-push.eael-animate-down.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-rear-container,
2083
- .eael-animate-slide.eael-animate-down.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-rear-container {
2084
- top: auto;
2085
- bottom: 0;
2086
- }
2087
  .eael-animate-push.eael-animate-left .eael-elements-flip-box-rear-container,
2088
- .eael-animate-slide.eael-animate-left .eael-elements-flip-box-rear-container {
2089
- left: 100%;
2090
- }
2091
  .eael-animate-push.eael-animate-left.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-rear-container,
2092
- .eael-animate-slide.eael-animate-left.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-rear-container {
2093
- left: 0;
2094
- }
2095
  .eael-animate-push.eael-animate-right .eael-elements-flip-box-rear-container,
2096
- .eael-animate-slide.eael-animate-right .eael-elements-flip-box-rear-container {
2097
- left: auto;
2098
- right: 100%;
2099
- }
2100
  .eael-animate-push.eael-animate-right.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-rear-container,
2101
- .eael-animate-slide.eael-animate-right.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-rear-container {
2102
- left: auto;
2103
- right: 0;
2104
- }
2105
- /* Push + Slide Above */
2106
 
 
 
2107
  .eael-animate-push.eael-animate-up.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-front-container {
2108
- top: -100%;
2109
  }
 
2110
  .eael-animate-push.eael-animate-down.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-front-container {
2111
- top: 100%;
2112
  }
 
2113
  .eael-animate-push.eael-animate-left.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-front-container {
2114
- left: -100%;
2115
  }
 
2116
  .eael-animate-push.eael-animate-right.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-front-container {
2117
- left: 100%;
2118
  }
2119
- /* Zoom In */
2120
 
 
2121
  .eael-animate-zoom-in .eael-elements-flip-box-rear-container {
2122
- opacity: 0;
2123
  transform: scale(0.75);
2124
- z-index: 3;
2125
  }
 
2126
  .eael-animate-zoom-in.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-rear-container {
2127
- opacity: 1;
2128
  transform: scale(1);
2129
  }
2130
- /* Zoom Out */
2131
 
 
2132
  .eael-animate-zoom-out.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-front-container {
2133
- opacity: 0;
2134
  transform: scale(0.75);
2135
  }
 
2136
  .eael-animate-fade.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-front-container {
2137
- opacity: 0;
2138
  }
2139
- /* Builder Related Style */
2140
 
 
2141
  .eael-flipbox-content-align-right .eael-elements-flip-box-padding {
2142
  text-align: right;
2143
  }
@@ -2150,6 +2164,8 @@ h2.eael-elements-flip-box-heading {
2150
  .eael-flipbox-img-circle .eael-elements-flip-box-icon-image img {
2151
  border-radius: 50%;
2152
  }
 
 
2153
  /**
2154
  * Call To Action
2155
  */
@@ -3305,173 +3321,194 @@ h2.eael-elements-flip-box-heading {
3305
 
3306
  /* General Style */
3307
  .eael-data-table-wrap .eael-data-tables_wrapper {
3308
- display: flex;
3309
- flex-flow: row wrap;
3310
- justify-content: flex-start;
3311
- width: 100%;
3312
  }
3313
  .eael-data-table-wrap .eael-data-tables_filter,
3314
  .eael-data-table-wrap .eael-data-tables_length,
3315
  .eael-data-table-wrap .eael-data-tables_info,
3316
  .eael-data-table-wrap .eael-data-tables_paginate {
3317
- flex-grow: 1;
3318
- flex-basis: 50%;
3319
  }
3320
  .eael-data-table-wrap .eael-data-tables_filter,
3321
  .eael-data-table-wrap .eael-data-tables_paginate {
3322
- text-align: right;
3323
  }
3324
  .eael-data-table-wrap .eael-data-tables_length select {
3325
- width: auto;
3326
- max-width: 120px;
3327
- height: 40px;
3328
- border: 1px solid rgba( 0,0,0,0.09 );
3329
- outline: 0;
3330
- margin-left: 10px;
3331
- margin-right: 10px;
3332
  }
3333
  .eael-data-table-wrap .eael-data-tables_paginate .paginate_button {
3334
- padding: 10px 15px;
3335
- background: #f2f2f2;
3336
- margin-right: 2px;
3337
- cursor: pointer;
3338
- transition: all .3s;
3339
  }
3340
  .eael-data-table-wrap .eael-data-tables_paginate .paginate_button:hover,
3341
  .eael-data-table-wrap .eael-data-tables_paginate .paginate_button.current {
3342
- color: #fff;
3343
- background: #4a4893;
3344
  }
 
 
3345
  .eael-data-table-wrap .eael-data-tables_paginate .paginate_button.disabled {
3346
- cursor: no-drop;
3347
- background: #f2f2f2;
3348
- opacity: .5;
3349
- color: #888;
3350
  }
3351
  .eael-data-table-wrap .eael-data-tables_info,
3352
  .eael-data-table-wrap .eael-data-tables_length label,
3353
  .eael-data-table-wrap .eael-data-tables_filter label {
3354
- font-weight: 700;
3355
  }
3356
  .eael-data-table-wrap .eael-data-tables_filter label input[type="search"] {
3357
- height: 40px;
3358
- border: 1px solid rgba( 0,0,0,0.09 );
3359
- outline: 0;
3360
- padding: 10px;
3361
- margin-left: 10px;
3362
  }
 
 
 
 
 
 
 
3363
  table.eael-data-table thead .sorting,
3364
  table.eael-data-table thead .sorting_desc,
3365
  table.eael-data-table thead .sorting_asc {
3366
- position: relative;
3367
- z-index: 0;
3368
- outline: 0;
3369
- cursor: pointer;
3370
  }
3371
  table.eael-data-table thead .sorting:after,
3372
  table.eael-data-table thead .sorting_desc:after,
3373
  table.eael-data-table thead .sorting_asc:after {
3374
- position: absolute;
3375
- top: 50%;
3376
- right: 10px;
3377
- font-family: 'FontAwesome';
3378
- color: #fff;
3379
- z-index: 1;
3380
- transform: translateY(-50%);
3381
  }
3382
  table.eael-data-table thead .sorting:after {
3383
- content: "\f0dc";
3384
  }
3385
  table.eael-data-table thead .headerSortDown:after {
3386
- content: "\f0dd";
3387
  }
3388
  table.eael-data-table thead .headerSortUp:after {
3389
- content: "\f0de";
3390
  }
3391
  .data-header-icon {
3392
- margin-right: 10px;
3393
  }
3394
  /* Table style */
3395
  .eael-data-table {
3396
- width: 100%;
3397
- height: auto;
3398
- border-collapse: collapse;
3399
- margin: 0px;
3400
  }
 
3401
  .eael-data-table thead tr {
3402
- text-align: left;
3403
  }
3404
  .eael-data-table thead tr th,
3405
  .eael-data-table thead tr th:first-child {
3406
- padding: 20px 15px;
3407
- background: #4a4893;
3408
- font-size: 16px;
3409
- font-weight: 600;
3410
- font-family: 'Montserrat', sans-serif;
3411
- line-height: 1;
3412
- color: #fff;
3413
- border-right: 1px solid rgba( 0,0,0,.1 );
3414
  }
3415
  .eael-data-table thead tr th:last-child {
3416
- border: 0px;
 
 
 
 
3417
  }
3418
  .eael-data-table tbody tr.even {
3419
- transition: background 0.4s ease-in-out;
3420
  }
3421
  .eael-data-table tbody tr.odd {
3422
- background: rgba( 242,242,242,0.5 );
3423
- transition: background 0.2s ease-in-out;
3424
  }
3425
  .eael-data-table tbody tr.even:hover,
3426
  .eael-data-table tbody tr.odd:hover {
3427
- background: rgba( 242,242,242,0.7 );
3428
  }
3429
  .eael-data-table tbody tr.even:last-child,
3430
  .eael-data-table tbody tr.odd:last-child {
3431
- border-bottom: 1px solid rgba( 0,0,0,0.09 );
3432
  }
3433
  .eael-data-table tbody tr td,
3434
  .eael-data-table tbody tr td:first-child {
3435
- padding: 20px 15px;
3436
- font-size: 14px;
3437
- font-family: 'Montserrat', sans-serif;
3438
- line-height: 1;
3439
- border-right: 1px solid rgba( 0,0,0,0.06 );
3440
  }
3441
  .eael-data-table tbody tr td:last-child {
3442
- border-right: 0px;
3443
  }
3444
 
3445
  table.eael-data-table thead .sorting_disabled.sorting:after {
3446
- display: none;
 
 
 
 
 
 
 
 
 
 
 
 
3447
  }
 
3448
  /* Edidtor related */
3449
  .eael-hide-elements .eael-data-tables_info {
3450
- display: none;
3451
  }
3452
  .eael-dt-th-align-left .eael-data-table thead tr th,
3453
  .eael-dt-td-align-left .eael-data-table tbody tr td {
3454
- text-align: left;
3455
  }
3456
  .eael-dt-th-align-right .eael-data-table thead tr th,
3457
  .eael-dt-td-align-right .eael-data-table tbody tr td {
3458
- text-align: right;
3459
- padding-right: 30px;
3460
  }
3461
  .eael-dt-th-align-center .eael-data-table thead tr th,
3462
  .eael-dt-td-align-center .eael-data-table tbody tr td {
3463
- text-align: center;
3464
  }
3465
  .eael-data-table-th-img {
3466
- display: inline-block;
3467
- margin: 0px;
3468
- line-height: 1;
3469
-
3470
- }
3471
- table.eael-data-table thead .sorting:after,
3472
- table.eael-data-table thead .sorting_desc:after,
3473
- table.eael-data-table thead .sorting_asc:after {
3474
- display: none;
3475
  }
3476
 
3477
  .th-mobile-screen {
@@ -3479,20 +3516,52 @@ table.eael-data-table thead .sorting_asc:after {
3479
  }
3480
 
3481
  @media (max-width: 39.9375em) {
3482
- .th-mobile-screen {
3483
- display: inline-block;
3484
- padding: 0 .6em;
3485
- width: 50%;
3486
- }
3487
- .eael-data-table thead {
3488
- display: none;
3489
- }
3490
- .eael-data-table tbody tr td {
3491
- display: block;
3492
- float: none;
3493
- clear: left;
3494
- width: 100%;
3495
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3496
  }
3497
 
3498
  /**
1735
  /**
1736
  * Infobox Style
1737
  */
1738
+
1739
  /* Image/Icon On Top */
1740
  .eael-infobox .infobox-icon {
1741
+ height: auto;
1742
  }
1743
  .eael-infobox .infobox-icon .infobox-icon-wrap {
1744
  display: block;
1795
  border-radius: 50%;
1796
  }
1797
  .eael-infobox-icon-bg-shape-square .infobox-icon .infobox-icon-wrap i,
 
1798
  .eael-infobox-icon-bg-shape-circle .infobox-icon .infobox-icon-wrap i {
1799
  margin-top: 50%;
1800
  transform: translateY(-50%);
1849
  height: auto;
1850
  display: block;
1851
  }
1852
+
1853
+ .eael-infobox .infobox-content p { margin: 0 0 15px; }
1854
+
1855
  .eael-infobox.icon-on-left .infobox-icon .infobox-icon-wrap i {
1856
  margin-top: 0px;
1857
  transform: translateY(0%);
1896
  /* Imgae Circle On Top */
1897
 
1898
  .eael-infobox .infobox-icon img {
1899
+ -webkit-transition: all 300ms ease-in-out 0s;
1900
+ -o-transition: all 300ms ease-in-out 0s;
1901
+ transition: all 300ms ease-in-out 0s;
1902
  }
1903
 
1904
  .eael-infobox-hover-img-shape-square:hover .eael-infobox .infobox-icon img {
1905
+ border-radius: 0;
1906
  }
1907
 
1908
  .eael-infobox-shape-circle .eael-infobox .infobox-icon img,
1909
  .eael-infobox-hover-img-shape-circle:hover .eael-infobox .infobox-icon img {
1910
+ border-radius: 50%;
1911
  }
1912
  .eael-infobox-shape-radius .eael-infobox .infobox-icon img,
1913
  .eael-infobox-hover-img-shape-radius:hover .eael-infobox .infobox-icon img {
1914
+ border-radius: 15px;
1915
  }
1916
 
1917
 
1919
  * Flipbox Style
1920
  */
1921
  .eael-elements-progression-flip-box-container {
1922
+ position:relative;
1923
+ height:300px;
1924
+ width:100%;
1925
+ }
1926
+
1927
+ .eael-elements-progression-flip-box-container .flipbox-button {
1928
+ display: inline-block;
1929
+ -webkit-transition: all 400ms;
1930
+ -o-transition: all 400ms;
1931
+ transition: all 400ms;
1932
  }
1933
+
1934
  .eael-elements-progression-flip-box-container a {
1935
+ display:block;
1936
  }
1937
+
1938
  .eael-elements-flip-box-vertical-align {
1939
+ width:100%;
1940
  }
1941
+
1942
  .eael-elements-flip-box-padding {
1943
+ padding:0px 30px 5px 30px;
1944
  }
1945
+
1946
  .eael-elements-flip-box-icon-image {
1947
+ display:inline-block;
1948
+ margin:0 auto 0px auto;
1949
+ line-height:1;
1950
  }
1951
+
1952
  .eael-elements-flip-box-icon-image.eael_eleements_flip_front_icon_style_background {
1953
+ background:#cccccc;
1954
  }
1955
+
1956
  .eael_eleements_flip_front_icon_style_bordered {
1957
+ border:2px solid #ffffff;
1958
  }
1959
+
1960
  .eael_flip_box_icon_border_round {
1961
+ border-radius:100px;
1962
  }
1963
  .eael_eleements_flip_front_icon_style_background,
1964
  .eael_eleements_flip_front_icon_style_bordered {
1965
+ padding:15px;
1966
  }
1967
  .eael-elements-flip-box-icon-image i {
1968
+ font-size:40px;
1969
+ line-height:40px;
1970
+ width:40px;
1971
  }
1972
  .eael-elements-slider-display-table {
1973
  width: 100%;
1974
  }
1975
  .eael-elements-flip-box-front-container {
1976
+ text-align:center;
1977
+ position:absolute;
1978
+ top:0px;
1979
+ left:0px;
1980
  z-index: 2;
1981
+ width:100%;
1982
+ height:100%;
1983
+ background:#0e9dd2;
1984
+ color:#ffffff;
1985
+ border-color:#000000;
1986
  -webkit-display: flex;
1987
  display: flex;
1988
  -webkit-align-items: center;
1989
  align-items: center;
1990
  }
1991
+
1992
  .eael-elements-flip-box-content,
1993
+ .eael-elements-flip-box-heading {
1994
+ color:#ffffff;
1995
  }
1996
+
1997
+ .eael-elements-flip-box-heading.flipbox-linked-title {
1998
+ color: #fff;
1999
+ font-size: 1.5em;
2000
+ font-weight: 700;
2001
+ }
2002
+
2003
  .eael-elements-flip-box-rear-container {
2004
+ text-align:center;
2005
+ position:absolute;
2006
+ top:0px;
2007
+ left:0px;
2008
+ width:100%;
2009
+ height:100%;
2010
+ background:#444444;
2011
+ color:#ffffff;
2012
  display: flex;
2013
  -webkit-align-items: center;
2014
  align-items: center;
2015
+ border-color: #000000;
2016
  }
 
2017
 
2018
+ /* Floating Button Styles */
2019
  .eael-elements-progression-button-floating-container {
2020
+ position:fixed;
2021
+ z-index:100;
2022
  }
2023
+
2024
  .eael-elements-progression-button-floating-container .eael-elements-button {
2025
+ margin-top:0px;
2026
+ font-size:14px;
2027
+ position:relative;
2028
+ padding:14px 20px;
2029
  }
2030
+
2031
  .eael-elements-button {
2032
+ cursor:pointer;
2033
+ display:inline-block;
2034
+ background:#077bbe;
2035
+ color:#ffffff;
2036
+ line-height:1;
2037
+ padding:16px 25px;
2038
+ margin-top:15px;
2039
  }
2040
+
2041
  .eael-elements-button:hover {
2042
+ background:#077bbe;
2043
+ color:#ffffff;
2044
  }
 
2045
 
2046
+
2047
+ /* CSS3 Transitions */
2048
  .eael-elements-progression-flip-box-container {
2049
  perspective: 1000px;
2050
  }
2051
+
2052
  .eael-elements-flip-box-front-container,
2053
  .eael-elements-flip-box-rear-container {
2054
+ transition-duration:500ms;
2055
  transition-property: all;
2056
  transition-timing-function: ease;
2057
  }
2069
  transform: rotateX(0deg);
2070
  transform: rotateY(0deg);
2071
  }
 
2072
 
2073
+ /* Flip */
2074
  .eael-animate-flip.eael-animate-up.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-flip-card,
2075
+ .eael-animate-flip.eael-animate-up .eael-elements-flip-box-rear-container { transform: rotateX(180deg); }
2076
+
 
2077
  .eael-animate-flip.eael-animate-down.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-flip-card,
2078
+ .eael-animate-flip.eael-animate-down .eael-elements-flip-box-rear-container { transform: rotateX(-180deg); }
2079
+
 
2080
  .eael-animate-flip.eael-animate-left.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-flip-card,
2081
+ .eael-animate-flip.eael-animate-left .eael-elements-flip-box-rear-container { transform: rotateY(-180deg); }
2082
+
 
2083
  .eael-animate-flip.eael-animate-right.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-flip-card,
2084
+ .eael-animate-flip.eael-animate-right .eael-elements-flip-box-rear-container { transform: rotateY(180deg); }
 
 
 
2085
 
2086
+
2087
+ /* Slide */
2088
  .eael-animate-push.eael-elements-progression-flip-box-container,
2089
+ .eael-animate-slide.eael-elements-progression-flip-box-container { overflow:hidden; }
 
 
2090
  .eael-animate-push .eael-elements-flip-box-rear-container,
2091
+ .eael-animate-slide .eael-elements-flip-box-rear-container { z-index:3; }
2092
+
 
2093
  .eael-animate-push.eael-animate-up .eael-elements-flip-box-rear-container,
2094
+ .eael-animate-slide.eael-animate-up .eael-elements-flip-box-rear-container { top:100%; }
 
 
2095
  .eael-animate-push.eael-animate-up.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-rear-container,
2096
+ .eael-animate-slide.eael-animate-up.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-rear-container {top:0; }
2097
+
 
2098
  .eael-animate-push.eael-animate-down .eael-elements-flip-box-rear-container,
2099
+ .eael-animate-slide.eael-animate-down .eael-elements-flip-box-rear-container { top:auto; bottom:100%; }
 
 
 
2100
  .eael-animate-push.eael-animate-down.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-rear-container,
2101
+ .eael-animate-slide.eael-animate-down.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-rear-container {top:auto; bottom:0; }
2102
+
 
 
2103
  .eael-animate-push.eael-animate-left .eael-elements-flip-box-rear-container,
2104
+ .eael-animate-slide.eael-animate-left .eael-elements-flip-box-rear-container { left:100%; }
 
 
2105
  .eael-animate-push.eael-animate-left.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-rear-container,
2106
+ .eael-animate-slide.eael-animate-left.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-rear-container { left:0; }
2107
+
2108
+
2109
  .eael-animate-push.eael-animate-right .eael-elements-flip-box-rear-container,
2110
+ .eael-animate-slide.eael-animate-right .eael-elements-flip-box-rear-container {left:auto; right:100%; }
 
 
 
2111
  .eael-animate-push.eael-animate-right.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-rear-container,
2112
+ .eael-animate-slide.eael-animate-right.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-rear-container { left:auto; right:0; }
 
 
 
 
2113
 
2114
+
2115
+ /* Push + Slide Above */
2116
  .eael-animate-push.eael-animate-up.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-front-container {
2117
+ top:-100%;
2118
  }
2119
+
2120
  .eael-animate-push.eael-animate-down.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-front-container {
2121
+ top:100%;
2122
  }
2123
+
2124
  .eael-animate-push.eael-animate-left.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-front-container {
2125
+ left:-100%;
2126
  }
2127
+
2128
  .eael-animate-push.eael-animate-right.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-front-container {
2129
+ left:100%;
2130
  }
 
2131
 
2132
+ /* Zoom In */
2133
  .eael-animate-zoom-in .eael-elements-flip-box-rear-container {
2134
+ opacity:0;
2135
  transform: scale(0.75);
2136
+ z-index:3;
2137
  }
2138
+
2139
  .eael-animate-zoom-in.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-rear-container {
2140
+ opacity:1;
2141
  transform: scale(1);
2142
  }
 
2143
 
2144
+ /* Zoom Out */
2145
  .eael-animate-zoom-out.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-front-container {
2146
+ opacity:0;
2147
  transform: scale(0.75);
2148
  }
2149
+
2150
  .eael-animate-fade.eael-elements-progression-flip-box-container:hover .eael-elements-flip-box-front-container {
2151
+ opacity:0;
2152
  }
 
2153
 
2154
+ /* Builder Related Style */
2155
  .eael-flipbox-content-align-right .eael-elements-flip-box-padding {
2156
  text-align: right;
2157
  }
2164
  .eael-flipbox-img-circle .eael-elements-flip-box-icon-image img {
2165
  border-radius: 50%;
2166
  }
2167
+
2168
+
2169
  /**
2170
  * Call To Action
2171
  */
3321
 
3322
  /* General Style */
3323
  .eael-data-table-wrap .eael-data-tables_wrapper {
3324
+ display: flex;
3325
+ flex-flow: row wrap;
3326
+ justify-content: flex-start;
3327
+ width: 100%;
3328
  }
3329
  .eael-data-table-wrap .eael-data-tables_filter,
3330
  .eael-data-table-wrap .eael-data-tables_length,
3331
  .eael-data-table-wrap .eael-data-tables_info,
3332
  .eael-data-table-wrap .eael-data-tables_paginate {
3333
+ flex-grow: 1;
3334
+ flex-basis: 50%;
3335
  }
3336
  .eael-data-table-wrap .eael-data-tables_filter,
3337
  .eael-data-table-wrap .eael-data-tables_paginate {
3338
+ text-align: right;
3339
  }
3340
  .eael-data-table-wrap .eael-data-tables_length select {
3341
+ width: auto;
3342
+ max-width: 120px;
3343
+ height: 40px;
3344
+ border: 1px solid rgba( 0,0,0,0.09 );
3345
+ outline: 0;
3346
+ margin-left: 10px;
3347
+ margin-right: 10px;
3348
  }
3349
  .eael-data-table-wrap .eael-data-tables_paginate .paginate_button {
3350
+ padding: 10px 15px;
3351
+ background: #f2f2f2;
3352
+ margin-right: 2px;
3353
+ cursor: pointer;
3354
+ transition: all .3s;
3355
  }
3356
  .eael-data-table-wrap .eael-data-tables_paginate .paginate_button:hover,
3357
  .eael-data-table-wrap .eael-data-tables_paginate .paginate_button.current {
3358
+ color: #fff;
3359
+ background: #4a4893;
3360
  }
3361
+ .eael-data-table-wrap .eael-data-tables_paginate .paginate_button.previous {}
3362
+ .eael-data-table-wrap .eael-data-tables_paginate .paginate_button.next {}
3363
  .eael-data-table-wrap .eael-data-tables_paginate .paginate_button.disabled {
3364
+ cursor: no-drop;
3365
+ background: #f2f2f2;
3366
+ opacity: .5;
3367
+ color: #888;
3368
  }
3369
  .eael-data-table-wrap .eael-data-tables_info,
3370
  .eael-data-table-wrap .eael-data-tables_length label,
3371
  .eael-data-table-wrap .eael-data-tables_filter label {
3372
+ font-weight: 700;
3373
  }
3374
  .eael-data-table-wrap .eael-data-tables_filter label input[type="search"] {
3375
+ height: 40px;
3376
+ border: 1px solid rgba( 0,0,0,0.09 );
3377
+ outline: 0;
3378
+ padding: 10px;
3379
+ margin-left: 10px;
3380
  }
3381
+
3382
+ table.eael-data-table .sorting.sorting-none:after,
3383
+ table.eael-data-table .sorting_desc.sorting-none:after,
3384
+ table.eael-data-table .sorting_asc.sorting-none:after {
3385
+ display: none;
3386
+ }
3387
+
3388
  table.eael-data-table thead .sorting,
3389
  table.eael-data-table thead .sorting_desc,
3390
  table.eael-data-table thead .sorting_asc {
3391
+ position: relative;
3392
+ z-index: 0;
3393
+ outline: 0;
3394
+ cursor: pointer;
3395
  }
3396
  table.eael-data-table thead .sorting:after,
3397
  table.eael-data-table thead .sorting_desc:after,
3398
  table.eael-data-table thead .sorting_asc:after {
3399
+ position: absolute;
3400
+ top: 50%;
3401
+ right: 10px;
3402
+ font-family: 'FontAwesome';
3403
+ color: #fff;
3404
+ z-index: 1;
3405
+ transform: translateY(-50%);
3406
  }
3407
  table.eael-data-table thead .sorting:after {
3408
+ content: "\f0dc";
3409
  }
3410
  table.eael-data-table thead .headerSortDown:after {
3411
+ content: "\f0dd";
3412
  }
3413
  table.eael-data-table thead .headerSortUp:after {
3414
+ content: "\f0de";
3415
  }
3416
  .data-header-icon {
3417
+ margin-right: 10px;
3418
  }
3419
  /* Table style */
3420
  .eael-data-table {
3421
+ width: 100%;
3422
+ height: auto;
3423
+ border-collapse: separate;
3424
+ margin: 0px;
3425
  }
3426
+ .eael-data-table thead {}
3427
  .eael-data-table thead tr {
3428
+ text-align: left;
3429
  }
3430
  .eael-data-table thead tr th,
3431
  .eael-data-table thead tr th:first-child {
3432
+ padding: 20px 15px;
3433
+ background: #4a4893;
3434
+ font-size: 16px;
3435
+ font-weight: 600;
3436
+ font-family: 'Montserrat', sans-serif;
3437
+ line-height: 1;
3438
+ color: #fff;
3439
+ border-right: 1px solid rgba( 0,0,0,.1 );
3440
  }
3441
  .eael-data-table thead tr th:last-child {
3442
+ border: 0px;
3443
+ }
3444
+ .eael-data-table tbody {}
3445
+ .eael-data-table tbody tr {
3446
+
3447
  }
3448
  .eael-data-table tbody tr.even {
3449
+ transition: background 0.4s ease-in-out;
3450
  }
3451
  .eael-data-table tbody tr.odd {
3452
+ background: rgba( 242,242,242,0.5 );
3453
+ transition: background 0.2s ease-in-out;
3454
  }
3455
  .eael-data-table tbody tr.even:hover,
3456
  .eael-data-table tbody tr.odd:hover {
3457
+ background: rgba( 242,242,242,0.7 );
3458
  }
3459
  .eael-data-table tbody tr.even:last-child,
3460
  .eael-data-table tbody tr.odd:last-child {
3461
+ border-bottom: 1px solid rgba( 0,0,0,0.09 );
3462
  }
3463
  .eael-data-table tbody tr td,
3464
  .eael-data-table tbody tr td:first-child {
3465
+ padding: 20px 15px;
3466
+ font-size: 14px;
3467
+ font-family: 'Montserrat', sans-serif;
3468
+ line-height: 1;
3469
+ border-right: 1px solid rgba( 0,0,0,0.06 );
3470
  }
3471
  .eael-data-table tbody tr td:last-child {
3472
+ border-right: 0px;
3473
  }
3474
 
3475
  table.eael-data-table thead .sorting_disabled.sorting:after {
3476
+ display: none;
3477
+ }
3478
+
3479
+ .eael-table-align-left table.eael-data-table {
3480
+ float: left;
3481
+ }
3482
+
3483
+ .eael-table-align-center table.eael-data-table {
3484
+ margin: 0 auto;
3485
+ }
3486
+
3487
+ .eael-table-align-right table.eael-data-table {
3488
+ float: right;
3489
  }
3490
+
3491
  /* Edidtor related */
3492
  .eael-hide-elements .eael-data-tables_info {
3493
+ display: none;
3494
  }
3495
  .eael-dt-th-align-left .eael-data-table thead tr th,
3496
  .eael-dt-td-align-left .eael-data-table tbody tr td {
3497
+ text-align: left;
3498
  }
3499
  .eael-dt-th-align-right .eael-data-table thead tr th,
3500
  .eael-dt-td-align-right .eael-data-table tbody tr td {
3501
+ text-align: right;
3502
+ padding-right: 30px;
3503
  }
3504
  .eael-dt-th-align-center .eael-data-table thead tr th,
3505
  .eael-dt-td-align-center .eael-data-table tbody tr td {
3506
+ text-align: center;
3507
  }
3508
  .eael-data-table-th-img {
3509
+ display: inline-block;
3510
+ margin: 0px 15px 0px 0px;
3511
+ line-height: 1;
 
 
 
 
 
 
3512
  }
3513
 
3514
  .th-mobile-screen {
3516
  }
3517
 
3518
  @media (max-width: 39.9375em) {
3519
+ .eael-data-table-wrap {
3520
+ overflow-x: scroll !important;
3521
+ padding-bottom: 5px;
3522
+ }
3523
+ .th-mobile-screen {
3524
+ display: inline-block;
3525
+ padding: 0 .6em;
3526
+ margin-right: 10px;
3527
+ text-align: center;
3528
+ }
3529
+ .td-content-wrapper {
3530
+ display: flex;
3531
+ width: 100%;
3532
+ }
3533
+ .th-mobile-screen {
3534
+ flex-grow: 0;
3535
+ flex-shrink: 0;
3536
+ flex-basis: 100px;
3537
+ }
3538
+ .th-mobile-screen .eael-data-table-th-img,
3539
+ .th-mobile-screen .data-header-icon {
3540
+ margin: 0px auto 15px auto;
3541
+ display: block;
3542
+ }
3543
+ .custom-responsive-option-enable .eael-data-table thead {
3544
+ display: none;
3545
+ }
3546
+ .custom-responsive-option-enable .eael-data-table tbody tr td {
3547
+ display: block;
3548
+ float: none;
3549
+ clear: left;
3550
+ width: 100%;
3551
+ }
3552
+ .custom-responsive-option-enable .eael-data-table tbody tr td {
3553
+ text-align: left;
3554
+ display: flex;
3555
+ align-items: center;
3556
+ }
3557
+ .eael-data-table .td-content {
3558
+ align-items: center;
3559
+ display: flex;
3560
+ }
3561
+ .td-content, .td-content > p {
3562
+ width: 100%;
3563
+ justify-content: center;
3564
+ }
3565
  }
3566
 
3567
  /**
assets/js/eael-scripts.js CHANGED
@@ -287,8 +287,8 @@
287
 
288
  $btn_text = $_this.data('btn_text'),
289
 
290
- $categories = $_this.data('categories'),
291
- $tags = $_this.data('tags'),
292
  $exclude_posts = $_this.data('exclude_posts');
293
 
294
  var options = {
@@ -303,7 +303,7 @@
303
  perPage: $posts_per_page,
304
  postOrder: $post_order,
305
  orderBy: $post_orderby,
306
- offset: $post_offset > 0 ? $post_offset + $posts_per_page : 0,
307
 
308
  showImage: $show_images,
309
  imageSize: $image_size,
@@ -311,8 +311,8 @@
311
  showExcerpt: $show_excerpt,
312
  excerptLength: parseInt( $excerpt_length, 10 ),
313
  btnText: $btn_text,
314
- categories: $categories,
315
- eael_post_tags: $tags,
316
  exclude_posts: $exclude_posts,
317
  }
318
 
@@ -375,15 +375,31 @@
375
  /* Data Table
376
  /* ------------------------------ */
377
  var dataTable = function($scope, $) {
378
- var $th = $scope.find('.eael-data-table').find('th');
379
- var $tbody = $scope.find('.eael-data-table').find('tbody');
 
 
 
 
 
 
 
 
380
 
381
- $tbody.find('tr').each(function(i, item) {
382
- $(item).find('td').each(function(index, item){
383
- $(this)
384
- .prepend('<b class="th-mobile-screen">' + $th.eq(index).html() + '</b>');
 
 
 
 
 
 
385
  });
386
- });
 
 
387
  } // end of Data Table
388
 
389
  var FancyText = function ($scope, $) {
287
 
288
  $btn_text = $_this.data('btn_text'),
289
 
290
+ $tax_query = $_this.data('tax_query'),
291
+ $post__in = $_this.data('post__in'),
292
  $exclude_posts = $_this.data('exclude_posts');
293
 
294
  var options = {
303
  perPage: $posts_per_page,
304
  postOrder: $post_order,
305
  orderBy: $post_orderby,
306
+ offset: $post_offset,
307
 
308
  showImage: $show_images,
309
  imageSize: $image_size,
311
  showExcerpt: $show_excerpt,
312
  excerptLength: parseInt( $excerpt_length, 10 ),
313
  btnText: $btn_text,
314
+ tax_query: $tax_query,
315
+ post__in: $post__in,
316
  exclude_posts: $exclude_posts,
317
  }
318
 
375
  /* Data Table
376
  /* ------------------------------ */
377
  var dataTable = function($scope, $) {
378
+ var $_this = $scope.find('.eael-data-table-wrap'),
379
+ $enable_table = $_this.data('table_enabled'),
380
+ $id = $_this.data('table_id');
381
+
382
+ if( true == $enable_table ) $("#eael-data-table-"+$id).tablesorter();
383
+ if( $enable_table != true ) {
384
+ $('table#eael-data-table-'+$id+' .sorting').addClass('sorting-none');
385
+ $('table#eael-data-table-'+$id+' .sorting_desc').addClass('sorting-none');
386
+ $('table#eael-data-table-'+$id+' .sorting_asc').addClass('sorting-none');
387
+ }
388
 
389
+ var responsive = $_this.data('custom_responsive');
390
+ if( true == responsive ) {
391
+ var $th = $scope.find('.eael-data-table').find('th');
392
+ var $tbody = $scope.find('.eael-data-table').find('tbody');
393
+
394
+ $tbody.find('tr').each(function(i, item) {
395
+ $(item).find('td .td-content-wrapper').each(function(index, item){
396
+ $(this)
397
+ .prepend('<div class="th-mobile-screen">' + $th.eq(index).html() + '</div>');
398
+ });
399
  });
400
+ }
401
+
402
+
403
  } // end of Data Table
404
 
405
  var FancyText = function ($scope, $) {
assets/js/load-more.js CHANGED
@@ -24,9 +24,9 @@
24
  metaPosition: settings.metaPosition,
25
  excerptLength: settings.excerptLength,
26
  btnText: settings.btnText,
27
- categories: settings.categories,
28
- tags: settings.eael_post_tags,
29
  excludePosts: settings.exclude_posts,
 
30
  offset: parseInt( settings.offset , 10 ),
31
  }
32
 
@@ -57,8 +57,10 @@
57
  posts_per_page : settingsValue.perPage,
58
  offset : offset,
59
 
60
- category: settingsValue.categories ,
61
- eael_post_tags: settingsValue.tags ,
 
 
62
  post__not_in: settingsValue.excludePosts,
63
 
64
  orderby: settingsValue.orderBy,
24
  metaPosition: settings.metaPosition,
25
  excerptLength: settings.excerptLength,
26
  btnText: settings.btnText,
27
+ tax_query: settings.tax_query,
 
28
  excludePosts: settings.exclude_posts,
29
+ post__in: settings.post__in,
30
  offset: parseInt( settings.offset , 10 ),
31
  }
32
 
57
  posts_per_page : settingsValue.perPage,
58
  offset : offset,
59
 
60
+ tax_query: settingsValue.tax_query,
61
+
62
+ post__in: settingsValue.post__in,
63
+
64
  post__not_in: settingsValue.excludePosts,
65
 
66
  orderby: settingsValue.orderBy,
elements/content-ticker/content-ticker.php CHANGED
@@ -5,6 +5,8 @@ if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
5
 
6
  class Widget_Eael_Content_Ticker extends Widget_Base {
7
 
 
 
8
  public function get_name() {
9
  return 'eael-content-ticker';
10
  }
@@ -70,140 +72,10 @@ class Widget_Eael_Content_Ticker extends Widget_Base {
70
  $this->end_controls_section();
71
 
72
  /**
73
- * Content Ticker Dynamic Content Settings
 
74
  */
75
- $this->start_controls_section(
76
- 'eael_section_ticker_dynamic_content-settings',
77
- [
78
- 'label' => __( 'Dynamic Content Settings', 'essential-addons-elementor' ),
79
- 'condition' => [
80
- 'eael_ticker_type' => ['dynamic', 'custom']
81
- ]
82
- ]
83
- );
84
-
85
-
86
- $this->add_control(
87
- 'post_type',
88
- [
89
- 'label' => __( 'Post Type', 'essential-addons-elementor' ),
90
- 'type' => Controls_Manager::SELECT,
91
- 'options' => eael_get_post_types(),
92
- 'default' => 'post',
93
- ]
94
- );
95
-
96
- $this->add_control(
97
- 'category',
98
- [
99
- 'label' => __( 'Categories', 'essential-addons-elementor' ),
100
- 'type' => Controls_Manager::SELECT2,
101
- 'label_block' => true,
102
- 'multiple' => true,
103
- 'options' => eael_post_type_categories(),
104
- 'condition' => [
105
- 'post_type' => 'post'
106
- ]
107
- ]
108
- );
109
-
110
- $this->add_control(
111
- 'eael_post_authors',
112
- [
113
- 'label' => __( 'Authors', 'essential-addons-elementor' ),
114
- 'type' => Controls_Manager::SELECT2,
115
- 'label_block' => true,
116
- 'multiple' => true,
117
- 'options' => eael_get_authors(),
118
- ]
119
- );
120
-
121
- $this->add_control(
122
- 'eael_post_tags',
123
- [
124
- 'label' => __( 'Tags', 'essential-addons-elementor' ),
125
- 'type' => Controls_Manager::SELECT2,
126
- 'label_block' => true,
127
- 'multiple' => true,
128
- 'options' => eael_get_tags(),
129
- 'condition' => [
130
- 'post_type' => 'post'
131
- ]
132
- ]
133
- );
134
-
135
- $this->add_control(
136
- 'post__not_in',
137
- [
138
- 'label' => __( 'Exclude Posts', 'essential-addons-elementor' ),
139
- 'type' => Controls_Manager::SELECT2,
140
- 'label_block' => true,
141
- 'multiple' => true,
142
- 'options' => eael_get_posts(),
143
- 'condition' => [
144
- 'post_type' => 'post'
145
- ]
146
- ]
147
- );
148
-
149
- $this->add_control(
150
- 'page__not_in',
151
- [
152
- 'label' => __( 'Exclude Pages', 'essential-addons-elementor' ),
153
- 'type' => Controls_Manager::SELECT2,
154
- 'label_block' => true,
155
- 'multiple' => true,
156
- 'options' => eael_get_pages(),
157
- 'condition' => [
158
- 'post_type' => 'page'
159
- ]
160
- ]
161
- );
162
-
163
- $this->add_control(
164
- 'posts_per_page',
165
- [
166
- 'label' => __( 'Number of Posts', 'essential-addons-elementor' ),
167
- 'type' => Controls_Manager::NUMBER,
168
- 'default' => '4'
169
- ]
170
- );
171
-
172
-
173
- $this->add_control(
174
- 'offset',
175
- [
176
- 'label' => __( 'Post Offset', 'essential-addons-elementor' ),
177
- 'type' => Controls_Manager::NUMBER,
178
- 'default' => '0'
179
- ]
180
- );
181
-
182
- $this->add_control(
183
- 'orderby',
184
- [
185
- 'label' => __( 'Order By', 'essential-addons-elementor' ),
186
- 'type' => Controls_Manager::SELECT,
187
- 'options' => eael_get_post_orderby_options(),
188
- 'default' => 'date',
189
-
190
- ]
191
- );
192
-
193
- $this->add_control(
194
- 'order',
195
- [
196
- 'label' => __( 'Order', 'essential-addons-elementor' ),
197
- 'type' => Controls_Manager::SELECT,
198
- 'options' => [
199
- 'asc' => 'Ascending',
200
- 'desc' => 'Descending'
201
- ],
202
- 'default' => 'desc',
203
- ]
204
- );
205
-
206
- $this->end_controls_section();
207
 
208
 
209
  /**
@@ -779,17 +651,19 @@ class Widget_Eael_Content_Ticker extends Widget_Base {
779
 
780
 
781
  protected function render( ) {
782
-
783
  $settings = $this->get_settings();
 
784
  /**
785
  * Setup the post arguments.
786
  */
787
  $settings['post_style'] = 'ticker';
788
- $post_args = eael_get_post_settings( $settings, true );
 
 
789
  /**
790
  * Get posts from database.
791
  */
792
- $posts = eael_load_more_ajax( $post_args );
793
  /**
794
  * Render the content
795
  */
5
 
6
  class Widget_Eael_Content_Ticker extends Widget_Base {
7
 
8
+ use \Elementor\ElementsCommonFunctions;
9
+
10
  public function get_name() {
11
  return 'eael-content-ticker';
12
  }
72
  $this->end_controls_section();
73
 
74
  /**
75
+ * Query Controls
76
+ * @source includes/elementor-helper.php
77
  */
78
+ $this->query_controls();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
 
80
 
81
  /**
651
 
652
 
653
  protected function render( ) {
 
654
  $settings = $this->get_settings();
655
+
656
  /**
657
  * Setup the post arguments.
658
  */
659
  $settings['post_style'] = 'ticker';
660
+ $post_args = eael_get_post_settings( $settings );
661
+ $query_args = EAE_Helper::get_query_args( 'eaeposts', $this->get_settings() );
662
+ $query_args = array_merge( $query_args, $post_args );
663
  /**
664
  * Get posts from database.
665
  */
666
+ $posts = eael_load_more_ajax( $query_args );
667
  /**
668
  * Render the content
669
  */
elements/creative-button/creative-button.php CHANGED
File without changes
elements/data-table/data-table.php CHANGED
@@ -40,28 +40,18 @@ class Widget_Eael_Data_Table extends Widget_Base {
40
  );
41
 
42
  $this->add_control(
43
- 'eael_section_data_table_enabled',
44
- [
45
  'label' => __( 'Enable Table Sorting', 'essential-addons-elementor' ),
46
  'type' => Controls_Manager::SWITCHER,
47
- 'default' => 'false',
48
  'label_on' => esc_html__( 'Yes', 'essential-addons-elementor' ),
49
  'label_off' => esc_html__( 'No', 'essential-addons-elementor' ),
50
  'return_value' => 'true',
51
- ]
52
- );
53
-
54
- $this->add_control(
55
- 'eael_section_data_table_enabled_pro_alert',
56
- [
57
- 'label' => esc_html__( 'Table Sorting available in pro version!', 'essential-addons-elementor' ),
58
- 'type' => Controls_Manager::HEADING,
59
- 'condition' => [
60
- 'eael_section_data_table_enabled' => 'true',
61
- ]
62
- ]
63
  );
64
 
 
65
  $this->add_control(
66
  'eael_data_table_header_cols_data',
67
  [
@@ -85,17 +75,9 @@ class Widget_Eael_Data_Table extends Widget_Base {
85
  'name' => 'eael_data_table_header_col_span',
86
  'label' => esc_html__( 'Column Span', 'essential-addons-elementor' ),
87
  'default' => '',
88
- 'type' => Controls_Manager::NUMBER,
89
  'label_block' => false,
90
  ],
91
- [
92
- 'name' => 'data_table_header_colspan_pro_alert',
93
- 'label' => esc_html__( 'Column Span available in pro version!', 'essential-addons-elementor' ),
94
- 'type' => Controls_Manager::HEADING,
95
- 'condition' => [
96
- 'eael_data_table_header_col_span!' => '',
97
- ]
98
- ],
99
  [
100
  'name' => 'eael_data_table_header_col_icon_enabled',
101
  'label' => esc_html__( 'Enable Header Icon', 'essential-addons-elementor' ),
@@ -128,14 +110,6 @@ class Widget_Eael_Data_Table extends Widget_Base {
128
  'eael_data_table_header_col_icon_enabled' => 'true'
129
  ]
130
  ],
131
- [
132
- 'name' => 'data_table_header_img_pro_alert',
133
- 'label' => esc_html__( 'Image icon available in pro version!', 'essential-addons-elementor' ),
134
- 'type' => Controls_Manager::HEADING,
135
- 'condition' => [
136
- 'eael_data_table_header_icon_type' => 'image',
137
- ]
138
- ],
139
  [
140
  'name' => 'eael_data_table_header_col_icon',
141
  'label' => esc_html__( 'Icon', 'essential-addons-elementor' ),
@@ -146,6 +120,27 @@ class Widget_Eael_Data_Table extends Widget_Base {
146
  'eael_data_table_header_icon_type' => 'icon'
147
  ]
148
  ],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
  [
150
  'name' => 'eael_data_table_header_css_class',
151
  'label' => esc_html__( 'CSS Class', 'essential-addons-elementor' ),
@@ -204,9 +199,10 @@ class Widget_Eael_Data_Table extends Widget_Base {
204
  'name' => 'eael_data_table_content_row_colspan',
205
  'label' => esc_html__( 'Col Span', 'essential-addons-elementor' ),
206
  'type' => Controls_Manager::NUMBER,
207
- 'default' => '1',
208
- 'min' => '1',
209
- 'label_block' => false,
 
210
  'condition' => [
211
  'eael_data_table_content_row_type' => 'col'
212
  ]
@@ -215,20 +211,14 @@ class Widget_Eael_Data_Table extends Widget_Base {
215
  'name' => 'eael_data_table_content_row_rowspan',
216
  'label' => esc_html__( 'Row Span', 'essential-addons-elementor' ),
217
  'type' => Controls_Manager::NUMBER,
218
- 'label_block' => false,
 
 
 
219
  'condition' => [
220
  'eael_data_table_content_row_type' => 'col'
221
  ]
222
  ],
223
- [
224
- 'name' => 'data_table_content_rowspan_pro_alert',
225
- 'label' => esc_html__( 'Row Span available in pro version!', 'essential-addons-elementor' ),
226
- 'type' => Controls_Manager::HEADING,
227
- 'condition' => [
228
- 'eael_data_table_content_row_rowspan!' => '',
229
- 'eael_data_table_content_row_type' => 'col'
230
- ]
231
- ],
232
  [
233
  'name' => 'eael_data_table_content_type',
234
  'label' => esc_html__( 'Content Type', 'essential-addons-elementor' ),
@@ -253,13 +243,14 @@ class Widget_Eael_Data_Table extends Widget_Base {
253
  ]
254
  ],
255
  [
256
- 'name' => 'data_table_content_template_pro_alert',
257
- 'label' => esc_html__( 'Templates option available in pro version!', 'essential-addons-elementor' ),
258
- 'type' => Controls_Manager::HEADING,
259
- 'condition' => [
260
- 'eael_data_table_content_type' => 'template'
261
- ]
262
- ],
 
263
  [
264
  'name' => 'eael_data_table_content_row_title',
265
  'label' => esc_html__( 'Cell Text', 'essential-addons-elementor' ),
@@ -323,6 +314,32 @@ class Widget_Eael_Data_Table extends Widget_Base {
323
 
324
  $this->end_controls_section();
325
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
326
  /**
327
  * -------------------------------------------
328
  * Tab Style (Data Table Style)
@@ -360,100 +377,32 @@ class Widget_Eael_Data_Table extends Widget_Base {
360
  '{{WRAPPER}} .eael-data-table' => 'max-width: {{SIZE}}{{UNIT}};',
361
  ],
362
  ]
363
- );
364
-
365
- $this->add_control(
366
- 'eael_data_table_bg_color',
367
- [
368
- 'label' => esc_html__( 'Background Color', 'essential-addons-elementor' ),
369
- 'type' => Controls_Manager::COLOR,
370
- 'default' => '',
371
- 'selectors' => [
372
- '{{WRAPPER}} .eael-data-table-wrap' => 'background-color: {{VALUE}};',
373
- ],
374
- ]
375
- );
376
-
377
- $this->add_responsive_control(
378
- 'eael_data_table_container_padding',
379
- [
380
- 'label' => esc_html__( 'Padding', 'essential-addons-elementor' ),
381
- 'type' => Controls_Manager::DIMENSIONS,
382
- 'size_units' => [ 'px', 'em', '%' ],
383
- 'selectors' => [
384
- '{{WRAPPER}} .eael-data-table-wrap' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
385
- ],
386
- ]
387
- );
388
-
389
- $this->add_responsive_control(
390
- 'eael_data_table_container_margin',
391
- [
392
- 'label' => esc_html__( 'Margin', 'essential-addons-elementor' ),
393
- 'type' => Controls_Manager::DIMENSIONS,
394
- 'size_units' => [ 'px', 'em', '%' ],
395
- 'selectors' => [
396
- '{{WRAPPER}} .eael-data-table-wrap' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
397
- ],
398
- ]
399
- );
400
-
401
- $this->add_group_control(
402
- Group_Control_Border::get_type(),
403
- [
404
- 'name' => 'eael_data_table_border',
405
- 'label' => esc_html__( 'Border', 'essential-addons-elementor' ),
406
- 'selector' => '{{WRAPPER}} .eael-data-table-wrap',
407
- ]
408
  );
409
 
410
  $this->add_control(
411
- 'eael_data_table_border_radius',
412
- [
413
- 'label' => esc_html__( 'Border Radius', 'essential-addons-elementor' ),
414
- 'type' => Controls_Manager::SLIDER,
415
- 'range' => [
416
- 'px' => [
417
- 'max' => 50,
418
- ],
419
- ],
420
- 'selectors' => [
421
- '{{WRAPPER}} .eael-data-table-wrap' => 'border-radius: {{SIZE}}px;',
 
 
 
 
 
 
 
 
422
  ],
423
- ]
424
- );
425
-
426
- $this->add_responsive_control(
427
- 'eael_data_table_th_padding',
428
- [
429
- 'label' => esc_html__( 'Table Header Padding', 'essential-addons-elementor' ),
430
- 'type' => Controls_Manager::DIMENSIONS,
431
- 'size_units' => [ 'px', 'em', '%' ],
432
- 'selectors' => [
433
- '{{WRAPPER}} .eael-data-table thead tr th' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
434
- ],
435
- ]
436
- );
437
-
438
- $this->add_responsive_control(
439
- 'eael_data_table_td_padding',
440
- [
441
- 'label' => esc_html__( 'Table Data Padding', 'essential-addons-elementor' ),
442
- 'type' => Controls_Manager::DIMENSIONS,
443
- 'size_units' => [ 'px', 'em', '%' ],
444
- 'selectors' => [
445
- '{{WRAPPER}} .eael-data-table tbody tr td' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
446
- ],
447
- ]
448
- );
449
-
450
- $this->add_group_control(
451
- Group_Control_Box_Shadow::get_type(),
452
- [
453
- 'name' => 'eael_data_table_shadow',
454
- 'selector' => '{{WRAPPER}} .eael-data-table-wrap',
455
- ]
456
- );
457
 
458
  $this->end_controls_section();
459
 
@@ -488,6 +437,19 @@ class Widget_Eael_Data_Table extends Widget_Base {
488
  ]
489
  );
490
 
 
 
 
 
 
 
 
 
 
 
 
 
 
491
  $this->start_controls_tabs('eael_data_table_header_title_clrbg');
492
 
493
  $this->start_controls_tab( 'eael_data_table_header_title_normal', [ 'label' => esc_html__( 'Normal', 'essential-addons-elementor' ) ] );
@@ -499,7 +461,10 @@ class Widget_Eael_Data_Table extends Widget_Base {
499
  'type' => Controls_Manager::COLOR,
500
  'default' => '#fff',
501
  'selectors' => [
502
- '{{WRAPPER}} .eael-data-table thead tr th' => 'color: {{VALUE}};'
 
 
 
503
  ],
504
  ]
505
  );
@@ -511,7 +476,7 @@ class Widget_Eael_Data_Table extends Widget_Base {
511
  'type' => Controls_Manager::COLOR,
512
  'default' => '#4a4893',
513
  'selectors' => [
514
- '{{WRAPPER}} .eael-data-table thead tr th' => 'background-color: {{VALUE}};',
515
  ],
516
  ]
517
  );
@@ -521,7 +486,7 @@ class Widget_Eael_Data_Table extends Widget_Base {
521
  [
522
  'name' => 'eael_data_table_header_border',
523
  'label' => esc_html__( 'Border', 'essential-addons-elementor' ),
524
- 'selector' => '{{WRAPPER}} .eael-data-table thead tr th',
525
  ]
526
  );
527
 
@@ -537,6 +502,9 @@ class Widget_Eael_Data_Table extends Widget_Base {
537
  'default' => '#fff',
538
  'selectors' => [
539
  '{{WRAPPER}} .eael-data-table thead tr th:hover' => 'color: {{VALUE}};',
 
 
 
540
  ],
541
  ]
542
  );
@@ -569,7 +537,7 @@ class Widget_Eael_Data_Table extends Widget_Base {
569
  Group_Control_Typography::get_type(),
570
  [
571
  'name' => 'eael_data_table_header_title_typography',
572
- 'selector' => '{{WRAPPER}} .eael-data-table thead tr th',
573
  ]
574
  );
575
 
@@ -654,6 +622,7 @@ class Widget_Eael_Data_Table extends Widget_Base {
654
  [
655
  'label' => esc_html__( 'Even Cell', 'essential-addons-elementor' ),
656
  'type' => Controls_Manager::HEADING,
 
657
  ]
658
  );
659
 
@@ -687,6 +656,7 @@ class Widget_Eael_Data_Table extends Widget_Base {
687
  'name' => 'eael_data_table_cell_border',
688
  'label' => esc_html__( 'Border', 'essential-addons-elementor' ),
689
  'selector' => '{{WRAPPER}} .eael-data-table tbody tr td',
 
690
  ]
691
  );
692
 
@@ -768,7 +738,7 @@ class Widget_Eael_Data_Table extends Widget_Base {
768
  Group_Control_Typography::get_type(),
769
  [
770
  'name' => 'eael_data_table_content_typography',
771
- 'selector' => '{{WRAPPER}} .eael-data-table tbody tr td',
772
  ]
773
  );
774
 
@@ -777,6 +747,7 @@ class Widget_Eael_Data_Table extends Widget_Base {
777
  [
778
  'label' => esc_html__( 'Link Color', 'essential-addons-elementor' ),
779
  'type' => Controls_Manager::HEADING,
 
780
  ]
781
  );
782
 
@@ -843,6 +814,113 @@ class Widget_Eael_Data_Table extends Widget_Base {
843
  'prefix_class' => 'eael-dt-td-align-',
844
  ]
845
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
846
 
847
  $this->end_controls_section();
848
 
@@ -879,7 +957,8 @@ class Widget_Eael_Data_Table extends Widget_Base {
879
  $table_td[] = [
880
  'row_id' => $table_tr[$last_key]['id'],
881
  'type' => $content_row['eael_data_table_content_row_type'],
882
- 'content_type' => $content_row['eael_data_table_content_type'],
 
883
  'title' => $tbody_content,
884
  'link_url' => $content_row['eael_data_table_content_row_title_link']['url'],
885
  'link_target' => $target,
@@ -890,17 +969,27 @@ class Widget_Eael_Data_Table extends Widget_Base {
890
  'tr_id' => $content_row['eael_data_table_content_row_css_id']
891
  ];
892
  }
893
- }
894
  $table_th_count = count($settings['eael_data_table_header_cols_data']);
895
  $this->add_render_attribute('eael_data_table_wrap', [
896
  'class' => 'eael-data-table-wrap',
897
  'data-table_enabled' => $settings['eael_section_data_table_enabled'] ? 'true': 'false',
898
- 'data-table_id' => esc_attr($this->get_id())
 
899
  ]);
900
  $this->add_render_attribute('eael_data_table', [
901
- 'class' => 'tablesorter eael-data-table',
902
  'id' => 'eael-data-table-'.esc_attr($this->get_id())
903
  ]);
 
 
 
 
 
 
 
 
 
904
  ?>
905
  <div <?php echo $this->get_render_attribute_string('eael_data_table_wrap'); ?>>
906
  <table <?php echo $this->get_render_attribute_string('eael_data_table'); ?>>
@@ -908,8 +997,9 @@ class Widget_Eael_Data_Table extends Widget_Base {
908
  <tr class="table-header">
909
  <?php $i = 0; foreach( $settings['eael_data_table_header_cols_data'] as $header_title ) :
910
  $this->add_render_attribute('th_class'.$i, [
911
- 'class' => [ 'sorting', $header_title['eael_data_table_header_css_class'] ],
912
- 'id' => $header_title['eael_data_table_header_css_id']
 
913
  ]);
914
  ?>
915
  <th <?php echo $this->get_render_attribute_string('th_class'.$i); ?>>
@@ -921,7 +1011,15 @@ class Widget_Eael_Data_Table extends Widget_Base {
921
  ?>
922
  <i <?php echo $this->get_render_attribute_string('table_header_col_icon'.$i); ?>></i>
923
  <?php endif; ?>
924
- <?php echo __( $header_title['eael_data_table_header_col'], 'essential-addons-elementor' ); ?></th>
 
 
 
 
 
 
 
 
925
  <?php $i++; endforeach; ?>
926
  </tr>
927
  </thead>
@@ -941,12 +1039,28 @@ class Widget_Eael_Data_Table extends Widget_Base {
941
  ]
942
  );
943
  ?>
944
- <?php if( !empty( $table_td[$j]['link_url'] ) && $table_td[$j]['content_type'] == 'textarea' ) : ?>
945
  <td <?php echo $this->get_render_attribute_string('table_inside_td'.$i.$j); ?>>
946
- <a href="<?php echo esc_url( $table_td[$j]['link_url'] ); ?>" <?php echo $table_td[$j]['link_target'] ?> <?php echo $table_td[$j]['nofollow'] ?>><?php echo wp_kses_post($table_td[$j]['title']); ?></a>
 
 
947
  </td>
 
 
 
 
 
 
 
 
 
 
 
 
948
  <?php else: ?>
949
- <td <?php echo $this->get_render_attribute_string('table_inside_td'.$i.$j); ?>><?php echo $table_td[$j]['title']; ?></td>
 
 
950
  <?php endif; ?>
951
  <?php
952
  }
40
  );
41
 
42
  $this->add_control(
43
+ 'eael_section_data_table_enabled',
44
+ [
45
  'label' => __( 'Enable Table Sorting', 'essential-addons-elementor' ),
46
  'type' => Controls_Manager::SWITCHER,
47
+ 'default' => 'true',
48
  'label_on' => esc_html__( 'Yes', 'essential-addons-elementor' ),
49
  'label_off' => esc_html__( 'No', 'essential-addons-elementor' ),
50
  'return_value' => 'true',
51
+ ]
 
 
 
 
 
 
 
 
 
 
 
52
  );
53
 
54
+
55
  $this->add_control(
56
  'eael_data_table_header_cols_data',
57
  [
75
  'name' => 'eael_data_table_header_col_span',
76
  'label' => esc_html__( 'Column Span', 'essential-addons-elementor' ),
77
  'default' => '',
78
+ 'type' => Controls_Manager::TEXT,
79
  'label_block' => false,
80
  ],
 
 
 
 
 
 
 
 
81
  [
82
  'name' => 'eael_data_table_header_col_icon_enabled',
83
  'label' => esc_html__( 'Enable Header Icon', 'essential-addons-elementor' ),
110
  'eael_data_table_header_col_icon_enabled' => 'true'
111
  ]
112
  ],
 
 
 
 
 
 
 
 
113
  [
114
  'name' => 'eael_data_table_header_col_icon',
115
  'label' => esc_html__( 'Icon', 'essential-addons-elementor' ),
120
  'eael_data_table_header_icon_type' => 'icon'
121
  ]
122
  ],
123
+ [
124
+ 'name' => 'eael_data_table_header_col_img',
125
+ 'label' => esc_html__( 'Image', 'essential-addons-elementor' ),
126
+ 'type' => Controls_Manager::MEDIA,
127
+ 'default' => [
128
+ 'url' => Utils::get_placeholder_image_src(),
129
+ ],
130
+ 'condition' => [
131
+ 'eael_data_table_header_icon_type' => 'image'
132
+ ]
133
+ ],
134
+ [
135
+ 'name' => 'eael_data_table_header_col_img_size',
136
+ 'label' => esc_html__( 'Image Size(px)', 'essential-addons-elementor' ),
137
+ 'default' => '25',
138
+ 'type' => Controls_Manager::NUMBER,
139
+ 'label_block' => false,
140
+ 'condition' => [
141
+ 'eael_data_table_header_icon_type' => 'image'
142
+ ]
143
+ ],
144
  [
145
  'name' => 'eael_data_table_header_css_class',
146
  'label' => esc_html__( 'CSS Class', 'essential-addons-elementor' ),
199
  'name' => 'eael_data_table_content_row_colspan',
200
  'label' => esc_html__( 'Col Span', 'essential-addons-elementor' ),
201
  'type' => Controls_Manager::NUMBER,
202
+ 'description' => esc_html__( 'Default: 1 (optional).'),
203
+ 'default' => 1,
204
+ 'min' => 1,
205
+ 'label_block' => true,
206
  'condition' => [
207
  'eael_data_table_content_row_type' => 'col'
208
  ]
211
  'name' => 'eael_data_table_content_row_rowspan',
212
  'label' => esc_html__( 'Row Span', 'essential-addons-elementor' ),
213
  'type' => Controls_Manager::NUMBER,
214
+ 'description' => esc_html__( 'Default: 1 (optional).'),
215
+ 'default' => 1,
216
+ 'min' => 1,
217
+ 'label_block' => true,
218
  'condition' => [
219
  'eael_data_table_content_row_type' => 'col'
220
  ]
221
  ],
 
 
 
 
 
 
 
 
 
222
  [
223
  'name' => 'eael_data_table_content_type',
224
  'label' => esc_html__( 'Content Type', 'essential-addons-elementor' ),
243
  ]
244
  ],
245
  [
246
+ 'name' => 'eael_primary_templates_for_tables',
247
+ 'label' => __( 'Choose Template', 'essential-addons-elementor' ),
248
+ 'type' => Controls_Manager::SELECT,
249
+ 'options' => eael_get_page_templates(),
250
+ 'condition' => [
251
+ 'eael_data_table_content_type' => 'template',
252
+ ],
253
+ ],
254
  [
255
  'name' => 'eael_data_table_content_row_title',
256
  'label' => esc_html__( 'Cell Text', 'essential-addons-elementor' ),
314
 
315
  $this->end_controls_section();
316
 
317
+ /**
318
+ * Go Premium For More Features
319
+ */
320
+ $this->start_controls_section(
321
+ 'eael_section_pro',
322
+ [
323
+ 'label' => __( 'Go Premium for More Features', 'essential-addons-elementor' )
324
+ ]
325
+ );
326
+ $this->add_control(
327
+ 'eael_control_get_pro',
328
+ [
329
+ 'label' => __( 'Unlock more possibilities', 'essential-addons-elementor' ),
330
+ 'type' => Controls_Manager::CHOOSE,
331
+ 'options' => [
332
+ '1' => [
333
+ 'title' => __( '', 'essential-addons-elementor' ),
334
+ 'icon' => 'fa fa-unlock-alt',
335
+ ],
336
+ ],
337
+ 'default' => '1',
338
+ 'description' => '<span class="pro-feature"> Get the <a href="https://essential-addons.com/elementor/buy.php" target="_blank">Pro version</a> for more stunning elements and customization options.</span>'
339
+ ]
340
+ );
341
+ $this->end_controls_section();
342
+
343
  /**
344
  * -------------------------------------------
345
  * Tab Style (Data Table Style)
377
  '{{WRAPPER}} .eael-data-table' => 'max-width: {{SIZE}}{{UNIT}};',
378
  ],
379
  ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
380
  );
381
 
382
  $this->add_control(
383
+ 'table_alignment',
384
+ [
385
+ 'label' => __( 'Alignment', 'essential-addons-elementor' ),
386
+ 'type' => Controls_Manager::CHOOSE,
387
+ 'label_block' => false,
388
+ 'default' => 'center',
389
+ 'options' => [
390
+ 'left' => [
391
+ 'title' => __( 'Left', 'essential-addons-elementor' ),
392
+ 'icon' => 'eicon-h-align-left',
393
+ ],
394
+ 'center' => [
395
+ 'title' => __( 'Center', 'essential-addons-elementor' ),
396
+ 'icon' => 'eicon-h-align-center',
397
+ ],
398
+ 'right' => [
399
+ 'title' => __( 'Right', 'essential-addons-elementor' ),
400
+ 'icon' => 'eicon-h-align-right',
401
+ ],
402
  ],
403
+ 'prefix_class' => 'eael-table-align-',
404
+ ]
405
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
406
 
407
  $this->end_controls_section();
408
 
437
  ]
438
  );
439
 
440
+ $this->add_responsive_control(
441
+ 'eael_data_table_each_header_padding',
442
+ [
443
+ 'label' => esc_html__( 'Padding', 'essential-addons-elementor' ),
444
+ 'type' => Controls_Manager::DIMENSIONS,
445
+ 'size_units' => [ 'px', 'em' ],
446
+ 'selectors' => [
447
+ '{{WRAPPER}} .eael-data-table .table-header th' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
448
+ '{{WRAPPER}} .eael-data-table tbody tr td .th-mobile-screen' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
449
+ ],
450
+ ]
451
+ );
452
+
453
  $this->start_controls_tabs('eael_data_table_header_title_clrbg');
454
 
455
  $this->start_controls_tab( 'eael_data_table_header_title_normal', [ 'label' => esc_html__( 'Normal', 'essential-addons-elementor' ) ] );
461
  'type' => Controls_Manager::COLOR,
462
  'default' => '#fff',
463
  'selectors' => [
464
+ '{{WRAPPER}} .eael-data-table thead tr th' => 'color: {{VALUE}};',
465
+ '{{WRAPPER}} table.dataTable thead .sorting:after' => 'color: {{VALUE}};',
466
+ '{{WRAPPER}} table.dataTable thead .sorting_asc:after' => 'color: {{VALUE}};',
467
+ '{{WRAPPER}} table.dataTable thead .sorting_desc:after' => 'color: {{VALUE}};',
468
  ],
469
  ]
470
  );
476
  'type' => Controls_Manager::COLOR,
477
  'default' => '#4a4893',
478
  'selectors' => [
479
+ '{{WRAPPER}} .eael-data-table thead tr th' => 'background-color: {{VALUE}};'
480
  ],
481
  ]
482
  );
486
  [
487
  'name' => 'eael_data_table_header_border',
488
  'label' => esc_html__( 'Border', 'essential-addons-elementor' ),
489
+ 'selector' => '{{WRAPPER}} .eael-data-table thead tr th'
490
  ]
491
  );
492
 
502
  'default' => '#fff',
503
  'selectors' => [
504
  '{{WRAPPER}} .eael-data-table thead tr th:hover' => 'color: {{VALUE}};',
505
+ '{{WRAPPER}} table.dataTable thead .sorting:after:hover' => 'color: {{VALUE}};',
506
+ '{{WRAPPER}} table.dataTable thead .sorting_asc:after:hover' => 'color: {{VALUE}};',
507
+ '{{WRAPPER}} table.dataTable thead .sorting_desc:after:hover' => 'color: {{VALUE}};',
508
  ],
509
  ]
510
  );
537
  Group_Control_Typography::get_type(),
538
  [
539
  'name' => 'eael_data_table_header_title_typography',
540
+ 'selector' => '{{WRAPPER}} .eael-data-table thead > tr th',
541
  ]
542
  );
543
 
622
  [
623
  'label' => esc_html__( 'Even Cell', 'essential-addons-elementor' ),
624
  'type' => Controls_Manager::HEADING,
625
+ 'separator' => 'before'
626
  ]
627
  );
628
 
656
  'name' => 'eael_data_table_cell_border',
657
  'label' => esc_html__( 'Border', 'essential-addons-elementor' ),
658
  'selector' => '{{WRAPPER}} .eael-data-table tbody tr td',
659
+ 'separator' => 'before'
660
  ]
661
  );
662
 
738
  Group_Control_Typography::get_type(),
739
  [
740
  'name' => 'eael_data_table_content_typography',
741
+ 'selector' => '{{WRAPPER}} .eael-data-table tbody tr td'
742
  ]
743
  );
744
 
747
  [
748
  'label' => esc_html__( 'Link Color', 'essential-addons-elementor' ),
749
  'type' => Controls_Manager::HEADING,
750
+ 'separator' => 'before'
751
  ]
752
  );
753
 
814
  'prefix_class' => 'eael-dt-td-align-',
815
  ]
816
  );
817
+ $this->end_controls_section();
818
+
819
+
820
+ /**
821
+ * -------------------------------------------
822
+ * Responsive Style (Data Table Content Style)
823
+ * -------------------------------------------
824
+ */
825
+ $this->start_controls_section(
826
+ 'eael_section_data_table_responsive_style_settings',
827
+ [
828
+ 'label' => esc_html__( 'Responsive Options', 'essential-addons-elementor' ),
829
+ 'devices' => [ 'tablet', 'mobile' ],
830
+ 'tab' => Controls_Manager::TAB_STYLE
831
+ ]
832
+ );
833
+
834
+ $this->add_control(
835
+ 'eael_enable_responsive_header_styles',
836
+ [
837
+ 'label' => __( 'Enable Responsive Table', 'essential-addons-elementor' ),
838
+ 'description' => esc_html__( 'If enabled, table header will be automatically responsive for mobile.', 'essential-addons-elementor' ),
839
+ 'type' => Controls_Manager::SWITCHER,
840
+ 'label_on' => esc_html__( 'Yes', 'essential-addons-elementor' ),
841
+ 'label_off' => esc_html__( 'No', 'essential-addons-elementor' ),
842
+ 'return_value' => 'yes',
843
+ ]
844
+ );
845
+
846
+ $this->add_responsive_control(
847
+ 'mobile_table_header_width',
848
+ [
849
+ 'label' => __( 'Width', 'essential-addons-elementor' ),
850
+ 'type' => Controls_Manager::SLIDER,
851
+ 'default' => [
852
+ 'size' => 100,
853
+ 'unit' => 'px',
854
+ ],
855
+ 'size_units' => [ 'px' ],
856
+ 'range' => [
857
+ 'px' => [
858
+ 'min' => 1,
859
+ 'max' => 200,
860
+ ],
861
+ ],
862
+ 'selectors' => [
863
+ '{{WRAPPER}} .eael-data-table .th-mobile-screen' => 'flex-basis: {{SIZE}}px;',
864
+ ],
865
+ 'condition' => [
866
+ 'eael_enable_responsive_header_styles' => 'yes'
867
+ ]
868
+ ]
869
+ );
870
+
871
+ $this->add_responsive_control(
872
+ 'eael_data_table_responsive_header_color',
873
+ [
874
+ 'label' => esc_html__( 'Color', 'essential-addons-elementor' ),
875
+ 'type' => Controls_Manager::COLOR,
876
+ 'default' => '',
877
+ 'selectors' => [
878
+ '{{WRAPPER}} .eael-data-table tbody .th-mobile-screen' => 'color: {{VALUE}};'
879
+ ],
880
+ 'condition' => [
881
+ 'eael_enable_responsive_header_styles' => 'yes'
882
+ ]
883
+ ]
884
+ );
885
+
886
+ $this->add_responsive_control(
887
+ 'eael_data_table_responsive_header_bg_color',
888
+ [
889
+ 'label' => esc_html__( 'Background Color', 'essential-addons-elementor' ),
890
+ 'type' => Controls_Manager::COLOR,
891
+ 'default' => '',
892
+ 'selectors' => [
893
+ '{{WRAPPER}} .eael-data-table tbody .th-mobile-screen' => 'background-color: {{VALUE}};'
894
+ ],
895
+ 'condition' => [
896
+ 'eael_enable_responsive_header_styles' => 'yes'
897
+ ]
898
+ ]
899
+ );
900
+
901
+ $this->add_group_control(
902
+ Group_Control_Typography::get_type(),
903
+ [
904
+ 'name' => 'eael_data_table_responsive_header_typography',
905
+ 'selector' => '{{WRAPPER}} .eael-data-table .th-mobile-screen',
906
+ 'condition' => [
907
+ 'eael_enable_responsive_header_styles' => 'yes'
908
+ ]
909
+ ]
910
+ );
911
+
912
+ $this->add_group_control(
913
+ Group_Control_Border::get_type(),
914
+ [
915
+ 'name' => 'eael_data_table_responsive_header_border',
916
+ 'label' => esc_html__( 'Border', 'essential-addons-elementor' ),
917
+ 'selector' => '{{WRAPPER}} tbody td .th-mobile-screen',
918
+ 'condition' => [
919
+ 'eael_enable_responsive_header_styles' => 'yes'
920
+ ]
921
+ ]
922
+ );
923
+
924
 
925
  $this->end_controls_section();
926
 
957
  $table_td[] = [
958
  'row_id' => $table_tr[$last_key]['id'],
959
  'type' => $content_row['eael_data_table_content_row_type'],
960
+ 'content_type' => $content_row['eael_data_table_content_type'],
961
+ 'template' => $content_row['eael_primary_templates_for_tables'],
962
  'title' => $tbody_content,
963
  'link_url' => $content_row['eael_data_table_content_row_title_link']['url'],
964
  'link_target' => $target,
969
  'tr_id' => $content_row['eael_data_table_content_row_css_id']
970
  ];
971
  }
972
+ }
973
  $table_th_count = count($settings['eael_data_table_header_cols_data']);
974
  $this->add_render_attribute('eael_data_table_wrap', [
975
  'class' => 'eael-data-table-wrap',
976
  'data-table_enabled' => $settings['eael_section_data_table_enabled'] ? 'true': 'false',
977
+ 'data-table_id' => esc_attr($this->get_id()),
978
+ 'data-custom_responsive' => $settings['eael_enable_responsive_header_styles'] ? 'true' : 'false'
979
  ]);
980
  $this->add_render_attribute('eael_data_table', [
981
+ 'class' => [ 'tablesorter eael-data-table', esc_attr($settings['table_alignment']) ],
982
  'id' => 'eael-data-table-'.esc_attr($this->get_id())
983
  ]);
984
+
985
+ $this->add_render_attribute( 'td_content', [
986
+ 'class' => 'td-content'
987
+ ]);
988
+
989
+ if('yes' == $settings['eael_enable_responsive_header_styles']) {
990
+ $this->add_render_attribute('eael_data_table_wrap', 'class', 'custom-responsive-option-enable');
991
+ }
992
+
993
  ?>
994
  <div <?php echo $this->get_render_attribute_string('eael_data_table_wrap'); ?>>
995
  <table <?php echo $this->get_render_attribute_string('eael_data_table'); ?>>
997
  <tr class="table-header">
998
  <?php $i = 0; foreach( $settings['eael_data_table_header_cols_data'] as $header_title ) :
999
  $this->add_render_attribute('th_class'.$i, [
1000
+ 'class' => [ 'sorting', $header_title['eael_data_table_header_css_class'] ],
1001
+ 'id' => $header_title['eael_data_table_header_css_id'],
1002
+ 'colspan' => $header_title['eael_data_table_header_col_span']
1003
  ]);
1004
  ?>
1005
  <th <?php echo $this->get_render_attribute_string('th_class'.$i); ?>>
1011
  ?>
1012
  <i <?php echo $this->get_render_attribute_string('table_header_col_icon'.$i); ?>></i>
1013
  <?php endif; ?>
1014
+ <?php
1015
+ if( $header_title['eael_data_table_header_col_icon_enabled'] == 'true' && $header_title['eael_data_table_header_icon_type'] == 'image' ) :
1016
+ $this->add_render_attribute('data_table_th_img'.$i, [
1017
+ 'src' => esc_url( $header_title['eael_data_table_header_col_img']['url'] ),
1018
+ 'class' => 'eael-data-table-th-img',
1019
+ 'style' => "width:{$header_title['eael_data_table_header_col_img_size']}px;",
1020
+ 'alt' => esc_attr( $header_title['eael_data_table_header_col'] )
1021
+ ]);
1022
+ ?><img <?php echo $this->get_render_attribute_string('data_table_th_img'.$i); ?>><?php endif; ?><?php echo __( $header_title['eael_data_table_header_col'], 'essential-addons-elementor' ); ?></th>
1023
  <?php $i++; endforeach; ?>
1024
  </tr>
1025
  </thead>
1039
  ]
1040
  );
1041
  ?>
1042
+ <?php if( $table_td[$j]['content_type'] == 'textarea' && !empty($table_td[$j]['link_url']) ) : ?>
1043
  <td <?php echo $this->get_render_attribute_string('table_inside_td'.$i.$j); ?>>
1044
+ <div class="td-content-wrapper">
1045
+ <a href="<?php echo esc_url( $table_td[$j]['link_url'] ); ?>" <?php echo $table_td[$j]['link_target'] ?> <?php echo $table_td[$j]['nofollow'] ?>><?php echo wp_kses_post($table_td[$j]['title']); ?></a>
1046
+ </div>
1047
  </td>
1048
+
1049
+ <?php elseif( $table_td[$j]['content_type'] == 'template' && ! empty($table_td[$j]['template']) ) : ?>
1050
+ <td <?php echo $this->get_render_attribute_string('table_inside_td'.$i.$j); ?>>
1051
+ <div class="td-content-wrapper">
1052
+ <div <?php echo $this->get_render_attribute_string('td_content'); ?>>
1053
+ <?php
1054
+ $eael_frontend = new Frontend;
1055
+ echo $eael_frontend->get_builder_content( intval($table_td[$j]['template']), true );
1056
+ ?>
1057
+ </div>
1058
+ </div>
1059
+ </td>
1060
  <?php else: ?>
1061
+ <td <?php echo $this->get_render_attribute_string('table_inside_td'.$i.$j); ?>>
1062
+ <div class="td-content-wrapper"><div <?php echo $this->get_render_attribute_string('td_content'); ?>><?php echo $table_td[$j]['title']; ?></div></div>
1063
+ </td>
1064
  <?php endif; ?>
1065
  <?php
1066
  }
elements/flipbox/flipbox.php CHANGED
@@ -1,6 +1,8 @@
1
  <?php
2
  namespace Elementor;
3
 
 
 
4
  if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
5
 
6
  class Widget_Eael_Flip_Box extends Widget_Base {
@@ -51,91 +53,178 @@ class Widget_Eael_Flip_Box extends Widget_Base {
51
  ]
52
  );
53
 
54
- $this->add_responsive_control(
55
- 'eael_flipbox_img_or_icon',
56
- [
57
- 'label' => esc_html__( 'Image or Icon', 'essential-addons-elementor' ),
58
- 'type' => Controls_Manager::CHOOSE,
59
- 'label_block' => true,
60
- 'options' => [
61
- 'img' => [
62
- 'title' => esc_html__( 'Image', 'essential-addons-elementor' ),
63
- 'icon' => 'fa fa-picture-o',
64
- ],
65
- 'icon' => [
66
- 'title' => esc_html__( 'Icon', 'essential-addons-elementor' ),
67
- 'icon' => 'fa fa-info-circle',
68
- ],
69
- ],
70
- 'default' => 'icon',
71
- ]
72
- );
73
- /**
74
- * Condition: 'eael_flipbox_img_or_icon' => 'img'
75
- */
76
- $this->add_control(
77
- 'eael_flipbox_image',
78
- [
79
- 'label' => esc_html__( 'Flipbox Image', 'essential-addons-elementor' ),
80
- 'type' => Controls_Manager::MEDIA,
81
- 'default' => [
82
- 'url' => Utils::get_placeholder_image_src(),
83
- ],
84
- 'condition' => [
85
- 'eael_flipbox_img_or_icon' => 'img'
86
- ]
87
- ]
88
- );
89
 
90
- $this->add_control(
91
- 'eael_flipbox_image_resizer',
92
- [
93
- 'label' => esc_html__( 'Image Resizer', 'essential-addons-elementor' ),
94
- 'type' => Controls_Manager::SLIDER,
95
- 'default' => [
96
- 'size' => '100'
97
- ],
98
- 'range' => [
99
- 'px' => [
100
- 'max' => 500,
101
- ],
102
- ],
103
- 'selectors' => [
104
- '{{WRAPPER}} .eael-elements-flip-box-icon-image img' => 'width: {{SIZE}}px;',
105
- ],
106
- 'condition' => [
107
- 'eael_flipbox_img_or_icon' => 'img'
108
  ]
109
- ]
110
- );
111
 
112
- $this->add_group_control(
113
- Group_Control_Image_Size::get_type(),
114
- [
115
- 'name' => 'thumbnail',
116
- 'default' => 'full',
117
- 'condition' => [
118
- 'eael_flipbox_image[url]!' => '',
119
- ],
120
- 'condition' => [
121
- 'eael_flipbox_img_or_icon' => 'img'
122
- ]
123
- ]
124
- );
125
- /**
126
- * Condition: 'eael_flipbox_img_or_icon' => 'icon'
127
- */
128
- $this->add_control(
129
- 'eael_flipbox_icon',
130
- [
131
- 'label' => esc_html__( 'Icon', 'essential-addons-elementor' ),
132
- 'type' => Controls_Manager::ICON,
133
- 'default' => 'fa fa-snowflake-o',
134
- 'condition' => [
135
- 'eael_flipbox_img_or_icon' => 'icon'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136
  ]
137
- ]
138
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
 
140
  $this->end_controls_section();
141
 
@@ -246,6 +335,102 @@ class Widget_Eael_Flip_Box extends Widget_Base {
246
  ]
247
  );
248
  $this->end_controls_section();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
249
  /**
250
  * Go Premium For More Features
251
  */
@@ -271,6 +456,7 @@ class Widget_Eael_Flip_Box extends Widget_Base {
271
  ]
272
  );
273
  $this->end_controls_section();
 
274
  /**
275
  * -------------------------------------------
276
  * Tab Style (Flipbox Style)
@@ -308,18 +494,6 @@ class Widget_Eael_Flip_Box extends Widget_Base {
308
  ]
309
  );
310
 
311
- $this->add_responsive_control(
312
- 'eael_flipbox_container_padding',
313
- [
314
- 'label' => esc_html__( 'Padding', 'essential-addons-elementor' ),
315
- 'type' => Controls_Manager::DIMENSIONS,
316
- 'size_units' => [ 'px', 'em', '%' ],
317
- 'selectors' => [
318
- '{{WRAPPER}} .eael-elements-progression-flip-box-container' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
319
- ],
320
- ]
321
- );
322
-
323
  $this->add_responsive_control(
324
  'eael_flipbox_front_back_padding',
325
  [
@@ -333,24 +507,12 @@ class Widget_Eael_Flip_Box extends Widget_Base {
333
  ]
334
  );
335
 
336
- $this->add_responsive_control(
337
- 'eael_flipbox_container_margin',
338
- [
339
- 'label' => esc_html__( 'Margin', 'essential-addons-elementor' ),
340
- 'type' => Controls_Manager::DIMENSIONS,
341
- 'size_units' => [ 'px', 'em', '%' ],
342
- 'selectors' => [
343
- '{{WRAPPER}} .eael-elements-progression-flip-box-container' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
344
- ],
345
- ]
346
- );
347
-
348
  $this->add_group_control(
349
  Group_Control_Border::get_type(),
350
  [
351
  'name' => 'eael_filbpox_border',
352
  'label' => esc_html__( 'Border Style', 'essential-addons-elementor' ),
353
- 'selectors' => ['{{WRAPPER}} .eael-elements-flip-box-front-container', '{{WRAPPER}} .eael-elements-flip-box-rear-container'],
354
  ]
355
  );
356
 
@@ -359,13 +521,22 @@ class Widget_Eael_Flip_Box extends Widget_Base {
359
  [
360
  'label' => esc_html__( 'Border Radius', 'essential-addons-elementor' ),
361
  'type' => Controls_Manager::SLIDER,
 
362
  'range' => [
363
  'px' => [
364
- 'max' => 50,
 
 
365
  ],
 
 
 
 
 
366
  ],
367
  'selectors' => [
368
- '{{WRAPPER}} .eael-elements-progression-flip-box-container' => 'border-radius: {{SIZE}}px;',
 
369
  ],
370
  ]
371
  );
@@ -374,7 +545,7 @@ class Widget_Eael_Flip_Box extends Widget_Base {
374
  Group_Control_Box_Shadow::get_type(),
375
  [
376
  'name' => 'eael_flipbox_shadow',
377
- 'selector' => '{{WRAPPER}} .eael-elements-progression-flip-box-container',
378
  ]
379
  );
380
 
@@ -687,33 +858,261 @@ class Widget_Eael_Flip_Box extends Widget_Base {
687
  ]
688
  ]
689
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
690
 
691
  $this->end_controls_section();
692
 
693
  }
694
 
695
 
696
- protected function render( ) {
697
 
698
  $settings = $this->get_settings();
699
  $flipbox_image = $this->get_settings( 'eael_flipbox_image' );
700
  $flipbox_image_url = Group_Control_Image_Size::get_attachment_image_src( $flipbox_image['id'], 'thumbnail', $settings );
701
- if( empty( $flipbox_image_url ) ) : $flipbox_image_url = $flipbox_image['url']; else: $flipbox_image_url = $flipbox_image_url; endif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
702
 
703
  ?>
704
 
705
- <div class="eael-elements-progression-flip-box-container eael-animate-flip eael-<?php echo esc_attr( $settings['eael_flipbox_type'] ); ?>">
706
- <div class="eael-elements-flip-box-flip-card">
 
707
  <div class="eael-elements-flip-box-front-container">
708
  <div class="eael-elements-slider-display-table">
709
  <div class="eael-elements-flip-box-vertical-align">
710
  <div class="eael-elements-flip-box-padding">
711
  <div class="eael-elements-flip-box-icon-image">
712
- <?php if( 'icon' === $settings['eael_flipbox_img_or_icon'] ) : ?>
713
- <i class="<?php echo esc_attr( $settings['eael_flipbox_icon'] ); ?>"></i>
714
- <?php elseif( 'img' === $settings['eael_flipbox_img_or_icon'] ): ?>
715
- <img src="<?php echo esc_url( $flipbox_image_url ); ?>" alt="">
716
- <?php endif; ?>
717
  </div>
718
  <h2 class="eael-elements-flip-box-heading"><?php echo esc_html__( $settings['eael_flipbox_front_title'], 'essential-addons-elementor' ); ?></h2>
719
  <div class="eael-elements-flip-box-content">
@@ -723,31 +1122,48 @@ class Widget_Eael_Flip_Box extends Widget_Base {
723
  </div>
724
  </div>
725
  </div>
 
726
  <div class="eael-elements-flip-box-rear-container">
727
  <div class="eael-elements-slider-display-table">
728
  <div class="eael-elements-flip-box-vertical-align">
729
  <div class="eael-elements-flip-box-padding">
730
- <h2 class="eael-elements-flip-box-heading"><?php echo esc_html__( $settings['eael_flipbox_back_title'], 'essential-addons-elementor' ); ?></h2>
 
 
 
 
 
 
 
 
 
 
731
  <div class="eael-elements-flip-box-content">
732
  <p><?php echo __( $settings['eael_flipbox_back_text'], 'essential-addons-elementor' ); ?></p>
733
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
734
  </div>
735
  </div>
736
  </div>
737
  </div>
738
- </div>
739
  </div>
740
 
741
  <?php
742
  }
743
 
744
- protected function content_template() {
745
-
746
- ?>
747
-
748
-
749
- <?php
750
- }
751
  }
752
 
753
 
1
  <?php
2
  namespace Elementor;
3
 
4
+ use Elementor\Modules\DynamicTags\Module as TagsModule;
5
+
6
  if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
7
 
8
  class Widget_Eael_Flip_Box extends Widget_Base {
53
  ]
54
  );
55
 
56
+ $this->start_controls_tabs('icon_image_front_back');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
 
58
+ $this->start_controls_tab(
59
+ 'front',
60
+ [
61
+ 'label' => __( 'Front', 'essential-addons-elementor' )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  ]
63
+ );
 
64
 
65
+ $this->add_control(
66
+ 'eael_flipbox_img_or_icon',
67
+ [
68
+ 'label' => esc_html__( 'Icon Type', 'essential-addons-elementor' ),
69
+ 'type' => Controls_Manager::SELECT,
70
+ 'options' => [
71
+ 'none' => __( 'None', 'essential-addons-elementor' ),
72
+ 'img' => __( 'Image', 'esential-addons-elementor' ),
73
+ 'icon' => __( 'Icon', 'esential-addons-elementor' )
74
+ ],
75
+ 'default' => 'icon',
76
+ ]
77
+ );
78
+
79
+ $this->add_control(
80
+ 'eael_flipbox_image',
81
+ [
82
+ 'label' => esc_html__( 'Flipbox Image', 'essential-addons-elementor' ),
83
+ 'type' => Controls_Manager::MEDIA,
84
+ 'default' => [
85
+ 'url' => Utils::get_placeholder_image_src(),
86
+ ],
87
+ 'condition' => [
88
+ 'eael_flipbox_img_or_icon' => 'img'
89
+ ]
90
+ ]
91
+ );
92
+
93
+ $this->add_control(
94
+ 'eael_flipbox_icon',
95
+ [
96
+ 'label' => esc_html__( 'Icon', 'essential-addons-elementor' ),
97
+ 'type' => Controls_Manager::ICON,
98
+ 'default' => 'fa fa-snowflake-o',
99
+ 'separator' => 'before',
100
+ 'condition' => [
101
+ 'eael_flipbox_img_or_icon' => 'icon'
102
+ ]
103
+ ]
104
+ );
105
+
106
+ $this->add_responsive_control(
107
+ 'eael_flipbox_image_resizer',
108
+ [
109
+ 'label' => esc_html__( 'Image Resizer', 'essential-addons-elementor' ),
110
+ 'type' => Controls_Manager::SLIDER,
111
+ 'default' => [
112
+ 'size' => '100'
113
+ ],
114
+ 'range' => [
115
+ 'px' => [
116
+ 'max' => 500,
117
+ ],
118
+ ],
119
+ 'separator' => 'before',
120
+ 'selectors' => [
121
+ '{{WRAPPER}} .eael-elements-flip-box-front-container .eael-elements-flip-box-icon-image > img' => 'width: {{SIZE}}px;'
122
+ ],
123
+ 'condition' => [
124
+ 'eael_flipbox_img_or_icon' => 'img'
125
+ ]
126
+ ]
127
+ );
128
+
129
+ $this->add_group_control(
130
+ Group_Control_Image_Size::get_type(),
131
+ [
132
+ 'name' => 'thumbnail',
133
+ 'default' => 'full',
134
+ 'condition' => [
135
+ 'eael_flipbox_image[url]!' => '',
136
+ 'eael_flipbox_img_or_icon' => 'img'
137
+ ],
138
+ ]
139
+ );
140
+
141
+ $this->end_controls_tab();
142
+
143
+ $this->start_controls_tab(
144
+ 'back',
145
+ [
146
+ 'label' => __( 'Back', 'essential-addons-elementor' )
147
  ]
148
+ );
149
+
150
+ $this->add_control(
151
+ 'eael_flipbox_img_or_icon_back',
152
+ [
153
+ 'label' => esc_html__( 'Icon Type', 'essential-addons-elementor' ),
154
+ 'type' => Controls_Manager::SELECT,
155
+ 'options' => [
156
+ 'none' => __( 'None', 'essential-addons-elementor' ),
157
+ 'img' => __( 'Image', 'esential-addons-elementor' ),
158
+ 'icon' => __( 'Icon', 'esential-addons-elementor' )
159
+ ],
160
+ 'default' => 'icon'
161
+ ]
162
+ );
163
+
164
+ $this->add_control(
165
+ 'eael_flipbox_image_back',
166
+ [
167
+ 'label' => esc_html__( 'Flipbox Image', 'essential-addons-elementor' ),
168
+ 'type' => Controls_Manager::MEDIA,
169
+ 'default' => [
170
+ 'url' => Utils::get_placeholder_image_src(),
171
+ ],
172
+ 'condition' => [
173
+ 'eael_flipbox_img_or_icon_back' => 'img'
174
+ ]
175
+ ]
176
+ );
177
+
178
+ $this->add_control(
179
+ 'eael_flipbox_icon_back',
180
+ [
181
+ 'label' => esc_html__( 'Icon', 'essential-addons-elementor' ),
182
+ 'type' => Controls_Manager::ICON,
183
+ 'default' => 'fa fa-snowflake-o',
184
+ 'condition' => [
185
+ 'eael_flipbox_img_or_icon_back' => 'icon'
186
+ ]
187
+ ]
188
+ );
189
+
190
+ $this->add_responsive_control(
191
+ 'eael_flipbox_image_resizer_back',
192
+ [
193
+ 'label' => esc_html__( 'Image Resizer', 'essential-addons-elementor' ),
194
+ 'type' => Controls_Manager::SLIDER,
195
+ 'default' => [
196
+ 'size' => '100'
197
+ ],
198
+ 'range' => [
199
+ 'px' => [
200
+ 'max' => 500,
201
+ ],
202
+ ],
203
+ 'separator' => 'before',
204
+ 'selectors' => [
205
+ '{{WRAPPER}} .eael-elements-flip-box-rear-container .flipbox-back-image-icon > img' => 'width: {{SIZE}}px;'
206
+ ],
207
+ 'condition' => [
208
+ 'eael_flipbox_img_or_icon_back' => 'img'
209
+ ]
210
+ ]
211
+ );
212
+
213
+ $this->add_group_control(
214
+ Group_Control_Image_Size::get_type(),
215
+ [
216
+ 'name' => 'thumbnail_back',
217
+ 'default' => 'full',
218
+ 'condition' => [
219
+ 'eael_flipbox_image[url]!' => '',
220
+ 'eael_flipbox_img_or_icon_back' => 'img'
221
+ ],
222
+ ]
223
+ );
224
+
225
+ $this->end_controls_tab();
226
+
227
+ $this->end_controls_tabs();
228
 
229
  $this->end_controls_section();
230
 
335
  ]
336
  );
337
  $this->end_controls_section();
338
+
339
+ /**
340
+ * ----------------------------------------------
341
+ * Flipbox Link
342
+ * ----------------------------------------------
343
+ */
344
+ $this->start_controls_section(
345
+ 'eael_flixbox_link_section',
346
+ [
347
+ 'label' => esc_html__( 'Link', 'essential-addons-elementor' )
348
+ ]
349
+ );
350
+
351
+ $this->add_control(
352
+ 'flipbox_link_type',
353
+ [
354
+ 'label' => __( 'Link Type', 'essential-addons-elementor' ),
355
+ 'type' => Controls_Manager::SELECT,
356
+ 'default' => 'none',
357
+ 'options' => [
358
+ 'none' => __( 'None', 'essential-addons-elementor' ),
359
+ 'box' => __( 'Box', 'essential-addons-elementor' ),
360
+ 'title' => __( 'Title', 'essential-addons-elementor' ),
361
+ 'button' => __( 'Button', 'essential-addons-elementor' ),
362
+ ],
363
+ ]
364
+ );
365
+
366
+ $this->add_control(
367
+ 'flipbox_link',
368
+ [
369
+ 'label' => __( 'Link', 'essential-addons-elementor' ),
370
+ 'type' => Controls_Manager::URL,
371
+ 'dynamic' => [
372
+ 'active' => true,
373
+ 'categories' => [
374
+ TagsModule::POST_META_CATEGORY,
375
+ TagsModule::URL_CATEGORY
376
+ ],
377
+ ],
378
+ 'placeholder' => 'https://www.your-link.com',
379
+ 'default' => [
380
+ 'url' => '#',
381
+ ],
382
+ 'condition' => [
383
+ 'flipbox_link_type!' => 'none',
384
+ ],
385
+ ]
386
+ );
387
+
388
+ $this->add_control(
389
+ 'flipbox_button_text',
390
+ [
391
+ 'label' => __( 'Button Text', 'essential-addons-elementor' ),
392
+ 'type' => Controls_Manager::TEXT,
393
+ 'dynamic' => [
394
+ 'active' => true,
395
+ ],
396
+ 'default' => __( 'Get Started', 'essential-addons-elementor' ),
397
+ 'condition' => [
398
+ 'flipbox_link_type' => 'button',
399
+ ],
400
+ ]
401
+ );
402
+
403
+ $this->add_control(
404
+ 'button_icon',
405
+ [
406
+ 'label' => __( 'Button Icon', 'essential-addons-elementor' ),
407
+ 'type' => Controls_Manager::ICON,
408
+ 'default' => '',
409
+ 'condition' => [
410
+ 'flipbox_link_type' => 'button',
411
+ ],
412
+ ]
413
+ );
414
+
415
+ $this->add_control(
416
+ 'button_icon_position',
417
+ [
418
+ 'label' => __( 'Icon Position', 'essential-addons-elementor' ),
419
+ 'type' => Controls_Manager::SELECT,
420
+ 'default' => 'after',
421
+ 'options' => [
422
+ 'after' => __( 'After', 'essential-addons-elementor' ),
423
+ 'before' => __( 'Before', 'essential-addons-elementor' ),
424
+ ],
425
+ 'condition' => [
426
+ 'flipbox_link_type' => 'button',
427
+ 'button_icon!' => '',
428
+ ],
429
+ ]
430
+ );
431
+
432
+ $this->end_controls_section();
433
+
434
  /**
435
  * Go Premium For More Features
436
  */
456
  ]
457
  );
458
  $this->end_controls_section();
459
+
460
  /**
461
  * -------------------------------------------
462
  * Tab Style (Flipbox Style)
494
  ]
495
  );
496
 
 
 
 
 
 
 
 
 
 
 
 
 
497
  $this->add_responsive_control(
498
  'eael_flipbox_front_back_padding',
499
  [
507
  ]
508
  );
509
 
 
 
 
 
 
 
 
 
 
 
 
 
510
  $this->add_group_control(
511
  Group_Control_Border::get_type(),
512
  [
513
  'name' => 'eael_filbpox_border',
514
  'label' => esc_html__( 'Border Style', 'essential-addons-elementor' ),
515
+ 'selector' => '{{WRAPPER}} .eael-elements-flip-box-front-container, {{WRAPPER}} .eael-elements-flip-box-rear-container',
516
  ]
517
  );
518
 
521
  [
522
  'label' => esc_html__( 'Border Radius', 'essential-addons-elementor' ),
523
  'type' => Controls_Manager::SLIDER,
524
+ 'size_units' => [ 'px', '%' ],
525
  'range' => [
526
  'px' => [
527
+ 'min' => 0,
528
+ 'step' => 1,
529
+ 'max' => 500,
530
  ],
531
+ '%' => [
532
+ 'min' => 0,
533
+ 'step' => 3,
534
+ 'max' => 100
535
+ ]
536
  ],
537
  'selectors' => [
538
+ '{{WRAPPER}} .eael-elements-flip-box-front-container' => 'border-radius: {{SIZE}}{{UNIT}};',
539
+ '{{WRAPPER}} .eael-elements-flip-box-rear-container' => 'border-radius: {{SIZE}}{{UNIT}};',
540
  ],
541
  ]
542
  );
545
  Group_Control_Box_Shadow::get_type(),
546
  [
547
  'name' => 'eael_flipbox_shadow',
548
+ 'selector' => '{{WRAPPER}} .eael-elements-flip-box-front-container, {{WRAPPER}} .eael-elements-flip-box-rear-container'
549
  ]
550
  );
551
 
858
  ]
859
  ]
860
  );
861
+ $this->end_controls_section();
862
+
863
+ /**
864
+ * -------------------------------------------
865
+ * Tab Style (Flip Box Button Style)
866
+ * -------------------------------------------
867
+ */
868
+ $this->start_controls_section(
869
+ 'eael_section_flipbox_button_style_settings',
870
+ [
871
+ 'label' => esc_html__( 'Button Style', 'essential-addons-elementor' ),
872
+ 'tab' => Controls_Manager::TAB_STYLE,
873
+ 'condition' => [
874
+ 'flipbox_link_type' => 'button'
875
+ ]
876
+ ]
877
+ );
878
+
879
+ $this->start_controls_tabs( 'flipbox_button_style_settings' );
880
+
881
+ $this->start_controls_tab(
882
+ 'flipbox_button_normal_style',
883
+ [
884
+ 'label' => __( 'Normal', 'essential-addons-elementor' )
885
+ ]
886
+ );
887
+ $this->add_responsive_control(
888
+ 'eael_flipbox_button_margin',
889
+ [
890
+ 'label' => esc_html__( 'Margin', 'essential-addons-elementor' ),
891
+ 'type' => Controls_Manager::DIMENSIONS,
892
+ 'size_units' => [ 'px', 'em' ],
893
+ 'selectors' => [
894
+ '{{WRAPPER}} .eael-elements-progression-flip-box-container .flipbox-button' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
895
+ ],
896
+ ]
897
+ );
898
+
899
+ $this->add_responsive_control(
900
+ 'eael_flipbox_button_padding',
901
+ [
902
+ 'label' => esc_html__( 'Padding', 'essential-addons-elementor' ),
903
+ 'type' => Controls_Manager::DIMENSIONS,
904
+ 'size_units' => [ 'px', 'em' ],
905
+ 'selectors' => [
906
+ '{{WRAPPER}} .eael-elements-progression-flip-box-container .flipbox-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
907
+ ],
908
+ ]
909
+ );
910
+
911
+ $this->add_control(
912
+ 'eael_flipbox_button_color',
913
+ [
914
+ 'label' => esc_html__( 'Color', 'essential-addons-elementor' ),
915
+ 'type' => Controls_Manager::COLOR,
916
+ 'default' => '#ffffff',
917
+ 'selectors' => [
918
+ '{{WRAPPER}} .eael-elements-progression-flip-box-container .flipbox-button' => 'color: {{VALUE}};',
919
+ ],
920
+ ]
921
+ );
922
+
923
+ $this->add_control(
924
+ 'eael_flipbox_button_bg_color',
925
+ [
926
+ 'label' => esc_html__( 'Background', 'essential-addons-elementor' ),
927
+ 'type' => Controls_Manager::COLOR,
928
+ 'default' => '#000000',
929
+ 'selectors' => [
930
+ '{{WRAPPER}} .eael-elements-progression-flip-box-container .flipbox-button' => 'background: {{VALUE}};',
931
+ ],
932
+ ]
933
+ );
934
+
935
+ $this->add_control(
936
+ 'eael_flipbox_button_border_radius',
937
+ [
938
+ 'label' => esc_html__( 'Border Radius', 'essential-addons-elementor' ),
939
+ 'type' => Controls_Manager::SLIDER,
940
+ 'size_units' => [ 'px' ],
941
+ 'range' => [
942
+ 'px' => [
943
+ 'min' => 0,
944
+ 'step' => 1,
945
+ 'max' => 100,
946
+ ],
947
+ ],
948
+ 'selectors' => [
949
+ '{{WRAPPER}} .eael-elements-progression-flip-box-container .flipbox-button' => 'border-radius: {{SIZE}}{{UNIT}};',
950
+ ],
951
+ ]
952
+ );
953
+
954
+ $this->add_group_control(
955
+ Group_Control_Typography::get_type(),
956
+ [
957
+ 'name' => 'eael_flipbox_button_typography',
958
+ 'selector' => '{{WRAPPER}} .eael-elements-progression-flip-box-container .flipbox-button'
959
+ ]
960
+ );
961
+ $this->end_controls_tab();
962
+
963
+ $this->start_controls_tab(
964
+ 'flipbox_button_hover_style',
965
+ [
966
+ 'label' => __( 'Hover', 'essential-addons-elementor' )
967
+ ]
968
+ );
969
+ $this->add_control(
970
+ 'eael_flipbox_button_hover_color',
971
+ [
972
+ 'label' => esc_html__( 'Color', 'essential-addons-elementor' ),
973
+ 'type' => Controls_Manager::COLOR,
974
+ 'default' => '#ffffff',
975
+ 'selectors' => [
976
+ '{{WRAPPER}} .eael-elements-progression-flip-box-container .flipbox-button:hover' => 'color: {{VALUE}};',
977
+ ],
978
+ ]
979
+ );
980
+
981
+ $this->add_control(
982
+ 'eael_flipbox_button_hover_bg_color',
983
+ [
984
+ 'label' => esc_html__( 'Background', 'essential-addons-elementor' ),
985
+ 'type' => Controls_Manager::COLOR,
986
+ 'default' => '#000000',
987
+ 'selectors' => [
988
+ '{{WRAPPER}} .eael-elements-progression-flip-box-container .flipbox-button:hover' => 'background: {{VALUE}};',
989
+ ],
990
+ ]
991
+ );
992
+ $this->end_controls_tab();
993
+
994
+ $this->end_controls_tabs();
995
 
996
  $this->end_controls_section();
997
 
998
  }
999
 
1000
 
1001
+ protected function render() {
1002
 
1003
  $settings = $this->get_settings();
1004
  $flipbox_image = $this->get_settings( 'eael_flipbox_image' );
1005
  $flipbox_image_url = Group_Control_Image_Size::get_attachment_image_src( $flipbox_image['id'], 'thumbnail', $settings );
1006
+ ( empty( $flipbox_image_url ) ) ? $flipbox_image_url = $flipbox_image['url'] : $flipbox_image_url = $flipbox_image_url;
1007
+
1008
+ $flipbox_if_html_tag = 'div';
1009
+ $flipbox_if_html_title_tag = 'h2';
1010
+ $this->add_render_attribute('flipbox-container', 'class', 'eael-elements-flip-box-flip-card');
1011
+ $this->add_render_attribute('flipbox-title-container', 'class', 'eael-elements-flip-box-heading');
1012
+
1013
+ if( $settings['flipbox_link_type'] != 'none' ) {
1014
+ if( ! empty($settings['flipbox_link']['url']) ) {
1015
+ if( $settings['flipbox_link_type'] == 'box' ) {
1016
+ $flipbox_if_html_tag = 'a';
1017
+
1018
+ $this->add_render_attribute( 'flipbox-container', 'href', esc_url($settings['flipbox_link']['url']) );
1019
+
1020
+ if( $settings['flipbox_link']['is_external'] ) {
1021
+ $this->add_render_attribute( 'flipbox-container', 'target', '_blank' );
1022
+ }
1023
+
1024
+ if( $settings['flipbox_link']['nofollow'] ) {
1025
+ $this->add_render_attribute('flipbox-container', 'rel', 'nofollow');
1026
+ }
1027
+ } elseif( $settings['flipbox_link_type'] == 'title' ) {
1028
+ $flipbox_if_html_title_tag = 'a';
1029
+
1030
+ $this->add_render_attribute(
1031
+ 'flipbox-title-container',
1032
+ [
1033
+ 'class' => 'flipbox-linked-title',
1034
+ 'href' => $settings['flipbox_link']['url']
1035
+ ]
1036
+ );
1037
+
1038
+ if( $settings['flipbox_link']['is_external'] ) {
1039
+ $this->add_render_attribute('flipbox-title-container', 'target', '_blank');
1040
+ }
1041
+
1042
+ if( $settings['flipbox_link']['nofollow'] ) {
1043
+ $this->add_render_attribute('flipbox-title-container', 'rel', 'nofollow');
1044
+ }
1045
+ } elseif( $settings['flipbox_link_type'] == 'button' ) {
1046
+ $this->add_render_attribute(
1047
+ 'flipbox-button-container',
1048
+ [
1049
+ 'class' => 'flipbox-button',
1050
+ 'href' => $settings['flipbox_link']['url']
1051
+ ]
1052
+ );
1053
+
1054
+ if($settings['flipbox_link']['is_external']) {
1055
+ $this->add_render_attribute('flipbox-button-container', 'target', '_blank' );
1056
+ }
1057
+
1058
+ if($settings['flipbox_link']['nofollow']) {
1059
+ $this->add_render_attribute('flipbox-button-container', 'rel', 'nofollow' );
1060
+ }
1061
+ }
1062
+ }
1063
+ }
1064
+
1065
+
1066
+ $flipbox_image_back = $this->get_settings( 'eael_flipbox_image_back' );
1067
+ $flipbox_back_image_url = Group_Control_Image_Size::get_attachment_image_src( $flipbox_image_back['id'], 'thumbnail_back', $settings );
1068
+ $flipbox_back_image_url = empty($flipbox_back_image_url) ? $flipbox_back_image_url['url'] : $flipbox_back_image_url;
1069
+
1070
+ if( $settings['eael_flipbox_img_or_icon_back'] != 'none' ) {
1071
+ if( 'img' == $settings['eael_flipbox_img_or_icon_back'] ) {
1072
+ $this->add_render_attribute(
1073
+ 'flipbox-back-icon-image-container',
1074
+ [
1075
+ 'src' => $flipbox_back_image_url,
1076
+ 'alt' => 'flipbox-image'
1077
+ ]
1078
+ );
1079
+ }elseif( 'icon' == $settings['eael_flipbox_img_or_icon_back'] ) {
1080
+ $this->add_render_attribute(
1081
+ 'flipbox-back-icon-container',
1082
+ [
1083
+ 'class' => $settings['eael_flipbox_icon_back'],
1084
+ 'aria-hidden' => 'true'
1085
+ ]
1086
+ );
1087
+ }
1088
+ }
1089
+
1090
+ $this->add_render_attribute(
1091
+ 'eael_flipbox_main_wrap',
1092
+ [
1093
+ 'class' => [
1094
+ 'eael-elements-progression-flip-box-container',
1095
+ 'eael-animate-flip',
1096
+ 'eael-'.esc_attr( $settings['eael_flipbox_type'] )
1097
+ ]
1098
+ ]
1099
+ );
1100
 
1101
  ?>
1102
 
1103
+ <div <?php echo $this->get_render_attribute_string('eael_flipbox_main_wrap'); ?>>
1104
+
1105
+ <<?php echo $flipbox_if_html_tag,' ',$this->get_render_attribute_string('flipbox-container'); ?>>
1106
  <div class="eael-elements-flip-box-front-container">
1107
  <div class="eael-elements-slider-display-table">
1108
  <div class="eael-elements-flip-box-vertical-align">
1109
  <div class="eael-elements-flip-box-padding">
1110
  <div class="eael-elements-flip-box-icon-image">
1111
+ <?php if( 'icon' === $settings['eael_flipbox_img_or_icon'] ) : ?>
1112
+ <i class="<?php echo esc_attr( $settings['eael_flipbox_icon'] ); ?>"></i>
1113
+ <?php elseif( 'img' === $settings['eael_flipbox_img_or_icon'] ): ?>
1114
+ <img src="<?php echo esc_url( $flipbox_image_url ); ?>" alt="">
1115
+ <?php endif; ?>
1116
  </div>
1117
  <h2 class="eael-elements-flip-box-heading"><?php echo esc_html__( $settings['eael_flipbox_front_title'], 'essential-addons-elementor' ); ?></h2>
1118
  <div class="eael-elements-flip-box-content">
1122
  </div>
1123
  </div>
1124
  </div>
1125
+
1126
  <div class="eael-elements-flip-box-rear-container">
1127
  <div class="eael-elements-slider-display-table">
1128
  <div class="eael-elements-flip-box-vertical-align">
1129
  <div class="eael-elements-flip-box-padding">
1130
+ <?php if( 'none' != $settings['eael_flipbox_img_or_icon_back'] ) : ?>
1131
+ <div class="flipbox-back-image-icon">
1132
+ <?php if('img' == $settings['eael_flipbox_img_or_icon_back']) : ?>
1133
+ <img <?php echo $this->get_render_attribute_string('flipbox-back-icon-image-container'); ?>>
1134
+ <?php elseif('icon' == $settings['eael_flipbox_img_or_icon_back']): ?>
1135
+ <i <?php echo $this->get_render_attribute_string('flipbox-back-icon-container'); ?>></i>
1136
+ <?php endif; ?>
1137
+ </div>
1138
+ <?php endif; ?>
1139
+
1140
+ <<?php echo $flipbox_if_html_title_tag,' ', $this->get_render_attribute_string('flipbox-title-container'); ?>><?php echo esc_html__( $settings['eael_flipbox_back_title'], 'essential-addons-elementor' ); ?></<?php echo $flipbox_if_html_title_tag; ?>>
1141
  <div class="eael-elements-flip-box-content">
1142
  <p><?php echo __( $settings['eael_flipbox_back_text'], 'essential-addons-elementor' ); ?></p>
1143
  </div>
1144
+
1145
+ <?php if( $settings['flipbox_link_type'] == 'button' && ! empty($settings['flipbox_button_text']) ) : ?>
1146
+ <a <?php echo $this->get_render_attribute_string('flipbox-button-container'); ?>>
1147
+ <?php if( ! empty($settings['button_icon']) && 'before' == $settings['button_icon_position'] ) : ?>
1148
+ <i class="<?php echo $settings['button_icon']; ?>"></i>
1149
+ <?php endif; ?>
1150
+ <?php echo esc_attr($settings['flipbox_button_text']); ?>
1151
+ <?php if( ! empty($settings['button_icon']) && 'after' == $settings['button_icon_position'] ) : ?>
1152
+ <i class="<?php echo $settings['button_icon']; ?>"></i>
1153
+ <?php endif; ?>
1154
+ </a>
1155
+ <?php endif; ?>
1156
  </div>
1157
  </div>
1158
  </div>
1159
  </div>
1160
+ </<?php echo $flipbox_if_html_tag; ?>>
1161
  </div>
1162
 
1163
  <?php
1164
  }
1165
 
1166
+ protected function content_template() { }
 
 
 
 
 
 
1167
  }
1168
 
1169
 
elements/infobox/infobox.php CHANGED
@@ -75,6 +75,41 @@ class Widget_Eael_Info_Box extends Widget_Base {
75
  'default' => 'icon',
76
  ]
77
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  /**
79
  * Condition: 'eael_infobox_img_or_icon' => 'img'
80
  */
@@ -115,42 +150,13 @@ class Widget_Eael_Info_Box extends Widget_Base {
115
  'eael_infobox_number',
116
  [
117
  'label' => esc_html__( 'Number', 'essential-addons-elementor' ),
118
- 'type' => Controls_Manager::NUMBER,
119
  'condition' => [
120
  'eael_infobox_img_or_icon' => 'number'
121
  ]
122
  ]
123
  );
124
 
125
- $this->add_control(
126
- 'eael_show_infobox_clickable',
127
- [
128
- 'label' => __( 'Infobox Clickable', 'essential-addons-elementor' ),
129
- 'type' => Controls_Manager::SWITCHER,
130
- 'default' => 'no',
131
- 'label_on' => __( 'Yes', 'essential-addons-elementor' ),
132
- 'label_off' => __( 'No', 'essential-addons-elementor' ),
133
- 'return_value' => 'yes',
134
- ]
135
- );
136
-
137
- $this->add_control(
138
- 'eael_show_infobox_clickable_link',
139
- [
140
- 'label' => esc_html__( 'Infobox Link', 'essential-addons-elementor' ),
141
- 'type' => Controls_Manager::URL,
142
- 'label_block' => true,
143
- 'default' => [
144
- 'url' => 'http://',
145
- 'is_external' => '',
146
- ],
147
- 'show_external' => true,
148
- 'condition' => [
149
- 'eael_show_infobox_clickable' => 'yes'
150
- ]
151
- ]
152
- );
153
-
154
  $this->end_controls_section();
155
 
156
  /**
@@ -261,10 +267,7 @@ class Widget_Eael_Info_Box extends Widget_Base {
261
  $this->start_controls_section(
262
  'eael_infobox_button',
263
  [
264
- 'label' => esc_html__( 'Infobox Button', 'essential-addons-elementor' ),
265
- 'condition' => [
266
- 'eael_show_infobox_clickable!' => 'yes'
267
- ]
268
  ]
269
  );
270
 
@@ -273,13 +276,45 @@ class Widget_Eael_Info_Box extends Widget_Base {
273
  [
274
  'label' => __( 'Show Infobox Button', 'essential-addons-elementor' ),
275
  'type' => Controls_Manager::SWITCHER,
 
 
 
 
 
 
 
 
 
 
 
 
 
276
  'default' => 'no',
277
  'label_on' => __( 'Yes', 'essential-addons-elementor' ),
278
  'label_off' => __( 'No', 'essential-addons-elementor' ),
279
  'return_value' => 'yes',
 
 
 
280
  ]
281
  );
282
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
283
 
284
  $this->add_control(
285
  'infobox_button_text',
@@ -363,17 +398,15 @@ class Widget_Eael_Info_Box extends Widget_Base {
363
  ],
364
  ]
365
  );
366
-
367
  $this->end_controls_section();
368
 
369
-
370
  $this->start_controls_section(
371
  'eael_section_pro',
372
  [
373
  'label' => __( 'Go Premium for More Features', 'essential-addons-elementor' )
374
  ]
375
  );
376
-
377
  $this->add_control(
378
  'eael_control_get_pro',
379
  [
@@ -389,90 +422,6 @@ class Widget_Eael_Info_Box extends Widget_Base {
389
  'description' => '<span class="pro-feature"> Get the <a href="https://essential-addons.com/elementor/buy.php" target="_blank">Pro version</a> for more stunning elements and customization options.</span>'
390
  ]
391
  );
392
-
393
- $this->end_controls_section();
394
-
395
- /**
396
- * -------------------------------------------
397
- * Tab Style (Info Box Style)
398
- * -------------------------------------------
399
- */
400
- $this->start_controls_section(
401
- 'eael_section_infobox_style_settings',
402
- [
403
- 'label' => esc_html__( 'Info Box Style', 'essential-addons-elementor' ),
404
- 'tab' => Controls_Manager::TAB_STYLE
405
- ]
406
- );
407
-
408
- $this->add_control(
409
- 'eael_infobox_bg_color',
410
- [
411
- 'label' => esc_html__( 'Background Color', 'essential-addons-elementor' ),
412
- 'type' => Controls_Manager::COLOR,
413
- 'default' => '',
414
- 'selectors' => [
415
- '{{WRAPPER}} .eael-infobox' => 'background-color: {{VALUE}};',
416
- ],
417
- ]
418
- );
419
-
420
- $this->add_responsive_control(
421
- 'eael_infobox_container_padding',
422
- [
423
- 'label' => esc_html__( 'Padding', 'essential-addons-elementor' ),
424
- 'type' => Controls_Manager::DIMENSIONS,
425
- 'size_units' => [ 'px', 'em', '%' ],
426
- 'selectors' => [
427
- '{{WRAPPER}} .eael-infobox' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
428
- ],
429
- ]
430
- );
431
-
432
- $this->add_responsive_control(
433
- 'eael_infobox_container_margin',
434
- [
435
- 'label' => esc_html__( 'Margin', 'essential-addons-elementor' ),
436
- 'type' => Controls_Manager::DIMENSIONS,
437
- 'size_units' => [ 'px', 'em', '%' ],
438
- 'selectors' => [
439
- '{{WRAPPER}} .eael-infobox' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
440
- ],
441
- ]
442
- );
443
-
444
- $this->add_group_control(
445
- Group_Control_Border::get_type(),
446
- [
447
- 'name' => 'eael_infobox_border',
448
- 'label' => esc_html__( 'Border', 'essential-addons-elementor' ),
449
- 'selector' => '{{WRAPPER}} .eael-infobox',
450
- ]
451
- );
452
-
453
- $this->add_control(
454
- 'eael_infobox_border_radius',
455
- [
456
- 'label' => esc_html__( 'Border Radius', 'essential-addons-elementor' ),
457
- 'type' => Controls_Manager::SLIDER,
458
- 'range' => [
459
- 'px' => [
460
- 'max' => 50,
461
- ],
462
- ],
463
- 'selectors' => [
464
- '{{WRAPPER}} .eael-infobox' => 'border-radius: {{SIZE}}px;',
465
- ],
466
- ]
467
- );
468
-
469
- $this->add_group_control(
470
- Group_Control_Box_Shadow::get_type(),
471
- [
472
- 'name' => 'eael_infobox_shadow',
473
- 'selector' => '{{WRAPPER}} .eael-infobox',
474
- ]
475
- );
476
 
477
  $this->end_controls_section();
478
 
@@ -501,6 +450,30 @@ class Widget_Eael_Info_Box extends Widget_Base {
501
  ]
502
  );
503
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
504
  $this->add_group_control(
505
  Group_Control_Border::get_type(),
506
  [
@@ -529,7 +502,6 @@ class Widget_Eael_Info_Box extends Widget_Base {
529
  ]
530
  );
531
 
532
-
533
  $this->end_controls_tab();
534
 
535
  $this->start_controls_tab(
@@ -539,6 +511,16 @@ class Widget_Eael_Info_Box extends Widget_Base {
539
  ]
540
  );
541
 
 
 
 
 
 
 
 
 
 
 
542
  $this->add_control(
543
  'eael_infobox_image_icon_hover_animation',
544
  [
@@ -645,25 +627,12 @@ class Widget_Eael_Info_Box extends Widget_Base {
645
  ]
646
  );
647
 
648
- $this->add_responsive_control(
649
- 'eael_infobox_number_icon_size',
650
- [
651
- 'label' => __( 'Icon Size', 'essential-addons-elementor' ),
652
- 'type' => Controls_Manager::SLIDER,
653
- 'default' => [
654
- 'size' => 40,
655
- ],
656
- 'range' => [
657
- 'px' => [
658
- 'min' => 20,
659
- 'max' => 100,
660
- 'step' => 1,
661
- ]
662
- ],
663
- 'selectors' => [
664
- '{{WRAPPER}} .eael-infobox .infobox-icon .infobox-icon-number' => 'font-size: {{SIZE}}px;',
665
- ],
666
- ]
667
  );
668
 
669
  $this->add_responsive_control(
@@ -954,24 +923,9 @@ class Widget_Eael_Info_Box extends Widget_Base {
954
  ],
955
  ]
956
  );
957
-
958
- $this->add_control(
959
- 'eael_infobox_icon_bg_color',
960
- [
961
- 'label' => esc_html__( 'Background Color', 'essential-addons-elementor' ),
962
- 'type' => Controls_Manager::COLOR,
963
- 'default' => '',
964
- 'selectors' => [
965
- '{{WRAPPER}} .eael-infobox .infobox-icon .infobox-icon-wrap' => 'background: {{VALUE}};',
966
- ],
967
- 'condition' => [
968
- 'eael_infobox_icon_bg_shape!' => 'none',
969
- ]
970
- ]
971
- );
972
-
973
  $this->add_control(
974
- 'eael_infobox_icon_bg_shape',
975
  [
976
  'label' => esc_html__( 'Background Shape', 'essential-addons-elementor' ),
977
  'type' => Controls_Manager::SELECT,
@@ -987,6 +941,21 @@ class Widget_Eael_Info_Box extends Widget_Base {
987
  ]
988
  );
989
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
990
  $this->add_group_control(
991
  Group_Control_Border::get_type(),
992
  [
@@ -1310,6 +1279,42 @@ class Widget_Eael_Info_Box extends Widget_Base {
1310
  ]
1311
  );
1312
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1313
  $this->add_control(
1314
  'eael_infobox_content_color',
1315
  [
75
  'default' => 'icon',
76
  ]
77
  );
78
+
79
+ $this->add_responsive_control(
80
+ 'icon_vertical_position',
81
+ [
82
+ 'label' => __( 'Icon Position', 'essential-addons-elementor' ),
83
+ 'type' => Controls_Manager::CHOOSE,
84
+ 'default' => 'top',
85
+ 'condition' => [
86
+ 'eael_infobox_img_type!' => 'img-on-top'
87
+ ],
88
+ 'options' => [
89
+ 'top' => [
90
+ 'title' => __( 'Top', 'essential-addons-elementor' ),
91
+ 'icon' => 'eicon-v-align-top',
92
+ ],
93
+ 'middle' => [
94
+ 'title' => __( 'Middle', 'essential-addons-elementor' ),
95
+ 'icon' => 'eicon-v-align-middle',
96
+ ],
97
+ 'bottom' => [
98
+ 'title' => __( 'Bottom', 'essential-addons-elementor' ),
99
+ 'icon' => 'eicon-v-align-bottom',
100
+ ],
101
+ ],
102
+ 'selectors' => [
103
+ '{{WRAPPER}} .eael-infobox .infobox-icon' => 'align-self: {{VALUE}};'
104
+ ],
105
+ 'selectors_dictionary' => [
106
+ 'top' => 'baseline',
107
+ 'middle' => 'center',
108
+ 'bottom' => 'flex-end',
109
+ ],
110
+ ]
111
+ );
112
+
113
  /**
114
  * Condition: 'eael_infobox_img_or_icon' => 'img'
115
  */
150
  'eael_infobox_number',
151
  [
152
  'label' => esc_html__( 'Number', 'essential-addons-elementor' ),
153
+ 'type' => Controls_Manager::TEXT,
154
  'condition' => [
155
  'eael_infobox_img_or_icon' => 'number'
156
  ]
157
  ]
158
  );
159
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
160
  $this->end_controls_section();
161
 
162
  /**
267
  $this->start_controls_section(
268
  'eael_infobox_button',
269
  [
270
+ 'label' => esc_html__( 'Link', 'essential-addons-elementor' )
 
 
 
271
  ]
272
  );
273
 
276
  [
277
  'label' => __( 'Show Infobox Button', 'essential-addons-elementor' ),
278
  'type' => Controls_Manager::SWITCHER,
279
+ 'label_on' => __( 'Yes', 'essential-addons-elementor' ),
280
+ 'label_off' => __( 'No', 'essential-addons-elementor' ),
281
+ 'condition' => [
282
+ 'eael_show_infobox_clickable!' => 'yes'
283
+ ]
284
+ ]
285
+ );
286
+
287
+ $this->add_control(
288
+ 'eael_show_infobox_clickable',
289
+ [
290
+ 'label' => __( 'Infobox Clickable', 'essential-addons-elementor' ),
291
+ 'type' => Controls_Manager::SWITCHER,
292
  'default' => 'no',
293
  'label_on' => __( 'Yes', 'essential-addons-elementor' ),
294
  'label_off' => __( 'No', 'essential-addons-elementor' ),
295
  'return_value' => 'yes',
296
+ 'condition' => [
297
+ 'eael_show_infobox_button!' => 'yes'
298
+ ]
299
  ]
300
  );
301
 
302
+ $this->add_control(
303
+ 'eael_show_infobox_clickable_link',
304
+ [
305
+ 'label' => esc_html__( 'Infobox Link', 'essential-addons-elementor' ),
306
+ 'type' => Controls_Manager::URL,
307
+ 'label_block' => true,
308
+ 'default' => [
309
+ 'url' => 'http://',
310
+ 'is_external' => '',
311
+ ],
312
+ 'show_external' => true,
313
+ 'condition' => [
314
+ 'eael_show_infobox_clickable' => 'yes'
315
+ ]
316
+ ]
317
+ );
318
 
319
  $this->add_control(
320
  'infobox_button_text',
398
  ],
399
  ]
400
  );
 
401
  $this->end_controls_section();
402
 
 
403
  $this->start_controls_section(
404
  'eael_section_pro',
405
  [
406
  'label' => __( 'Go Premium for More Features', 'essential-addons-elementor' )
407
  ]
408
  );
409
+
410
  $this->add_control(
411
  'eael_control_get_pro',
412
  [
422
  'description' => '<span class="pro-feature"> Get the <a href="https://essential-addons.com/elementor/buy.php" target="_blank">Pro version</a> for more stunning elements and customization options.</span>'
423
  ]
424
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
425
 
426
  $this->end_controls_section();
427
 
450
  ]
451
  );
452
 
453
+ $this->add_control(
454
+ 'eael_infobox_image_icon_bg_color',
455
+ [
456
+ 'label' => esc_html__( 'Background Color', 'essential-addons-elementor' ),
457
+ 'type' => Controls_Manager::COLOR,
458
+ 'default' => '',
459
+ 'selectors' => [
460
+ '{{WRAPPER}} .eael-infobox .infobox-icon img' => 'background-color: {{VALUE}};',
461
+ ]
462
+ ]
463
+ );
464
+
465
+ $this->add_responsive_control(
466
+ 'eael_infobox_image_icon_padding',
467
+ [
468
+ 'label' => esc_html__( 'Padding', 'essential-addons-elementor' ),
469
+ 'type' => Controls_Manager::DIMENSIONS,
470
+ 'size_units' => [ 'px', 'em', '%' ],
471
+ 'selectors' => [
472
+ '{{WRAPPER}} .eael-infobox .infobox-icon img' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
473
+ ],
474
+ ]
475
+ );
476
+
477
  $this->add_group_control(
478
  Group_Control_Border::get_type(),
479
  [
502
  ]
503
  );
504
 
 
505
  $this->end_controls_tab();
506
 
507
  $this->start_controls_tab(
511
  ]
512
  );
513
 
514
+ $this->add_group_control(
515
+ Group_Control_Box_Shadow::get_type(),
516
+ [
517
+ 'name' => 'eael_infobox_image_icon_hover_shadow',
518
+ 'selectors' => [
519
+ '{{WRAPPER}} .eael-infobox .infobox-icon:hover img' => 'background-color: {{VALUE}};',
520
+ ]
521
+ ]
522
+ );
523
+
524
  $this->add_control(
525
  'eael_infobox_image_icon_hover_animation',
526
  [
627
  ]
628
  );
629
 
630
+ $this->add_group_control(
631
+ Group_Control_Typography::get_type(),
632
+ [
633
+ 'name' => 'eael_infobox_number_icon_typography',
634
+ 'selector' => '{{WRAPPER}} .eael-infobox .infobox-icon .infobox-icon-number',
635
+ ]
 
 
 
 
 
 
 
 
 
 
 
 
 
636
  );
637
 
638
  $this->add_responsive_control(
923
  ],
924
  ]
925
  );
926
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
927
  $this->add_control(
928
+ 'eael_infobox_icon_bg_shape',
929
  [
930
  'label' => esc_html__( 'Background Shape', 'essential-addons-elementor' ),
931
  'type' => Controls_Manager::SELECT,
941
  ]
942
  );
943
 
944
+ $this->add_control(
945
+ 'eael_infobox_icon_bg_color',
946
+ [
947
+ 'label' => esc_html__( 'Background Color', 'essential-addons-elementor' ),
948
+ 'type' => Controls_Manager::COLOR,
949
+ 'default' => '',
950
+ 'selectors' => [
951
+ '{{WRAPPER}} .eael-infobox .infobox-icon .infobox-icon-wrap' => 'background: {{VALUE}};',
952
+ ],
953
+ 'condition' => [
954
+ 'eael_infobox_icon_bg_shape!' => 'none',
955
+ ]
956
+ ]
957
+ );
958
+
959
  $this->add_group_control(
960
  Group_Control_Border::get_type(),
961
  [
1279
  ]
1280
  );
1281
 
1282
+ $this->add_responsive_control(
1283
+ 'eael_infobox_content_margin',
1284
+ [
1285
+ 'label' => esc_html__( 'Content Only Margin', 'essential-addons-elementor' ),
1286
+ 'type' => Controls_Manager::DIMENSIONS,
1287
+ 'size_units' => [ 'px', 'em', '%' ],
1288
+ 'selectors' => [
1289
+ '{{WRAPPER}} .eael-infobox .infobox-content p' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1290
+ ],
1291
+ ]
1292
+ );
1293
+
1294
+ $this->add_control(
1295
+ 'eael_infobox_content_background',
1296
+ [
1297
+ 'label' => esc_html__( 'Content Only Background', 'essential-addons-elementor' ),
1298
+ 'type' => Controls_Manager::COLOR,
1299
+ 'default' => '',
1300
+ 'selectors' => [
1301
+ '{{WRAPPER}} .eael-infobox .infobox-content' => 'background: {{VALUE}};',
1302
+ ],
1303
+ ]
1304
+ );
1305
+
1306
+ $this->add_responsive_control(
1307
+ 'eael_infobox_content_only_padding',
1308
+ [
1309
+ 'label' => esc_html__( 'Content Only Padding', 'essential-addons-elementor' ),
1310
+ 'type' => Controls_Manager::DIMENSIONS,
1311
+ 'size_units' => [ 'px', 'em', '%' ],
1312
+ 'selectors' => [
1313
+ '{{WRAPPER}} .eael-infobox .infobox-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1314
+ ],
1315
+ ]
1316
+ );
1317
+
1318
  $this->add_control(
1319
  'eael_infobox_content_color',
1320
  [
elements/post-grid/post-grid.php CHANGED
@@ -5,6 +5,8 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
5
 
6
  class Widget_Eael_Post_Grid extends Widget_Base {
7
 
 
 
8
  public function get_name() {
9
  return 'eael-post-grid';
10
  }
@@ -22,341 +24,14 @@ class Widget_Eael_Post_Grid extends Widget_Base {
22
  }
23
 
24
  protected function _register_controls() {
25
- $this->start_controls_section(
26
- 'eael_section_post_grid_filters',
27
- [
28
- 'label' => __( 'Post Settings', 'essential-addons-elementor' )
29
- ]
30
- );
31
-
32
-
33
- $this->add_control(
34
- 'post_type',
35
- [
36
- 'label' => __( 'Post Type', 'essential-addons-elementor' ),
37
- 'type' => Controls_Manager::SELECT,
38
- 'options' => eael_get_post_types(),
39
- 'default' => 'post',
40
- ]
41
- );
42
-
43
-
44
- $this->add_control(
45
- 'category',
46
- [
47
- 'label' => __( 'Categories', 'essential-addons-elementor' ),
48
- 'type' => Controls_Manager::SELECT2,
49
- 'label_block' => true,
50
- 'multiple' => true,
51
- 'options' => eael_post_type_categories(),
52
- 'condition' => [
53
- 'post_type' => 'post'
54
- ]
55
- ]
56
- );
57
-
58
- $this->add_control(
59
- 'eael_post_authors',
60
- [
61
- 'label' => __( 'Authors', 'essential-addons-elementor' ),
62
- 'type' => Controls_Manager::SELECT2,
63
- 'label_block' => true,
64
- 'multiple' => true,
65
- 'options' => eael_get_authors(),
66
- ]
67
- );
68
-
69
- $this->add_control(
70
- 'eael_post_tags',
71
- [
72
- 'label' => __( 'Tags', 'essential-addons-elementor' ),
73
- 'type' => Controls_Manager::SELECT2,
74
- 'label_block' => true,
75
- 'multiple' => true,
76
- 'options' => eael_get_tags(),
77
- 'condition' => [
78
- 'post_type' => 'post'
79
- ]
80
- ]
81
- );
82
-
83
- $this->add_control(
84
- 'post__not_in',
85
- [
86
- 'label' => __( 'Exclude Posts', 'essential-addons-elementor' ),
87
- 'type' => Controls_Manager::SELECT2,
88
- 'label_block' => true,
89
- 'multiple' => true,
90
- 'options' => eael_get_posts(),
91
- 'condition' => [
92
- 'post_type' => 'post'
93
- ]
94
- ]
95
- );
96
-
97
- $this->add_control(
98
- 'page__not_in',
99
- [
100
- 'label' => __( 'Exclude Pages', 'essential-addons-elementor' ),
101
- 'type' => Controls_Manager::SELECT2,
102
- 'label_block' => true,
103
- 'multiple' => true,
104
- 'options' => eael_get_pages(),
105
- 'condition' => [
106
- 'post_type' => 'page'
107
- ]
108
- ]
109
- );
110
-
111
- $this->add_control(
112
- 'posts_per_page',
113
- [
114
- 'label' => __( 'Number of Posts', 'essential-addons-elementor' ),
115
- 'type' => Controls_Manager::NUMBER,
116
- 'default' => 4
117
- ]
118
- );
119
-
120
-
121
- $this->add_control(
122
- 'offset',
123
- [
124
- 'label' => __( 'Post Offset', 'essential-addons-elementor' ),
125
- 'type' => Controls_Manager::NUMBER,
126
- 'default' => '0'
127
- ]
128
- );
129
-
130
- $this->add_control(
131
- 'orderby',
132
- [
133
- 'label' => __( 'Order By', 'essential-addons-elementor' ),
134
- 'type' => Controls_Manager::SELECT,
135
- 'options' => eael_get_post_orderby_options(),
136
- 'default' => 'date',
137
- ]
138
- );
139
-
140
- $this->add_control(
141
- 'order',
142
- [
143
- 'label' => __( 'Order', 'essential-addons-elementor' ),
144
- 'type' => Controls_Manager::SELECT,
145
- 'options' => [
146
- 'asc' => 'Ascending',
147
- 'desc' => 'Descending'
148
- ],
149
- 'default' => 'desc',
150
- ]
151
- );
152
-
153
- $this->end_controls_section();
154
-
155
- $this->start_controls_section(
156
- 'eael_section_post_grid_layout',
157
- [
158
- 'label' => __( 'Layout Settings', 'essential-addons-elementor' )
159
- ]
160
- );
161
-
162
- $this->add_control(
163
- 'eael_post_grid_columns',
164
- [
165
- 'label' => esc_html__( 'Number of Columns', 'essential-addons-elementor' ),
166
- 'type' => Controls_Manager::SELECT,
167
- 'default' => 'eael-col-4',
168
- 'options' => [
169
- 'eael-col-1' => esc_html__( 'Single Column', 'essential-addons-elementor' ),
170
- 'eael-col-2' => esc_html__( 'Two Columns', 'essential-addons-elementor' ),
171
- 'eael-col-3' => esc_html__( 'Three Columns', 'essential-addons-elementor' ),
172
- 'eael-col-4' => esc_html__( 'Four Columns', 'essential-addons-elementor' ),
173
- 'eael-col-5' => esc_html__( 'Five Columns', 'essential-addons-elementor' ),
174
- 'eael-col-6' => esc_html__( 'Six Columns', 'essential-addons-elementor' ),
175
- ],
176
- ]
177
- );
178
-
179
- $this->add_control(
180
- 'eael_post_grid_show_load_more',
181
- [
182
- 'label' => __( 'Show Load More', 'essential-addons-elementor' ),
183
- 'type' => Controls_Manager::CHOOSE,
184
- 'options' => [
185
- '1' => [
186
- 'title' => __( 'Yes', 'essential-addons-elementor' ),
187
- 'icon' => 'fa fa-check',
188
- ],
189
- '0' => [
190
- 'title' => __( 'No', 'essential-addons-elementor' ),
191
- 'icon' => 'fa fa-ban',
192
- ]
193
- ],
194
- 'default' => '0'
195
- ]
196
- );
197
-
198
- $this->add_control(
199
- 'eael_post_grid_show_load_more_text',
200
- [
201
- 'label' => esc_html__( 'Label Text', 'essential-addons-elementor' ),
202
- 'type' => Controls_Manager::TEXT,
203
- 'label_block' => false,
204
- 'default' => esc_html__( 'Load More', 'essential-addons-elementor' ),
205
- 'condition' => [
206
- 'eael_post_grid_show_load_more' => '1',
207
- ]
208
- ]
209
- );
210
-
211
- $this->add_control(
212
- 'eael_show_image',
213
- [
214
- 'label' => __( 'Show Image', 'essential-addons-elementor' ),
215
- 'type' => Controls_Manager::CHOOSE,
216
- 'options' => [
217
- '1' => [
218
- 'title' => __( 'Yes', 'essential-addons-elementor' ),
219
- 'icon' => 'fa fa-check',
220
- ],
221
- '0' => [
222
- 'title' => __( 'No', 'essential-addons-elementor' ),
223
- 'icon' => 'fa fa-ban',
224
- ]
225
- ],
226
- 'default' => '1'
227
- ]
228
- );
229
- $this->add_group_control(
230
- Group_Control_Image_Size::get_type(),
231
- [
232
- 'name' => 'image',
233
- 'exclude' => [ 'custom' ],
234
- 'default' => 'medium',
235
- 'condition' => [
236
- 'eael_show_image' => '1',
237
- ]
238
- ]
239
- );
240
-
241
-
242
- $this->add_control(
243
- 'eael_show_title',
244
- [
245
- 'label' => __( 'Show Title', 'essential-addons-elementor' ),
246
- 'type' => Controls_Manager::CHOOSE,
247
- 'options' => [
248
- '1' => [
249
- 'title' => __( 'Yes', 'essential-addons-elementor' ),
250
- 'icon' => 'fa fa-check',
251
- ],
252
- '0' => [
253
- 'title' => __( 'No', 'essential-addons-elementor' ),
254
- 'icon' => 'fa fa-ban',
255
- ]
256
- ],
257
- 'default' => '1'
258
- ]
259
- );
260
-
261
- $this->add_control(
262
- 'eael_show_excerpt',
263
- [
264
- 'label' => __( 'Show excerpt', 'essential-addons-elementor' ),
265
- 'type' => Controls_Manager::CHOOSE,
266
- 'options' => [
267
- '1' => [
268
- 'title' => __( 'Yes', 'essential-addons-elementor' ),
269
- 'icon' => 'fa fa-check',
270
- ],
271
- '0' => [
272
- 'title' => __( 'No', 'essential-addons-elementor' ),
273
- 'icon' => 'fa fa-ban',
274
- ]
275
- ],
276
- 'default' => '1'
277
- ]
278
- );
279
-
280
-
281
- $this->add_control(
282
- 'eael_excerpt_length',
283
- [
284
- 'label' => __( 'Excerpt Words', 'essential-addons-elementor' ),
285
- 'type' => Controls_Manager::NUMBER,
286
- 'default' => '10',
287
- 'condition' => [
288
- 'eael_show_excerpt' => '1',
289
- ],
290
- 'description' => '<span class="pro-feature"> Pro Feature. Get <a href="https://essential-addons.com/elementor/buy.php" target="_blank">Pro version</a> </span>'
291
-
292
- ]
293
- );
294
-
295
-
296
- $this->add_control(
297
- 'eael_show_meta',
298
- [
299
- 'label' => __( 'Show Meta', 'essential-addons-elementor' ),
300
- 'type' => Controls_Manager::CHOOSE,
301
- 'options' => [
302
- '1' => [
303
- 'title' => __( 'Yes', 'essential-addons-elementor' ),
304
- 'icon' => 'fa fa-check',
305
- ],
306
- '0' => [
307
- 'title' => __( 'No', 'essential-addons-elementor' ),
308
- 'icon' => 'fa fa-ban',
309
- ]
310
- ],
311
- 'default' => '1'
312
- ]
313
- );
314
-
315
- $this->add_control(
316
- 'meta_position',
317
- [
318
- 'label' => esc_html__( 'Meta Position', 'essential-addons-elementor' ),
319
- 'type' => Controls_Manager::SELECT,
320
- 'default' => 'meta-entry-footer',
321
- 'options' => [
322
- 'meta-entry-header' => esc_html__( 'Entry Header', 'essential-addons-elementor' ),
323
- 'meta-entry-footer' => esc_html__( 'Entry Footer', 'essential-addons-elementor' ),
324
- ],
325
- 'condition' => [
326
- 'eael_show_meta' => '1',
327
- ]
328
- ]
329
- );
330
-
331
-
332
- $this->end_controls_section();
333
-
334
-
335
-
336
- $this->start_controls_section(
337
- 'eael_section_pro',
338
- [
339
- 'label' => __( 'Go Premium for More Features', 'essential-addons-elementor' )
340
- ]
341
- );
342
-
343
- $this->add_control(
344
- 'eael_control_get_pro',
345
- [
346
- 'label' => __( 'Unlock more possibilities', 'essential-addons-elementor' ),
347
- 'type' => Controls_Manager::CHOOSE,
348
- 'options' => [
349
- '1' => [
350
- 'title' => __( '', 'essential-addons-elementor' ),
351
- 'icon' => 'fa fa-unlock-alt',
352
- ],
353
- ],
354
- 'default' => '1',
355
- 'description' => '<span class="pro-feature"> Get the <a href="https://essential-addons.com/elementor/buy.php" target="_blank">Pro version</a> for more stunning elements and customization options.</span>'
356
- ]
357
- );
358
 
359
- $this->end_controls_section();
360
 
361
  $this->start_controls_section(
362
  'eael_section_post_grid_style',
@@ -637,193 +312,28 @@ class Widget_Eael_Post_Grid extends Widget_Base {
637
 
638
  $this->end_controls_section();
639
 
640
- $this->start_controls_section(
641
- 'eael_section_load_more_btn',
642
- [
643
- 'label' => __( 'Load More Button Style', 'essential-addons-elementor' ),
644
- 'tab' => Controls_Manager::TAB_STYLE,
645
- 'condition' => [
646
- 'eael_post_grid_show_load_more' => '1'
647
- ]
648
- ]
649
- );
650
-
651
- $this->add_responsive_control(
652
- 'eael_post_grid_load_more_btn_padding',
653
- [
654
- 'label' => esc_html__( 'Padding', 'essential-addons-elementor' ),
655
- 'type' => Controls_Manager::DIMENSIONS,
656
- 'size_units' => [ 'px', 'em', '%' ],
657
- 'selectors' => [
658
- '{{WRAPPER}} .eael-load-more-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
659
- ],
660
- ]
661
- );
662
-
663
- $this->add_responsive_control(
664
- 'eael_post_grid_load_more_btn_margin',
665
- [
666
- 'label' => esc_html__( 'Margin', 'essential-addons-elementor' ),
667
- 'type' => Controls_Manager::DIMENSIONS,
668
- 'size_units' => [ 'px', 'em', '%' ],
669
- 'selectors' => [
670
- '{{WRAPPER}} .eael-load-more-button' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
671
- ],
672
- ]
673
- );
674
- $this->add_group_control(
675
- Group_Control_Typography::get_type(),
676
- [
677
- 'name' => 'eael_post_grid_load_more_btn_typography',
678
- 'selector' => '{{WRAPPER}} .eael-load-more-button',
679
- ]
680
- );
681
-
682
- $this->start_controls_tabs( 'eael_post_grid_load_more_btn_tabs' );
683
-
684
- // Normal State Tab
685
- $this->start_controls_tab( 'eael_post_grid_load_more_btn_normal', [ 'label' => esc_html__( 'Normal', 'essential-addons-elementor' ) ] );
686
-
687
- $this->add_control(
688
- 'eael_post_grid_load_more_btn_normal_text_color',
689
- [
690
- 'label' => esc_html__( 'Text Color', 'essential-addons-elementor' ),
691
- 'type' => Controls_Manager::COLOR,
692
- 'default' => '#fff',
693
- 'selectors' => [
694
- '{{WRAPPER}} .eael-load-more-button' => 'color: {{VALUE}};',
695
- ],
696
- ]
697
- );
698
-
699
- $this->add_control(
700
- 'eael_cta_btn_normal_bg_color',
701
- [
702
- 'label' => esc_html__( 'Background Color', 'essential-addons-elementor' ),
703
- 'type' => Controls_Manager::COLOR,
704
- 'default' => '#29d8d8',
705
- 'selectors' => [
706
- '{{WRAPPER}} .eael-load-more-button' => 'background: {{VALUE}};',
707
- ],
708
- ]
709
- );
710
-
711
- $this->add_group_control(
712
- Group_Control_Border::get_type(),
713
- [
714
- 'name' => 'eael_post_grid_load_more_btn_normal_border',
715
- 'label' => esc_html__( 'Border', 'essential-addons-elementor' ),
716
- 'selector' => '{{WRAPPER}} .eael-load-more-button',
717
- ]
718
- );
719
-
720
- $this->add_control(
721
- 'eael_post_grid_load_more_btn_border_radius',
722
- [
723
- 'label' => esc_html__( 'Border Radius', 'essential-addons-elementor' ),
724
- 'type' => Controls_Manager::SLIDER,
725
- 'range' => [
726
- 'px' => [
727
- 'max' => 100,
728
- ],
729
- ],
730
- 'selectors' => [
731
- '{{WRAPPER}} .eael-load-more-button' => 'border-radius: {{SIZE}}px;',
732
- ],
733
- ]
734
- );
735
- $this->add_group_control(
736
- Group_Control_Box_Shadow::get_type(),
737
- [
738
- 'name' => 'eael_post_grid_load_more_btn_shadow',
739
- 'selector' => '{{WRAPPER}} .eael-load-more-button',
740
- 'separator' => 'before'
741
- ]
742
- );
743
- $this->end_controls_tab();
744
-
745
- // Hover State Tab
746
- $this->start_controls_tab( 'eael_post_grid_load_more_btn_hover', [ 'label' => esc_html__( 'Hover', 'essential-addons-elementor' ) ] );
747
-
748
- $this->add_control(
749
- 'eael_post_grid_load_more_btn_hover_text_color',
750
- [
751
- 'label' => esc_html__( 'Text Color', 'essential-addons-elementor' ),
752
- 'type' => Controls_Manager::COLOR,
753
- 'default' => '#fff',
754
- 'selectors' => [
755
- '{{WRAPPER}} .eael-load-more-button:hover' => 'color: {{VALUE}};',
756
- ],
757
- ]
758
- );
759
-
760
- $this->add_control(
761
- 'eael_post_grid_load_more_btn_hover_bg_color',
762
- [
763
- 'label' => esc_html__( 'Background Color', 'essential-addons-elementor' ),
764
- 'type' => Controls_Manager::COLOR,
765
- 'default' => '27bdbd',
766
- 'selectors' => [
767
- '{{WRAPPER}} .eael-load-more-button:hover' => 'background: {{VALUE}};',
768
- ],
769
- ]
770
- );
771
-
772
- $this->add_control(
773
- 'eael_post_grid_load_more_btn_hover_border_color',
774
- [
775
- 'label' => esc_html__( 'Border Color', 'essential-addons-elementor' ),
776
- 'type' => Controls_Manager::COLOR,
777
- 'default' => '',
778
- 'selectors' => [
779
- '{{WRAPPER}} .eael-load-more-button:hover' => 'border-color: {{VALUE}};',
780
- ],
781
- ]
782
-
783
- );
784
- $this->add_group_control(
785
- Group_Control_Box_Shadow::get_type(),
786
- [
787
- 'name' => 'eael_post_grid_load_more_btn_hover_shadow',
788
- 'selector' => '{{WRAPPER}} .eael-load-more-button:hover',
789
- 'separator' => 'before'
790
- ]
791
- );
792
- $this->end_controls_tab();
793
-
794
- $this->end_controls_tabs();
795
-
796
- $this->end_controls_section();
797
 
798
  }
799
 
800
 
801
  protected function render( ) {
802
- $settings = $this->get_settings();
803
- /**
804
- * Collect categories from user.
805
- */
806
- $post_categories = $this->get_settings( 'category' );
807
- /**
808
- * Collect tags from user.
809
- */
810
- $post_tags = $this->get_settings( 'eael_post_tags' );
811
- /**
812
- * Collect excluded posts or page from user
813
- */
814
- $exclude_posts = $this->get_settings('post__not_in');
815
- $exclude_pages = $this->get_settings('page__not_in');
816
-
817
- $excluded = $settings['post_type'] == 'post' ? $exclude_posts : $exclude_pages;
818
  /**
819
  * Setup the post arguments.
820
  */
821
  $settings['post_style'] = 'grid';
822
  $post_args = eael_get_post_settings( $settings );
 
 
 
 
 
 
823
  /**
824
  * Get posts from database.
825
  */
826
- $posts = eael_load_more_ajax( $post_args );
827
  /**
828
  * Set total posts.
829
  */
@@ -842,7 +352,7 @@ class Widget_Eael_Post_Grid extends Widget_Base {
842
  <div class="clearfix"></div>
843
  </div>
844
  <?php
845
- if( 1 == $settings['eael_post_grid_show_load_more'] ) :
846
  if(
847
  $settings['posts_per_page'] != '-1'
848
  && $total_post != $settings['posts_per_page']
@@ -853,7 +363,7 @@ class Widget_Eael_Post_Grid extends Widget_Base {
853
  <div class="eael-load-more-button-wrap">
854
  <button class="eael-load-more-button" id="eael-load-more-btn-<?php echo $this->get_id(); ?>">
855
  <div class="eael-btn-loader button__loader"></div>
856
- <span><?php echo esc_html__( $settings['eael_post_grid_show_load_more_text'], 'essential-addons-elementor' ); ?></span>
857
  </button>
858
  </div>
859
  <?php endif; endif; ?>
@@ -884,10 +394,12 @@ class Widget_Eael_Post_Grid extends Widget_Base {
884
 
885
  metaPosition: '<?php echo $settings['meta_position']; ?>',
886
  excerptLength: parseInt( <?php echo $settings['eael_excerpt_length']; ?>, 10 ),
887
- btnText: '<?php echo $settings['eael_post_grid_show_load_more_text']; ?>',
888
- categories: <?php echo json_encode( ! empty( $post_categories ) ? $post_categories : [] ); ?>,
889
- eael_post_tags: <?php echo json_encode( ! empty( $post_tags ) ? $post_tags : [] ); ?>,
890
- exclude_posts: <?php echo json_encode( ! empty( $exclude_posts ) ? $exclude_posts : [] ); ?>,
 
 
891
  }
892
 
893
  loadMore( options, settings );
5
 
6
  class Widget_Eael_Post_Grid extends Widget_Base {
7
 
8
+ use \Elementor\ElementsCommonFunctions;
9
+
10
  public function get_name() {
11
  return 'eael-post-grid';
12
  }
24
  }
25
 
26
  protected function _register_controls() {
27
+ /**
28
+ * Query And Layout Controls!
29
+ * @source includes/elementor-helper.php
30
+ */
31
+ $this->query_controls();
32
+ $this->layout_controls();
33
+ $this->eae_go_premium();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
 
 
35
 
36
  $this->start_controls_section(
37
  'eael_section_post_grid_style',
312
 
313
  $this->end_controls_section();
314
 
315
+ $this->load_more_button_style();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
316
 
317
  }
318
 
319
 
320
  protected function render( ) {
321
+ $settings = $this->get_settings();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
322
  /**
323
  * Setup the post arguments.
324
  */
325
  $settings['post_style'] = 'grid';
326
  $post_args = eael_get_post_settings( $settings );
327
+ $query_args = EAE_Helper::get_query_args( 'eaeposts', $this->get_settings() );
328
+ $settings = $query_args = array_merge( $query_args, $post_args );
329
+
330
+ if( isset( $query_args['tax_query'] ) ) {
331
+ $tax_query = $query_args['tax_query'];
332
+ }
333
  /**
334
  * Get posts from database.
335
  */
336
+ $posts = eael_load_more_ajax( $query_args );
337
  /**
338
  * Set total posts.
339
  */
352
  <div class="clearfix"></div>
353
  </div>
354
  <?php
355
+ if( 1 == $settings['show_load_more'] ) :
356
  if(
357
  $settings['posts_per_page'] != '-1'
358
  && $total_post != $settings['posts_per_page']
363
  <div class="eael-load-more-button-wrap">
364
  <button class="eael-load-more-button" id="eael-load-more-btn-<?php echo $this->get_id(); ?>">
365
  <div class="eael-btn-loader button__loader"></div>
366
+ <span><?php echo esc_html__( $settings['show_load_more_text'], 'essential-addons-elementor' ); ?></span>
367
  </button>
368
  </div>
369
  <?php endif; endif; ?>
394
 
395
  metaPosition: '<?php echo $settings['meta_position']; ?>',
396
  excerptLength: parseInt( <?php echo $settings['eael_excerpt_length']; ?>, 10 ),
397
+ btnText: '<?php echo $settings['show_load_more_text']; ?>',
398
+
399
+ tax_query: <?php echo json_encode( ! empty( $tax_query ) ? $tax_query : [] ); ?>,
400
+
401
+ exclude_posts: <?php echo json_encode( ! empty( $settings['post__not_in'] ) ? $settings['post__not_in'] : [] ); ?>,
402
+ post__in: <?php echo json_encode( ! empty( $settings['post__in'] ) ? $settings['post__in'] : [] ); ?>,
403
  }
404
 
405
  loadMore( options, settings );
elements/post-timeline/post-timeline.php CHANGED
@@ -5,6 +5,8 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
5
 
6
  class Widget_PostTimeline extends Widget_Base {
7
 
 
 
8
  public function get_name() {
9
  return 'eael-post-timeline';
10
  }
@@ -28,286 +30,14 @@ class Widget_PostTimeline extends Widget_Base {
28
  }
29
 
30
  protected function _register_controls() {
31
- $this->start_controls_section(
32
- 'eael_section_post_timeline_filters',
33
- [
34
- 'label' => __( 'Post Settings', 'essential-addons-elementor' )
35
- ]
36
- );
37
-
38
-
39
- $this->add_control(
40
- 'post_type',
41
- [
42
- 'label' => __( 'Post Type', 'essential-addons-elementor' ),
43
- 'type' => Controls_Manager::SELECT,
44
- 'options' => eael_get_post_types(),
45
- 'default' => 'post',
46
- ]
47
- );
48
-
49
- $this->add_control(
50
- 'category',
51
- [
52
- 'label' => __( 'Categories', 'essential-addons-elementor' ),
53
- 'type' => Controls_Manager::SELECT2,
54
- 'label_block' => true,
55
- 'multiple' => true,
56
- 'options' => eael_post_type_categories(),
57
- 'condition' => [
58
- 'post_type' => 'post'
59
- ]
60
- ]
61
- );
62
 
63
- $this->add_control(
64
- 'eael_post_authors',
65
- [
66
- 'label' => __( 'Authors', 'essential-addons-elementor' ),
67
- 'type' => Controls_Manager::SELECT2,
68
- 'label_block' => true,
69
- 'multiple' => true,
70
- 'options' => eael_get_authors(),
71
- ]
72
- );
73
-
74
- $this->add_control(
75
- 'eael_post_tags',
76
- [
77
- 'label' => __( 'Tags', 'essential-addons-elementor' ),
78
- 'type' => Controls_Manager::SELECT2,
79
- 'label_block' => true,
80
- 'multiple' => true,
81
- 'options' => eael_get_tags(),
82
- 'condition' => [
83
- 'post_type' => 'post'
84
- ]
85
- ]
86
- );
87
-
88
- $this->add_control(
89
- 'post__not_in',
90
- [
91
- 'label' => __( 'Exclude Posts', 'essential-addons-elementor' ),
92
- 'type' => Controls_Manager::SELECT2,
93
- 'label_block' => true,
94
- 'multiple' => true,
95
- 'options' => eael_get_posts(),
96
- 'condition' => [
97
- 'post_type' => 'post'
98
- ]
99
- ]
100
- );
101
-
102
- $this->add_control(
103
- 'page__not_in',
104
- [
105
- 'label' => __( 'Exclude Pages', 'essential-addons-elementor' ),
106
- 'type' => Controls_Manager::SELECT2,
107
- 'label_block' => true,
108
- 'multiple' => true,
109
- 'options' => eael_get_pages(),
110
- 'condition' => [
111
- 'post_type' => 'page'
112
- ]
113
- ]
114
- );
115
-
116
-
117
- $this->add_control(
118
- 'posts_per_page',
119
- [
120
- 'label' => __( 'Number of Posts', 'essential-addons-elementor' ),
121
- 'type' => Controls_Manager::NUMBER,
122
- 'default' => '4'
123
- ]
124
- );
125
-
126
- $this->add_control(
127
- 'offset',
128
- [
129
- 'label' => __( 'Post Offset', 'essential-addons-elementor' ),
130
- 'type' => Controls_Manager::NUMBER,
131
- 'default' => '0'
132
- ]
133
- );
134
-
135
- $this->add_control(
136
- 'orderby',
137
- [
138
- 'label' => __( 'Order By', 'essential-addons-elementor' ),
139
- 'type' => Controls_Manager::SELECT,
140
- 'options' => eael_get_post_orderby_options(),
141
- 'default' => 'date',
142
-
143
- ]
144
- );
145
-
146
- $this->add_control(
147
- 'order',
148
- [
149
- 'label' => __( 'Order', 'essential-addons-elementor' ),
150
- 'type' => Controls_Manager::SELECT,
151
- 'options' => [
152
- 'asc' => 'Ascending',
153
- 'desc' => 'Descending'
154
- ],
155
- 'default' => 'desc',
156
-
157
- ]
158
- );
159
-
160
- $this->end_controls_section();
161
-
162
- $this->start_controls_section(
163
- 'eael_section_post_timeline_layout',
164
- [
165
- 'label' => __( 'Layout Settings', 'essential-addons-elementor' )
166
- ]
167
- );
168
-
169
- $this->add_control(
170
- 'eael_post_timeline_show_load_more',
171
- [
172
- 'label' => __( 'Show Load More', 'essential-addons-elementor' ),
173
- 'type' => Controls_Manager::CHOOSE,
174
- 'options' => [
175
- '1' => [
176
- 'title' => __( 'Yes', 'essential-addons-elementor' ),
177
- 'icon' => 'fa fa-check',
178
- ],
179
- '0' => [
180
- 'title' => __( 'No', 'essential-addons-elementor' ),
181
- 'icon' => 'fa fa-ban',
182
- ]
183
- ],
184
- 'default' => '0'
185
- ]
186
- );
187
-
188
- $this->add_control(
189
- 'eael_post_timeline_load_more_text',
190
- [
191
- 'label' => esc_html__( 'Label Text', 'essential-addons-elementor' ),
192
- 'type' => Controls_Manager::TEXT,
193
- 'label_block' => false,
194
- 'default' => esc_html__( 'Load More', 'essential-addons-elementor' ),
195
- 'condition' => [
196
- 'eael_post_timeline_show_load_more' => '1',
197
- ]
198
- ]
199
- );
200
-
201
- $this->add_control(
202
- 'eael_show_image',
203
- [
204
- 'label' => __( 'Show Image', 'essential-addons-elementor' ),
205
- 'type' => Controls_Manager::CHOOSE,
206
- 'options' => [
207
- '1' => [
208
- 'title' => __( 'Yes', 'essential-addons-elementor' ),
209
- 'icon' => 'fa fa-check',
210
- ],
211
- '0' => [
212
- 'title' => __( 'No', 'essential-addons-elementor' ),
213
- 'icon' => 'fa fa-ban',
214
- ]
215
- ],
216
- 'default' => '1'
217
- ]
218
- );
219
- $this->add_group_control(
220
- Group_Control_Image_Size::get_type(),
221
- [
222
- 'name' => 'image',
223
- 'exclude' => [ 'custom' ],
224
- 'default' => 'medium',
225
- 'condition' => [
226
- 'eael_show_image' => '1',
227
- ]
228
- ]
229
- );
230
-
231
-
232
- $this->add_control(
233
- 'eael_show_title',
234
- [
235
- 'label' => __( 'Show Title', 'essential-addons-elementor' ),
236
- 'type' => Controls_Manager::CHOOSE,
237
- 'options' => [
238
- '1' => [
239
- 'title' => __( 'Yes', 'essential-addons-elementor' ),
240
- 'icon' => 'fa fa-check',
241
- ],
242
- '0' => [
243
- 'title' => __( 'No', 'essential-addons-elementor' ),
244
- 'icon' => 'fa fa-ban',
245
- ]
246
- ],
247
- 'default' => '1'
248
- ]
249
- );
250
-
251
- $this->add_control(
252
- 'eael_show_excerpt',
253
- [
254
- 'label' => __( 'Show excerpt', 'essential-addons-elementor' ),
255
- 'type' => Controls_Manager::CHOOSE,
256
- 'options' => [
257
- '1' => [
258
- 'title' => __( 'Yes', 'essential-addons-elementor' ),
259
- 'icon' => 'fa fa-check',
260
- ],
261
- '0' => [
262
- 'title' => __( 'No', 'essential-addons-elementor' ),
263
- 'icon' => 'fa fa-ban',
264
- ]
265
- ],
266
- 'default' => '1'
267
- ]
268
- );
269
-
270
- $this->add_control(
271
- 'eael_excerpt_length',
272
- [
273
- 'label' => __( 'Excerpt Words', 'essential-addons-elementor' ),
274
- 'type' => Controls_Manager::NUMBER,
275
- 'default' => '10',
276
- 'condition' => [
277
- 'eael_show_excerpt' => '1',
278
- ]
279
-
280
- ]
281
- );
282
-
283
-
284
- $this->end_controls_section();
285
-
286
-
287
- $this->start_controls_section(
288
- 'eael_section_pro',
289
- [
290
- 'label' => __( 'Go Premium for More Features', 'essential-addons-elementor' )
291
- ]
292
- );
293
-
294
- $this->add_control(
295
- 'eael_control_get_pro',
296
- [
297
- 'label' => __( 'Unlock more possibilities', 'essential-addons-elementor' ),
298
- 'type' => Controls_Manager::CHOOSE,
299
- 'options' => [
300
- '1' => [
301
- 'title' => __( '', 'essential-addons-elementor' ),
302
- 'icon' => 'fa fa-unlock-alt',
303
- ],
304
- ],
305
- 'default' => '1',
306
- 'description' => '<span class="pro-feature"> Get the <a href="https://essential-addons.com/elementor/buy.php" target="_blank">Pro version</a> for more stunning elements and customization options.</span>'
307
- ]
308
- );
309
-
310
- $this->end_controls_section();
311
 
312
 
313
  $this->start_controls_section(
@@ -544,199 +274,33 @@ class Widget_PostTimeline extends Widget_Base {
544
 
545
  $this->end_controls_section();
546
 
547
- $this->start_controls_section(
548
- 'eael_section_load_more_btn',
549
- [
550
- 'label' => __( 'Load More Button Style', 'essential-addons-elementor' ),
551
- 'tab' => Controls_Manager::TAB_STYLE,
552
- 'condition' => [
553
- 'eael_post_timeline_show_load_more' => '1'
554
- ]
555
- ]
556
- );
557
-
558
- $this->add_responsive_control(
559
- 'eael_post_timeline_load_more_btn_padding',
560
- [
561
- 'label' => esc_html__( 'Padding', 'essential-addons-elementor' ),
562
- 'type' => Controls_Manager::DIMENSIONS,
563
- 'size_units' => [ 'px', 'em', '%' ],
564
- 'selectors' => [
565
- '{{WRAPPER}} .eael-load-more-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
566
- ],
567
- ]
568
- );
569
-
570
- $this->add_responsive_control(
571
- 'eael_post_timeline_load_more_btn_margin',
572
- [
573
- 'label' => esc_html__( 'Margin', 'essential-addons-elementor' ),
574
- 'type' => Controls_Manager::DIMENSIONS,
575
- 'size_units' => [ 'px', 'em', '%' ],
576
- 'selectors' => [
577
- '{{WRAPPER}} .eael-load-more-button' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
578
- ],
579
- ]
580
- );
581
- $this->add_group_control(
582
- Group_Control_Typography::get_type(),
583
- [
584
- 'name' => 'eael_post_timeline_load_more_btn_typography',
585
- 'selector' => '{{WRAPPER}} .eael-load-more-button',
586
- ]
587
- );
588
-
589
- $this->start_controls_tabs( 'eael_post_timeline_load_more_btn_tabs' );
590
-
591
- // Normal State Tab
592
- $this->start_controls_tab( 'eael_post_timeline_load_more_btn_normal', [ 'label' => esc_html__( 'Normal', 'essential-addons-elementor' ) ] );
593
-
594
- $this->add_control(
595
- 'eael_post_timeline_load_more_btn_normal_text_color',
596
- [
597
- 'label' => esc_html__( 'Text Color', 'essential-addons-elementor' ),
598
- 'type' => Controls_Manager::COLOR,
599
- 'default' => '#fff',
600
- 'selectors' => [
601
- '{{WRAPPER}} .eael-load-more-button' => 'color: {{VALUE}};',
602
- ],
603
- ]
604
- );
605
-
606
- $this->add_control(
607
- 'eael_cta_btn_normal_bg_color',
608
- [
609
- 'label' => esc_html__( 'Background Color', 'essential-addons-elementor' ),
610
- 'type' => Controls_Manager::COLOR,
611
- 'default' => '#29d8d8',
612
- 'selectors' => [
613
- '{{WRAPPER}} .eael-load-more-button' => 'background: {{VALUE}};',
614
- ],
615
- ]
616
- );
617
-
618
- $this->add_group_control(
619
- Group_Control_Border::get_type(),
620
- [
621
- 'name' => 'eael_post_timeline_load_more_btn_normal_border',
622
- 'label' => esc_html__( 'Border', 'essential-addons-elementor' ),
623
- 'selector' => '{{WRAPPER}} .eael-load-more-button',
624
- ]
625
- );
626
-
627
- $this->add_control(
628
- 'eael_post_timeline_load_more_btn_border_radius',
629
- [
630
- 'label' => esc_html__( 'Border Radius', 'essential-addons-elementor' ),
631
- 'type' => Controls_Manager::SLIDER,
632
- 'range' => [
633
- 'px' => [
634
- 'max' => 100,
635
- ],
636
- ],
637
- 'selectors' => [
638
- '{{WRAPPER}} .eael-load-more-button' => 'border-radius: {{SIZE}}px;',
639
- ],
640
- ]
641
- );
642
- $this->add_group_control(
643
- Group_Control_Box_Shadow::get_type(),
644
- [
645
- 'name' => 'eael_post_timeline_load_more_btn_shadow',
646
- 'selector' => '{{WRAPPER}} .eael-load-more-button',
647
- 'separator' => 'before'
648
- ]
649
- );
650
- $this->end_controls_tab();
651
-
652
- // Hover State Tab
653
- $this->start_controls_tab( 'eael_post_timeline_load_more_btn_hover', [ 'label' => esc_html__( 'Hover', 'essential-addons-elementor' ) ] );
654
-
655
- $this->add_control(
656
- 'eael_post_timeline_load_more_btn_hover_text_color',
657
- [
658
- 'label' => esc_html__( 'Text Color', 'essential-addons-elementor' ),
659
- 'type' => Controls_Manager::COLOR,
660
- 'default' => '#fff',
661
- 'selectors' => [
662
- '{{WRAPPER}} .eael-load-more-button:hover' => 'color: {{VALUE}};',
663
- ],
664
- ]
665
- );
666
-
667
- $this->add_control(
668
- 'eael_post_timeline_load_more_btn_hover_bg_color',
669
- [
670
- 'label' => esc_html__( 'Background Color', 'essential-addons-elementor' ),
671
- 'type' => Controls_Manager::COLOR,
672
- 'default' => '#27bdbd',
673
- 'selectors' => [
674
- '{{WRAPPER}} .eael-load-more-button:hover' => 'background: {{VALUE}};',
675
- ],
676
- ]
677
- );
678
-
679
- $this->add_control(
680
- 'eael_post_timeline_load_more_btn_hover_border_color',
681
- [
682
- 'label' => esc_html__( 'Border Color', 'essential-addons-elementor' ),
683
- 'type' => Controls_Manager::COLOR,
684
- 'default' => '',
685
- 'selectors' => [
686
- '{{WRAPPER}} .eael-load-more-button:hover' => 'border-color: {{VALUE}};',
687
- ],
688
- ]
689
-
690
- );
691
- $this->add_group_control(
692
- Group_Control_Box_Shadow::get_type(),
693
- [
694
- 'name' => 'eael_post_timeline_load_more_btn_hover_shadow',
695
- 'selector' => '{{WRAPPER}} .eael-load-more-button:hover',
696
- 'separator' => 'before'
697
- ]
698
- );
699
- $this->end_controls_tab();
700
-
701
- $this->end_controls_tabs();
702
-
703
- $this->end_controls_section();
704
 
705
  }
706
 
707
 
708
  protected function render( ) {
709
-
710
- $settings = $this->get_settings();
711
- /**
712
- * Collect categories from user.
713
- */
714
- $post_categories = $this->get_settings( 'category' );
715
- /**
716
- * Collect tags from user.
717
- */
718
- $post_tags = $this->get_settings( 'eael_post_tags' );
719
- /**
720
- * Collect excluded posts or page from user
721
- */
722
- $exclude_posts = $this->get_settings('post__not_in');
723
- $exclude_pages = $this->get_settings('page__not_in');
724
-
725
- $excluded = $settings['post_type'] == 'post' ? $exclude_posts : $exclude_pages;
726
  /**
727
  * Setup the post arguments.
728
  */
729
  $settings['post_style'] = 'timeline';
730
- $post_args = eael_get_post_settings( $settings, true );
 
 
 
 
 
 
731
  /**
732
  * Get posts from database.
733
  */
734
- $posts = eael_load_more_ajax( $post_args );
735
  /**
736
  * Set total posts.
737
  */
738
  $total_post = $posts['count'];
739
-
740
  $this->add_render_attribute(
741
  'eael_post_timeline_wrapper',
742
  [
@@ -758,10 +322,11 @@ class Widget_PostTimeline extends Widget_Base {
758
  'data-show_excerpt' => $settings['eael_show_excerpt'],
759
  'data-excerpt_length' => $settings['eael_excerpt_length'],
760
 
761
- 'data-btn_text' => $settings['eael_post_timeline_load_more_text'],
 
 
 
762
 
763
- 'data-categories' => json_encode( ! empty( $post_categories ) ? $post_categories : [] ),
764
- 'data-tags' => json_encode( ! empty( $post_tags ) ? $post_tags : [] ),
765
  'data-exclude_posts' => json_encode( ! empty( $exclude_posts ) ? $exclude_posts : [] ),
766
  ]
767
  );
@@ -786,7 +351,7 @@ class Widget_PostTimeline extends Widget_Base {
786
  </div>
787
  </div>
788
  <?php
789
- if( 1 == $settings['eael_post_timeline_show_load_more'] ) :
790
  if(
791
  $settings['posts_per_page'] != '-1'
792
  && $total_post != $settings['posts_per_page']
@@ -797,7 +362,7 @@ class Widget_PostTimeline extends Widget_Base {
797
  <div class="eael-load-more-button-wrap">
798
  <button class="eael-load-more-button" id="eael-load-more-btn-<?php echo $this->get_id(); ?>">
799
  <div class="eael-btn-loader button__loader"></div>
800
- <span><?php echo esc_html__( $settings['eael_post_timeline_load_more_text'], 'essential-addons-elementor' ); ?></span>
801
  </button>
802
  </div>
803
  <?php endif; endif;
5
 
6
  class Widget_PostTimeline extends Widget_Base {
7
 
8
+ use \Elementor\ElementsCommonFunctions;
9
+
10
  public function get_name() {
11
  return 'eael-post-timeline';
12
  }
30
  }
31
 
32
  protected function _register_controls() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
 
34
+ /**
35
+ * Query And Layout Controls!
36
+ * @source includes/elementor-helper.php
37
+ */
38
+ $this->query_controls();
39
+ $this->layout_controls();
40
+ $this->eae_go_premium();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
 
42
 
43
  $this->start_controls_section(
274
 
275
  $this->end_controls_section();
276
 
277
+ $this->load_more_button_style();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
278
 
279
  }
280
 
281
 
282
  protected function render( ) {
283
+ $settings = $this->get_settings();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
284
  /**
285
  * Setup the post arguments.
286
  */
287
  $settings['post_style'] = 'timeline';
288
+ $post_args = eael_get_post_settings( $settings );
289
+ $query_args = EAE_Helper::get_query_args( 'eaeposts', $this->get_settings() );
290
+ $settings = $query_args = array_merge( $query_args, $post_args );
291
+
292
+ if( isset( $query_args['tax_query'] ) ) {
293
+ $tax_query = $query_args['tax_query'];
294
+ }
295
  /**
296
  * Get posts from database.
297
  */
298
+ $posts = eael_load_more_ajax( $query_args );
299
  /**
300
  * Set total posts.
301
  */
302
  $total_post = $posts['count'];
303
+
304
  $this->add_render_attribute(
305
  'eael_post_timeline_wrapper',
306
  [
322
  'data-show_excerpt' => $settings['eael_show_excerpt'],
323
  'data-excerpt_length' => $settings['eael_excerpt_length'],
324
 
325
+ 'data-btn_text' => $settings['show_load_more_text'],
326
+
327
+ 'data-tax_query' => json_encode( ! empty( $tax_query ) ? $tax_query : [] ),
328
+ 'data-post__in' => json_encode( ! empty( $settings['post__in'] ) ? $settings['post__in'] : [] ),
329
 
 
 
330
  'data-exclude_posts' => json_encode( ! empty( $exclude_posts ) ? $exclude_posts : [] ),
331
  ]
332
  );
351
  </div>
352
  </div>
353
  <?php
354
+ if( 1 == $settings['show_load_more'] ) :
355
  if(
356
  $settings['posts_per_page'] != '-1'
357
  && $total_post != $settings['posts_per_page']
362
  <div class="eael-load-more-button-wrap">
363
  <button class="eael-load-more-button" id="eael-load-more-btn-<?php echo $this->get_id(); ?>">
364
  <div class="eael-btn-loader button__loader"></div>
365
+ <span><?php echo esc_html__( $settings['show_load_more_text'], 'essential-addons-elementor' ); ?></span>
366
  </button>
367
  </div>
368
  <?php endif; endif;
essential_adons_elementor.php CHANGED
@@ -4,7 +4,7 @@
4
  * Description: The ultimate elements library for Elementor page builder plugin for WordPress.
5
  * Plugin URI: https://essential-addons.com/elementor/
6
  * Author: Codetic
7
- * Version: 2.7.4
8
  * Author URI: https://www.codetic.net
9
  *
10
  * Text Domain: essential-addons-elementor
@@ -323,11 +323,11 @@ function eael_admin_notice() {
323
  global $current_user ;
324
  $user_id = $current_user->ID;
325
  /* Check that the user hasn't already clicked to ignore the message */
326
- if ( ! get_user_meta($user_id, 'eael_ignore_notice272') ) {
327
- echo '<div class="eael-admin-notice updated" style="display: flex; align-items: center; padding-left: 0; border-left-color: #EF4B53"><p style="width: 36px;">';
328
- echo '<img style="width: 100%; display: block;" src="' . plugins_url( '/', __FILE__ ).'admin/assets/images/icon-heart.svg'. '" ></p><p> ';
329
- printf(__('<strong>Essential Addons for Elementor</strong> crossed <strong>40,000+</strong> active installs. Use the coupon code <strong>40K</strong> to redeem a <strong>25&#37; </strong> discount on Pro. <a href="https://wpdeveloper.net/in/upgrade-essential-addons-elementor" target="_blank" style="text-decoration: none;"><span class="dashicons dashicons-smiley" style="margin-left: 10px;"></span> Grab the Deal</a>
330
- <a href="%1$s" style="text-decoration: none; margin-left: 10px;"><span class="dashicons dashicons-dismiss"></span> Dismiss</a>'), admin_url( 'admin.php?page=eael-settings&eael_nag_ignore=0' ));
331
  echo "</p></div>";
332
  }
333
  }
@@ -343,7 +343,7 @@ function eael_nag_ignore() {
343
  $user_id = $current_user->ID;
344
  /* If user clicks to ignore the notice, add that to their user meta */
345
  if ( isset($_GET['eael_nag_ignore']) && '0' == $_GET['eael_nag_ignore'] ) {
346
- add_user_meta($user_id, 'eael_ignore_notice272', 'true', true);
347
  }
348
  }
349
  add_action('admin_init', 'eael_nag_ignore');
4
  * Description: The ultimate elements library for Elementor page builder plugin for WordPress.
5
  * Plugin URI: https://essential-addons.com/elementor/
6
  * Author: Codetic
7
+ * Version: 2.7.5
8
  * Author URI: https://www.codetic.net
9
  *
10
  * Text Domain: essential-addons-elementor
323
  global $current_user ;
324
  $user_id = $current_user->ID;
325
  /* Check that the user hasn't already clicked to ignore the message */
326
+ if ( ! get_user_meta($user_id, 'eael_ignore_notice275') ) {
327
+ echo '<div class="eael-admin-notice updated" style="display: flex; align-items: center; padding-left: 0; border-left-color: #EF4B53"><p style="width: 32px;">';
328
+ echo '<img style="width: 100%; display: block;" src="' . plugins_url( '/', __FILE__ ).'admin/assets/images/icon-bolt.svg'. '" ></p><p> ';
329
+ printf(__('<strong>Essential Addons for Elementor</strong> now powering <strong>50,000+</strong> websites. Use the coupon code <strong>CELEBRATE50K</strong> to redeem a <strong>25&#37; </strong> discount on Pro. <a href="https://wpdeveloper.net/in/eael-pricing" target="_blank" style="text-decoration: none;"><span class="dashicons dashicons-smiley" style="margin-left: 10px;"></span> Apply Coupon</a>
330
+ <a href="%1$s" style="text-decoration: none; margin-left: 10px;"><span class="dashicons dashicons-dismiss"></span> I\'m good with free version</a>'), admin_url( 'admin.php?page=eael-settings&eael_nag_ignore=0' ));
331
  echo "</p></div>";
332
  }
333
  }
343
  $user_id = $current_user->ID;
344
  /* If user clicks to ignore the notice, add that to their user meta */
345
  if ( isset($_GET['eael_nag_ignore']) && '0' == $_GET['eael_nag_ignore'] ) {
346
+ add_user_meta($user_id, 'eael_ignore_notice275', 'true', true);
347
  }
348
  }
349
  add_action('admin_init', 'eael_nag_ignore');
includes/elementor-helper.php CHANGED
@@ -10,8 +10,906 @@ function eael_elementor_init(){
10
  ],
11
  1
12
  );
 
 
 
 
 
 
13
  }
14
  add_action('elementor/init','Elementor\eael_elementor_init');
15
 
16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
10
  ],
11
  1
12
  );
13
+
14
+ /**
15
+ * Initialize EAE_Helper
16
+ */
17
+ new EAE_Helper;
18
+
19
  }
20
  add_action('elementor/init','Elementor\eael_elementor_init');
21
 
22
 
23
+ trait ElementsCommonFunctions {
24
+
25
+ /**
26
+ * For Exclude Option
27
+ */
28
+ public function add_exclude_controls( ) {
29
+ $this->add_control(
30
+ 'post__not_in',
31
+ [
32
+ 'label' => __( 'Exclude', 'essential-addons-elementor' ),
33
+ 'type' => Controls_Manager::SELECT2,
34
+ 'options' => eael_get_all_types_post(),
35
+ 'label_block' => true,
36
+ 'post_type' => '',
37
+ 'multiple' => true,
38
+ 'condition' => [
39
+ 'eaeposts_post_type!' => 'by_id'
40
+ ],
41
+ ]
42
+ );
43
+ }
44
+
45
+ protected function query_controls(){
46
+
47
+ if( 'eael-content-ticker' === $this->get_name() ) {
48
+ $this->start_controls_section(
49
+ 'eael_section_content_ticker_filters',
50
+ [
51
+ 'label' => __( 'Dynamic Content Settings', 'essential-addons-elementor' ),
52
+ 'condition' => [
53
+ 'eael_ticker_type' => 'dynamic'
54
+ ]
55
+ ]
56
+ );
57
+ }
58
+
59
+ if( 'eael-content-timeline' === $this->get_name() ) {
60
+ $this->start_controls_section(
61
+ 'eael_section_post_timeline_filters',
62
+ [
63
+ 'label' => __( 'Dynamic Content Settings', 'essential-addons-elementor' ),
64
+ 'condition' => [
65
+ 'eael_content_timeline_choose' => 'dynamic'
66
+ ]
67
+ ]
68
+ );
69
+ }
70
+
71
+ if( 'eael-content-timeline' !== $this->get_name() && 'eael-content-ticker' !== $this->get_name() ) {
72
+ $this->start_controls_section(
73
+ 'eael_section_post_timeline_filters',
74
+ [
75
+ 'label' => __( 'Query', 'essential-addons-elementor' ),
76
+ ]
77
+ );
78
+ }
79
+
80
+ $this->add_group_control(
81
+ EAE_Posts_Group_Control::get_type(),
82
+ [
83
+ 'name' => 'eaeposts'
84
+ ]
85
+ );
86
+
87
+ $this->add_exclude_controls();
88
+
89
+ $this->add_control(
90
+ 'posts_per_page',
91
+ [
92
+ 'label' => __( 'Posts Per Page', 'essential-addons-elementor' ),
93
+ 'type' => Controls_Manager::NUMBER,
94
+ 'default' => '4'
95
+ ]
96
+ );
97
+
98
+ $this->add_control(
99
+ 'offset',
100
+ [
101
+ 'label' => __( 'Offset', 'essential-addons-elementor' ),
102
+ 'type' => Controls_Manager::NUMBER,
103
+ 'default' => '0'
104
+ ]
105
+ );
106
+
107
+ $this->add_control(
108
+ 'orderby',
109
+ [
110
+ 'label' => __( 'Order By', 'essential-addons-elementor' ),
111
+ 'type' => Controls_Manager::SELECT,
112
+ 'options' => eael_get_post_orderby_options(),
113
+ 'default' => 'date',
114
+
115
+ ]
116
+ );
117
+
118
+ $this->add_control(
119
+ 'order',
120
+ [
121
+ 'label' => __( 'Order', 'essential-addons-elementor' ),
122
+ 'type' => Controls_Manager::SELECT,
123
+ 'options' => [
124
+ 'asc' => 'Ascending',
125
+ 'desc' => 'Descending'
126
+ ],
127
+ 'default' => 'desc',
128
+
129
+ ]
130
+ );
131
+
132
+ $this->end_controls_section();
133
+
134
+ }
135
+
136
+ /**
137
+ * Go Premium
138
+ */
139
+ protected function eae_go_premium(){
140
+ $this->start_controls_section(
141
+ 'eael_section_pro',
142
+ [
143
+ 'label' => __( 'Go Premium for More Features', 'essential-addons-elementor' )
144
+ ]
145
+ );
146
+
147
+ $this->add_control(
148
+ 'eael_control_get_pro',
149
+ [
150
+ 'label' => __( 'Unlock more possibilities', 'essential-addons-elementor' ),
151
+ 'type' => Controls_Manager::CHOOSE,
152
+ 'options' => [
153
+ '1' => [
154
+ 'title' => __( '', 'essential-addons-elementor' ),
155
+ 'icon' => 'fa fa-unlock-alt',
156
+ ],
157
+ ],
158
+ 'default' => '1',
159
+ 'description' => '<span class="pro-feature"> Get the <a href="https://essential-addons.com/elementor/buy.php" target="_blank">Pro version</a> for more stunning elements and customization options.</span>'
160
+ ]
161
+ );
162
+
163
+ $this->end_controls_section();
164
+ }
165
+
166
+
167
+ /**
168
+ * Layout Controls For All Post Block!
169
+ * if needed!
170
+ */
171
+ protected function layout_controls(){
172
+
173
+ $this->start_controls_section(
174
+ 'eael_section_post_timeline_layout',
175
+ [
176
+ 'label' => __( 'Layout Settings', 'essential-addons-elementor' )
177
+ ]
178
+ );
179
+
180
+ if( 'eael-post-grid' === $this->get_name() ) {
181
+ $this->add_control(
182
+ 'eael_post_grid_columns',
183
+ [
184
+ 'label' => esc_html__( 'Number of Columns', 'essential-addons-elementor' ),
185
+ 'type' => Controls_Manager::SELECT,
186
+ 'default' => 'eael-col-4',
187
+ 'options' => [
188
+ 'eael-col-1' => esc_html__( 'Single Column', 'essential-addons-elementor' ),
189
+ 'eael-col-2' => esc_html__( 'Two Columns', 'essential-addons-elementor' ),
190
+ 'eael-col-3' => esc_html__( 'Three Columns', 'essential-addons-elementor' ),
191
+ 'eael-col-4' => esc_html__( 'Four Columns', 'essential-addons-elementor' ),
192
+ 'eael-col-5' => esc_html__( 'Five Columns', 'essential-addons-elementor' ),
193
+ 'eael-col-6' => esc_html__( 'Six Columns', 'essential-addons-elementor' ),
194
+ ],
195
+ ]
196
+ );
197
+ }
198
+
199
+ if( 'eael-post-block' === $this->get_name() ) {
200
+ $this->add_control(
201
+ 'grid_style',
202
+ [
203
+ 'label' => esc_html__( 'Post Block Style Preset', 'essential-addons-elementor' ),
204
+ 'type' => Controls_Manager::SELECT,
205
+ 'default' => 'post-block-style-default',
206
+ 'options' => [
207
+ 'post-block-style-default' => esc_html__( 'Default', 'essential-addons-elementor' ),
208
+ 'post-block-style-overlay' => esc_html__( 'Overlay', 'essential-addons-elementor' ),
209
+ ],
210
+ ]
211
+ );
212
+ }
213
+
214
+ if( 'eael-post-carousel' !== $this->get_name() ) {
215
+
216
+ /**
217
+ * Show Read More
218
+ * @uses ContentTimeLine Elements - EAE
219
+ */
220
+ if( 'eael-content-timeline' === $this->get_name() ) {
221
+
222
+ $this->add_control(
223
+ 'eael_show_read_more',
224
+ [
225
+ 'label' => __( 'Show Read More', 'essential-addons-elementor' ),
226
+ 'type' => Controls_Manager::CHOOSE,
227
+ 'options' => [
228
+ '1' => [
229
+ 'title' => __( 'Yes', 'essential-addons-elementor' ),
230
+ 'icon' => 'fa fa-check',
231
+ ],
232
+ '0' => [
233
+ 'title' => __( 'No', 'essential-addons-elementor' ),
234
+ 'icon' => 'fa fa-ban',
235
+ ]
236
+ ],
237
+ 'default' => '1',
238
+ 'condition' => [
239
+ 'eael_content_timeline_choose' => 'dynamic'
240
+ ]
241
+ ]
242
+ );
243
+
244
+ $this->add_control(
245
+ 'eael_read_more_text',
246
+ [
247
+ 'label' => esc_html__( 'Label Text', 'essential-addons-elementor' ),
248
+ 'type' => Controls_Manager::TEXT,
249
+ 'label_block' => false,
250
+ 'default' => esc_html__( 'Read More', 'essential-addons-elementor' ),
251
+ 'condition' => [
252
+ 'eael_content_timeline_choose' => 'dynamic',
253
+ 'eael_show_read_more' => '1',
254
+ ]
255
+ ]
256
+ );
257
+
258
+ } else {
259
+
260
+ $this->add_control(
261
+ 'show_load_more',
262
+ [
263
+ 'label' => __( 'Show Load More', 'essential-addons-elementor' ),
264
+ 'type' => Controls_Manager::CHOOSE,
265
+ 'options' => [
266
+ '1' => [
267
+ 'title' => __( 'Yes', 'essential-addons-elementor' ),
268
+ 'icon' => 'fa fa-check',
269
+ ],
270
+ '0' => [
271
+ 'title' => __( 'No', 'essential-addons-elementor' ),
272
+ 'icon' => 'fa fa-ban',
273
+ ]
274
+ ],
275
+ 'default' => '0'
276
+ ]
277
+ );
278
+
279
+ $this->add_control(
280
+ 'show_load_more_text',
281
+ [
282
+ 'label' => esc_html__( 'Label Text', 'essential-addons-elementor' ),
283
+ 'type' => Controls_Manager::TEXT,
284
+ 'label_block' => false,
285
+ 'default' => esc_html__( 'Load More', 'essential-addons-elementor' ),
286
+ 'condition' => [
287
+ 'show_load_more' => '1',
288
+ ]
289
+ ]
290
+ );
291
+ }
292
+
293
+ }
294
+
295
+ if( 'eael-content-timeline' !== $this->get_name() ) {
296
+ $this->add_control(
297
+ 'eael_show_image',
298
+ [
299
+ 'label' => __( 'Show Image', 'essential-addons-elementor' ),
300
+ 'type' => Controls_Manager::CHOOSE,
301
+ 'options' => [
302
+ '1' => [
303
+ 'title' => __( 'Yes', 'essential-addons-elementor' ),
304
+ 'icon' => 'fa fa-check',
305
+ ],
306
+ '0' => [
307
+ 'title' => __( 'No', 'essential-addons-elementor' ),
308
+ 'icon' => 'fa fa-ban',
309
+ ]
310
+ ],
311
+ 'default' => '1'
312
+ ]
313
+ );
314
+ $this->add_group_control(
315
+ Group_Control_Image_Size::get_type(),
316
+ [
317
+ 'name' => 'image',
318
+ 'exclude' => [ 'custom' ],
319
+ 'default' => 'medium',
320
+ 'condition' => [
321
+ 'eael_show_image' => '1',
322
+ ]
323
+ ]
324
+ );
325
+
326
+ }
327
+
328
+ if( 'eael-content-timeline' === $this->get_name() ) {
329
+
330
+ $this->add_control(
331
+ 'eael_show_image_or_icon',
332
+ [
333
+ 'label' => __( 'Show Circle Image / Icon', 'essential-addons-elementor' ),
334
+ 'type' => Controls_Manager::CHOOSE,
335
+ 'options' => [
336
+ 'img' => [
337
+ 'title' => __( 'Image', 'essential-addons-elementor' ),
338
+ 'icon' => 'fa fa-picture-o',
339
+ ],
340
+ 'icon' => [
341
+ 'title' => __( 'Icon', 'essential-addons-elementor' ),
342
+ 'icon' => 'fa fa-info',
343
+ ],
344
+ 'bullet' => [
345
+ 'title' => __( 'Bullet', 'essential-addons-elementor' ),
346
+ 'icon' => 'fa fa-circle',
347
+ ]
348
+ ],
349
+ 'default' => 'icon',
350
+ 'condition' => [
351
+ 'eael_content_timeline_choose' => 'dynamic'
352
+ ]
353
+ ]
354
+ );
355
+
356
+ $this->add_control(
357
+ 'eael_icon_image',
358
+ [
359
+ 'label' => esc_html__( 'Icon Image', 'essential-addons-elementor' ),
360
+ 'type' => Controls_Manager::MEDIA,
361
+ 'default' => [
362
+ 'url' => Utils::get_placeholder_image_src(),
363
+ ],
364
+ 'condition' => [
365
+ 'eael_show_image_or_icon' => 'img',
366
+ ]
367
+ ]
368
+ );
369
+ $this->add_control(
370
+ 'eael_icon_image_size',
371
+ [
372
+ 'label' => esc_html__( 'Icon Image Size', 'essential-addons-elementor' ),
373
+ 'type' => Controls_Manager::SLIDER,
374
+ 'default' => [
375
+ 'size' => 24,
376
+ ],
377
+ 'range' => [
378
+ 'px' => [
379
+ 'max' => 60,
380
+ ],
381
+ ],
382
+ 'condition' => [
383
+ 'eael_show_image_or_icon' => 'img',
384
+ ],
385
+ 'selectors' => [
386
+ '{{WRAPPER}} .eael-content-timeline-img img' => 'width: {{SIZE}}px;',
387
+ ],
388
+ ]
389
+ );
390
+
391
+ $this->add_control(
392
+ 'eael_content_timeline_circle_icon',
393
+ [
394
+ 'label' => esc_html__( 'Icon', 'essential-addons-elementor' ),
395
+ 'type' => Controls_Manager::ICON,
396
+ 'default' => 'fa fa-pencil',
397
+ 'condition' => [
398
+ 'eael_content_timeline_choose' => 'dynamic',
399
+ 'eael_show_image_or_icon' => 'icon',
400
+ ]
401
+ ]
402
+ );
403
+
404
+ }
405
+
406
+ $this->add_control(
407
+ 'eael_show_title',
408
+ [
409
+ 'label' => __( 'Show Title', 'essential-addons-elementor' ),
410
+ 'type' => Controls_Manager::CHOOSE,
411
+ 'options' => [
412
+ '1' => [
413
+ 'title' => __( 'Yes', 'essential-addons-elementor' ),
414
+ 'icon' => 'fa fa-check',
415
+ ],
416
+ '0' => [
417
+ 'title' => __( 'No', 'essential-addons-elementor' ),
418
+ 'icon' => 'fa fa-ban',
419
+ ]
420
+ ],
421
+ 'default' => '1'
422
+ ]
423
+ );
424
+
425
+ $this->add_control(
426
+ 'eael_show_excerpt',
427
+ [
428
+ 'label' => __( 'Show excerpt', 'essential-addons-elementor' ),
429
+ 'type' => Controls_Manager::CHOOSE,
430
+ 'options' => [
431
+ '1' => [
432
+ 'title' => __( 'Yes', 'essential-addons-elementor' ),
433
+ 'icon' => 'fa fa-check',
434
+ ],
435
+ '0' => [
436
+ 'title' => __( 'No', 'essential-addons-elementor' ),
437
+ 'icon' => 'fa fa-ban',
438
+ ]
439
+ ],
440
+ 'default' => '1'
441
+ ]
442
+ );
443
+
444
+ $this->add_control(
445
+ 'eael_excerpt_length',
446
+ [
447
+ 'label' => __( 'Excerpt Words', 'essential-addons-elementor' ),
448
+ 'type' => Controls_Manager::NUMBER,
449
+ 'default' => '10',
450
+ 'condition' => [
451
+ 'eael_show_excerpt' => '1',
452
+ ],
453
+ 'description' => '<span class="pro-feature"> Pro Feature. Get <a href="https://essential-addons.com/elementor/buy.php" target="_blank">Pro version</a> </span>'
454
+ ]
455
+ );
456
+
457
+ if( 'eael-post-grid' === $this->get_name() || 'eael-post-block' === $this->get_name() || 'eael-post-carousel' === $this->get_name() ) {
458
+
459
+ $this->add_control(
460
+ 'eael_show_meta',
461
+ [
462
+ 'label' => __( 'Show Meta', 'essential-addons-elementor' ),
463
+ 'type' => Controls_Manager::CHOOSE,
464
+ 'options' => [
465
+ '1' => [
466
+ 'title' => __( 'Yes', 'essential-addons-elementor' ),
467
+ 'icon' => 'fa fa-check',
468
+ ],
469
+ '0' => [
470
+ 'title' => __( 'No', 'essential-addons-elementor' ),
471
+ 'icon' => 'fa fa-ban',
472
+ ]
473
+ ],
474
+ 'default' => '1'
475
+ ]
476
+ );
477
+
478
+ $this->add_control(
479
+ 'meta_position',
480
+ [
481
+ 'label' => esc_html__( 'Meta Position', 'essential-addons-elementor' ),
482
+ 'type' => Controls_Manager::SELECT,
483
+ 'default' => 'meta-entry-footer',
484
+ 'options' => [
485
+ 'meta-entry-header' => esc_html__( 'Entry Header', 'essential-addons-elementor' ),
486
+ 'meta-entry-footer' => esc_html__( 'Entry Footer', 'essential-addons-elementor' ),
487
+ ],
488
+ 'condition' => [
489
+ 'eael_show_meta' => '1',
490
+ ]
491
+ ]
492
+ );
493
+
494
+ }
495
+
496
+ $this->end_controls_section();
497
+
498
+ }
499
+
500
+ /**
501
+ * Load More Button Style
502
+ * with Hover!
503
+ */
504
+ protected function load_more_button_style(){
505
+
506
+ $this->start_controls_section(
507
+ 'eael_section_load_more_btn',
508
+ [
509
+ 'label' => __( 'Load More Button Style', 'essential-addons-elementor' ),
510
+ 'tab' => Controls_Manager::TAB_STYLE,
511
+ 'condition' => [
512
+ 'show_load_more' => '1'
513
+ ]
514
+ ]
515
+ );
516
+
517
+ $this->add_responsive_control(
518
+ 'eael_post_grid_load_more_btn_padding',
519
+ [
520
+ 'label' => esc_html__( 'Padding', 'essential-addons-elementor' ),
521
+ 'type' => Controls_Manager::DIMENSIONS,
522
+ 'size_units' => [ 'px', 'em', '%' ],
523
+ 'selectors' => [
524
+ '{{WRAPPER}} .eael-load-more-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
525
+ ],
526
+ ]
527
+ );
528
+
529
+ $this->add_responsive_control(
530
+ 'eael_post_grid_load_more_btn_margin',
531
+ [
532
+ 'label' => esc_html__( 'Margin', 'essential-addons-elementor' ),
533
+ 'type' => Controls_Manager::DIMENSIONS,
534
+ 'size_units' => [ 'px', 'em', '%' ],
535
+ 'selectors' => [
536
+ '{{WRAPPER}} .eael-load-more-button' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
537
+ ],
538
+ ]
539
+ );
540
+ $this->add_group_control(
541
+ Group_Control_Typography::get_type(),
542
+ [
543
+ 'name' => 'eael_post_grid_load_more_btn_typography',
544
+ 'selector' => '{{WRAPPER}} .eael-load-more-button',
545
+ ]
546
+ );
547
+
548
+ $this->start_controls_tabs( 'eael_post_grid_load_more_btn_tabs' );
549
+
550
+ // Normal State Tab
551
+ $this->start_controls_tab( 'eael_post_grid_load_more_btn_normal', [ 'label' => esc_html__( 'Normal', 'essential-addons-elementor' ) ] );
552
+
553
+ $this->add_control(
554
+ 'eael_post_grid_load_more_btn_normal_text_color',
555
+ [
556
+ 'label' => esc_html__( 'Text Color', 'essential-addons-elementor' ),
557
+ 'type' => Controls_Manager::COLOR,
558
+ 'default' => '#fff',
559
+ 'selectors' => [
560
+ '{{WRAPPER}} .eael-load-more-button' => 'color: {{VALUE}};',
561
+ ],
562
+ ]
563
+ );
564
+
565
+ $this->add_control(
566
+ 'eael_cta_btn_normal_bg_color',
567
+ [
568
+ 'label' => esc_html__( 'Background Color', 'essential-addons-elementor' ),
569
+ 'type' => Controls_Manager::COLOR,
570
+ 'default' => '#29d8d8',
571
+ 'selectors' => [
572
+ '{{WRAPPER}} .eael-load-more-button' => 'background: {{VALUE}};',
573
+ ],
574
+ ]
575
+ );
576
+
577
+ $this->add_group_control(
578
+ Group_Control_Border::get_type(),
579
+ [
580
+ 'name' => 'eael_post_grid_load_more_btn_normal_border',
581
+ 'label' => esc_html__( 'Border', 'essential-addons-elementor' ),
582
+ 'selector' => '{{WRAPPER}} .eael-load-more-button',
583
+ ]
584
+ );
585
+
586
+ $this->add_control(
587
+ 'eael_post_grid_load_more_btn_border_radius',
588
+ [
589
+ 'label' => esc_html__( 'Border Radius', 'essential-addons-elementor' ),
590
+ 'type' => Controls_Manager::SLIDER,
591
+ 'range' => [
592
+ 'px' => [
593
+ 'max' => 100,
594
+ ],
595
+ ],
596
+ 'selectors' => [
597
+ '{{WRAPPER}} .eael-load-more-button' => 'border-radius: {{SIZE}}px;',
598
+ ],
599
+ ]
600
+ );
601
+ $this->add_group_control(
602
+ Group_Control_Box_Shadow::get_type(),
603
+ [
604
+ 'name' => 'eael_post_grid_load_more_btn_shadow',
605
+ 'selector' => '{{WRAPPER}} .eael-load-more-button',
606
+ 'separator' => 'before'
607
+ ]
608
+ );
609
+
610
+ $this->end_controls_tab();
611
+
612
+ // Hover State Tab
613
+ $this->start_controls_tab( 'eael_post_grid_load_more_btn_hover', [ 'label' => esc_html__( 'Hover', 'essential-addons-elementor' ) ] );
614
+
615
+ $this->add_control(
616
+ 'eael_post_grid_load_more_btn_hover_text_color',
617
+ [
618
+ 'label' => esc_html__( 'Text Color', 'essential-addons-elementor' ),
619
+ 'type' => Controls_Manager::COLOR,
620
+ 'default' => '#fff',
621
+ 'selectors' => [
622
+ '{{WRAPPER}} .eael-load-more-button:hover' => 'color: {{VALUE}};',
623
+ ],
624
+ ]
625
+ );
626
+
627
+ $this->add_control(
628
+ 'eael_post_grid_load_more_btn_hover_bg_color',
629
+ [
630
+ 'label' => esc_html__( 'Background Color', 'essential-addons-elementor' ),
631
+ 'type' => Controls_Manager::COLOR,
632
+ 'default' => '#27bdbd',
633
+ 'selectors' => [
634
+ '{{WRAPPER}} .eael-load-more-button:hover' => 'background: {{VALUE}};',
635
+ ],
636
+ ]
637
+ );
638
+
639
+ $this->add_control(
640
+ 'eael_post_grid_load_more_btn_hover_border_color',
641
+ [
642
+ 'label' => esc_html__( 'Border Color', 'essential-addons-elementor' ),
643
+ 'type' => Controls_Manager::COLOR,
644
+ 'default' => '',
645
+ 'selectors' => [
646
+ '{{WRAPPER}} .eael-load-more-button:hover' => 'border-color: {{VALUE}};',
647
+ ],
648
+ ]
649
+
650
+ );
651
+ $this->add_group_control(
652
+ Group_Control_Box_Shadow::get_type(),
653
+ [
654
+ 'name' => 'eael_post_grid_load_more_btn_hover_shadow',
655
+ 'selector' => '{{WRAPPER}} .eael-load-more-button:hover',
656
+ 'separator' => 'before'
657
+ ]
658
+ );
659
+ $this->end_controls_tab();
660
+
661
+ $this->end_controls_tabs();
662
+
663
+ $this->end_controls_section();
664
+
665
+ }
666
+
667
+ }
668
+
669
+ class EAE_Helper {
670
+
671
+ public function __construct() {
672
+ $this->add_actions();
673
+ }
674
+
675
+ public function register_controls() {
676
+ $controls_manager = Plugin::instance()->controls_manager;
677
+ $controls_manager->add_group_control( EAE_Posts_Group_Control::get_type(), new EAE_Posts_Group_Control() );
678
+ }
679
+
680
+ protected function add_actions() {
681
+ add_action( 'elementor/controls/controls_registered', [ $this, 'register_controls' ] );
682
+ }
683
+
684
+ public static function get_query_args( $control_id, $settings ) {
685
+ $defaults = [
686
+ $control_id . '_post_type' => 'post',
687
+ $control_id . '_posts_ids' => [],
688
+ 'orderby' => 'date',
689
+ 'order' => 'desc',
690
+ 'posts_per_page' => 3,
691
+ 'offset' => 0,
692
+ ];
693
+
694
+ $settings = wp_parse_args( $settings, $defaults );
695
+
696
+ $post_type = $settings[ $control_id . '_post_type' ];
697
+
698
+ $query_args = [
699
+ 'orderby' => $settings['orderby'],
700
+ 'order' => $settings['order'],
701
+ 'ignore_sticky_posts' => 1,
702
+ 'post_status' => 'publish', // Hide drafts/private posts for admins
703
+ ];
704
+
705
+ if ( 'by_id' === $post_type ) {
706
+ $query_args['post_type'] = 'any';
707
+ $query_args['post__in'] = $settings[ $control_id . '_posts_ids' ];
708
+
709
+ if ( empty( $query_args['post__in'] ) ) {
710
+ // If no selection - return an empty query
711
+ $query_args['post__in'] = [ 0 ];
712
+ }
713
+ } else {
714
+ $query_args['post_type'] = $post_type;
715
+ $query_args['posts_per_page'] = $settings['posts_per_page'];
716
+ $query_args['tax_query'] = [];
717
+
718
+ $query_args['offset'] = $settings['offset'];
719
+
720
+ $taxonomies = get_object_taxonomies( $post_type, 'objects' );
721
+
722
+ foreach ( $taxonomies as $object ) {
723
+ $setting_key = $control_id . '_' . $object->name . '_ids';
724
+
725
+ if ( ! empty( $settings[ $setting_key ] ) ) {
726
+ $query_args['tax_query'][] = [
727
+ 'taxonomy' => $object->name,
728
+ 'field' => 'term_id',
729
+ 'terms' => $settings[ $setting_key ],
730
+ ];
731
+ }
732
+ }
733
+ }
734
+
735
+ if ( ! empty( $settings[ $control_id . '_authors' ] ) ) {
736
+ $query_args['author__in'] = $settings[ $control_id . '_authors' ];
737
+ }
738
+
739
+ $post__not_in = [];
740
+ if ( ! empty( $settings['post__not_in'] ) ) {
741
+ $post__not_in = array_merge( $post__not_in, $settings['post__not_in'] );
742
+ $query_args['post__not_in'] = $post__not_in;
743
+ }
744
+
745
+ if( isset( $query_args['tax_query'] ) && count( $query_args['tax_query'] ) > 1 ) {
746
+ $query_args['tax_query']['relation'] = 'OR';
747
+ }
748
+
749
+ return $query_args;
750
+ }
751
+
752
+ }
753
+
754
+ /**
755
+ * Group Control For EAE - Elements ( Posts ).
756
+ * @since 2.10.0
757
+ */
758
+
759
+ class EAE_Posts_Group_Control extends Group_Control_Base {
760
+
761
+ protected static $fields;
762
+
763
+ public static function get_type() {
764
+ return 'eaeposts';
765
+ }
766
+
767
+ public static function on_export_remove_setting_from_element( $element, $control_id ) {
768
+ unset( $element['settings'][ $control_id . '_posts_ids' ] );
769
+ unset( $element['settings'][ $control_id . '_authors' ] );
770
+
771
+ foreach ( Utils::get_post_types() as $post_type => $label ) {
772
+ $taxonomy_filter_args = [
773
+ 'show_in_nav_menus' => true,
774
+ 'object_type' => [ $post_type ],
775
+ ];
776
+
777
+ $taxonomies = get_taxonomies( $taxonomy_filter_args, 'objects' );
778
+
779
+ foreach ( $taxonomies as $taxonomy => $object ) {
780
+ unset( $element['settings'][ $control_id . '_' . $taxonomy . '_ids' ] );
781
+ }
782
+ }
783
+
784
+ return $element;
785
+ }
786
+
787
+ protected function init_fields() {
788
+ $fields = [];
789
+
790
+ $fields['post_type'] = [
791
+ 'label' => __( 'Source', 'essential-addons-elementor' ),
792
+ 'type' => Controls_Manager::SELECT,
793
+ ];
794
+
795
+ $fields['posts_ids'] = [
796
+ 'label' => __( 'Search & Select', 'essential-addons-elementor' ),
797
+ 'type' => Controls_Manager::SELECT2,
798
+ 'post_type' => '',
799
+ 'options' => \eael_get_all_types_post(),
800
+ 'label_block' => true,
801
+ 'multiple' => true,
802
+ 'condition' => [
803
+ 'post_type' => 'by_id',
804
+ ],
805
+ ];
806
+
807
+ $fields['authors'] = [
808
+ 'label' => __( 'Author', 'essential-addons-elementor' ),
809
+ 'label_block' => true,
810
+ 'type' => Controls_Manager::SELECT2,
811
+ 'multiple' => true,
812
+ 'default' => [],
813
+ 'options' => $this->get_authors(),
814
+ 'condition' => [
815
+ 'post_type!' => [
816
+ 'by_id',
817
+ ],
818
+ ],
819
+ ];
820
+
821
+ return $fields;
822
+ }
823
+
824
+ protected function prepare_fields( $fields ) {
825
+
826
+ $post_types = eael_get_post_types();
827
+
828
+ $post_types_options = $post_types;
829
+
830
+ $post_types_options['by_id'] = __( 'Manual Selection', 'essential-addons-elementor' );
831
+
832
+ $fields['post_type']['options'] = $post_types_options;
833
+
834
+ $fields['post_type']['default'] = key( $post_types );
835
+
836
+ $fields['posts_ids']['object_type'] = array_keys( $post_types );
837
+
838
+ $taxonomy_filter_args = [
839
+ 'show_in_nav_menus' => true,
840
+ ];
841
+
842
+ if ( ! empty( $args['post_type'] ) ) {
843
+ $taxonomy_filter_args['object_type'] = [ $args['post_type'] ];
844
+ }
845
+
846
+ $taxonomies = get_taxonomies( $taxonomy_filter_args, 'objects' );
847
+
848
+ foreach ( $taxonomies as $taxonomy => $object ) {
849
+ $taxonomy_args = [
850
+ 'label' => $object->label,
851
+ 'type' => Controls_Manager::SELECT2,
852
+ 'label_block' => true,
853
+ 'multiple' => true,
854
+ 'object_type' => $taxonomy,
855
+ 'options' => [],
856
+ 'condition' => [
857
+ 'post_type' => $object->object_type,
858
+ ],
859
+ ];
860
+
861
+ $options = [];
862
+
863
+ $taxonomy_args['type'] = Controls_Manager::SELECT2;
864
+
865
+ $terms = get_terms( $taxonomy );
866
+
867
+ foreach ( $terms as $term ) {
868
+ $options[ $term->term_id ] = $term->name;
869
+ }
870
+
871
+ $taxonomy_args['options'] = $options;
872
+
873
+ $fields[ $taxonomy . '_ids' ] = $taxonomy_args;
874
+ }
875
+
876
+ unset( $fields['post_format_ids'] );
877
+
878
+ return parent::prepare_fields( $fields );
879
+ }
880
+
881
+ /**
882
+ * All authors name and ID, who published at least 1 post.
883
+ * @return array
884
+ */
885
+ public function get_authors() {
886
+ $user_query = new \WP_User_Query(
887
+ [
888
+ 'who' => 'authors',
889
+ 'has_published_posts' => true,
890
+ 'fields' => [
891
+ 'ID',
892
+ 'display_name',
893
+ ],
894
+ ]
895
+ );
896
+
897
+ $authors = [];
898
+
899
+ foreach ( $user_query->get_results() as $result ) {
900
+ $authors[ $result->ID ] = $result->display_name;
901
+ }
902
+
903
+ return $authors;
904
+ }
905
+
906
+ protected function get_default_options() {
907
+ return [
908
+ 'popover' => false,
909
+ ];
910
+ }
911
+
912
+ }
913
+
914
+
915
 
includes/queries.php CHANGED
@@ -1,21 +1,45 @@
1
  <?php
2
 
3
-
4
  /**
5
  * Get All POst Types
6
  * @return array
7
  */
8
  function eael_get_post_types(){
9
 
10
- $eael_cpts = get_post_types( array( 'public' => true, 'show_in_nav_menus' => true ) );
11
- $eael_exclude_cpts = array( 'elementor_library', 'attachment', 'product' );
12
 
13
  foreach ( $eael_exclude_cpts as $exclude_cpt ) {
14
  unset($eael_cpts[$exclude_cpt]);
15
  }
16
  $post_types = array_merge($eael_cpts);
 
 
 
17
 
18
- return $post_types;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  }
20
  /**
21
  * Post Settings Parameter
@@ -23,56 +47,13 @@ function eael_get_post_types(){
23
  * @return array
24
  */
25
  function eael_get_post_settings( $settings ){
26
- $tags = $categories = [];
27
  foreach( $settings as $key => $value ) {
28
  if( in_array( $key, posts_args() ) ) {
29
- switch( $key ){
30
- case 'eael_post_tags' :
31
- if( ! empty( $settings['eael_post_tags'] ) ) {
32
- $tags = [[
33
- 'taxonomy' => 'post_tag',
34
- 'field' => 'term_id',
35
- 'terms' => $settings['eael_post_tags'],
36
- ]];
37
- }
38
- break;
39
- case 'category' :
40
- if( ! empty( $settings['category'] ) ) {
41
- $categories = [[
42
- 'taxonomy' => 'category',
43
- 'field' => 'term_id',
44
- 'terms' => $settings['category'],
45
- ]];
46
- }
47
- break;
48
- case 'eael_post_authors' :
49
- if( isset( $settings['eael_post_authors'] ) && ! empty( $settings['eael_post_authors'] ) && is_array( $settings['eael_post_authors'] ) ) {
50
- $post_args['author'] = implode( ",", $settings['eael_post_authors'] );
51
- }
52
- break;
53
- case 'page__not_in' :
54
- if( isset( $settings['page__not_in'] ) && ! empty( $settings['page__not_in'] ) && is_array( $settings['page__not_in'] ) ) {
55
- $post_args['post__not_in'] = $value;
56
- }
57
- break;
58
- default :
59
- if( isset( $settings[ $key ] ) ) {
60
- $post_args[ $key ] = $value;
61
- }
62
- break;
63
- }
64
  }
65
  }
66
 
67
- if( isset( $post_args['post_type'] ) && $post_args['post_type'] == 'post' ) {
68
- $relation = ! empty( $categories ) && ! empty( $tags ) ? [ 'relation' => 'OR' ] : [];
69
- $post_args['tax_query'] = array_merge($relation, $tags, $categories);
70
- }
71
-
72
- $post_args['posts_per_page'] = $post_args['posts_per_page'] ? $post_args['posts_per_page'] : 4;
73
  $post_args['post_style'] = isset( $post_args['post_style'] ) ? $post_args['post_style'] : 'grid';
74
-
75
- if( isset( $post_args['offset'] ) ) $post_args['offset'] = intval( $post_args['offset'] );
76
  $post_args['post_status'] = 'publish';
77
 
78
  return $post_args;
@@ -463,44 +444,64 @@ if ( !function_exists('eael_get_pages') ) {
463
  }
464
  }
465
 
 
466
  /**
467
- * Load More
 
 
 
 
468
  */
 
 
469
 
470
- function eael_load_more_ajax(){
471
-
472
- if( isset( $_POST['action'] ) && $_POST['action'] == 'load_more' ) {
473
- $post_args = eael_get_post_settings( $_POST );
474
- } else {
475
- $args = func_get_args();
476
- $post_args = $args[0];
477
- }
478
-
479
- $posts = new WP_Query( $post_args );
480
 
481
- $return = array();
482
- $return['count'] = $posts->found_posts;
483
-
484
- ob_start();
 
 
 
485
 
486
- while( $posts->have_posts() ) : $posts->the_post();
 
487
  /**
488
- * All content html here.
 
489
  */
490
- include ESSENTIAL_ADDONS_EL_PATH . 'includes/templates/content.php';
491
- endwhile;
492
-
493
- wp_reset_postdata();
494
- wp_reset_query();
495
- $return['content'] = ob_get_clean();
496
- if( isset( $_POST['action'] ) && $_POST['action'] == 'load_more' ) {
497
- echo $return['content'];
498
- } else {
499
- return $return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
500
  }
501
- }
502
- add_action( 'wp_ajax_nopriv_load_more', 'eael_load_more_ajax' );
503
- add_action( 'wp_ajax_load_more', 'eael_load_more_ajax' );
504
 
505
  /**
506
  * For All Settings Key Need To Display
@@ -512,6 +513,8 @@ function posts_args(){
512
  // for content-ticker
513
  'eael_ticker_type',
514
  'eael_ticker_custom_contents',
 
 
515
 
516
  // common
517
  'meta_position',
@@ -523,16 +526,18 @@ function posts_args(){
523
  'eael_excerpt_length',
524
  'eael_show_read_more',
525
  'eael_read_more_text',
 
 
526
 
527
  // query_args
528
  'post_type',
 
529
  'posts_per_page',
530
  'post_style',
531
- 'eael_post_tags',
532
- 'category',
533
  'post__not_in',
534
- 'page__not_in',
535
  'eael_post_authors',
 
536
  'offset',
537
  'orderby',
538
  'order',
1
  <?php
2
 
 
3
  /**
4
  * Get All POst Types
5
  * @return array
6
  */
7
  function eael_get_post_types(){
8
 
9
+ $eael_cpts = get_post_types( array( 'public' => true, 'show_in_nav_menus' => true ), 'object' );
10
+ $eael_exclude_cpts = array( 'elementor_library', 'attachment' );
11
 
12
  foreach ( $eael_exclude_cpts as $exclude_cpt ) {
13
  unset($eael_cpts[$exclude_cpt]);
14
  }
15
  $post_types = array_merge($eael_cpts);
16
+ foreach( $post_types as $type ) {
17
+ $types[ $type->name ] = $type->label;
18
+ }
19
 
20
+ return $types;
21
+ }
22
+
23
+ /**
24
+ * Get all types of post.
25
+ * @return array
26
+ */
27
+ function eael_get_all_types_post(){
28
+ $posts_args = array(
29
+ 'post_type' => 'any',
30
+ 'post_style' => 'all_types',
31
+ 'post_status' => 'publish',
32
+ 'posts_per_page' => '-1',
33
+ );
34
+ $posts = eael_load_more_ajax( $posts_args );
35
+
36
+ $post_list = [];
37
+
38
+ foreach( $posts as $post ) {
39
+ $post_list[ $post->ID ] = $post->post_title;
40
+ }
41
+
42
+ return $post_list;
43
  }
44
  /**
45
  * Post Settings Parameter
47
  * @return array
48
  */
49
  function eael_get_post_settings( $settings ){
 
50
  foreach( $settings as $key => $value ) {
51
  if( in_array( $key, posts_args() ) ) {
52
+ $post_args[ $key ] = $value;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  }
54
  }
55
 
 
 
 
 
 
 
56
  $post_args['post_style'] = isset( $post_args['post_style'] ) ? $post_args['post_style'] : 'grid';
 
 
57
  $post_args['post_status'] = 'publish';
58
 
59
  return $post_args;
444
  }
445
  }
446
 
447
+
448
  /**
449
+ * This function is responsible for get the post data.
450
+ * It will return HTML markup with AJAX call and with normal call.
451
+ *
452
+ * @return string of an html markup with AJAX call.
453
+ * @return array of content and found posts count without AJAX call.
454
  */
455
+ if( ! function_exists( 'eael_load_more_ajax' ) ) :
456
+ function eael_load_more_ajax(){
457
 
458
+ if( isset( $_POST['action'] ) && $_POST['action'] == 'load_more' ) {
459
+ $post_args = eael_get_post_settings( $_POST );
460
+ $post_args = array_merge( \Elementor\EAE_Helper::get_query_args( 'eaeposts', $_POST ), $post_args );
 
 
 
 
 
 
 
461
 
462
+ if( isset( $_POST['tax_query'] ) && count( $_POST['tax_query'] ) > 1 ) {
463
+ $post_args['tax_query']['relation'] = 'OR';
464
+ }
465
+ } else {
466
+ $args = func_get_args();
467
+ $post_args = $args[0];
468
+ }
469
 
470
+
471
+ $posts = new WP_Query( $post_args );
472
  /**
473
+ * For returning all types of post as an array
474
+ * @return array;
475
  */
476
+ if( isset( $post_args['post_style'] ) && $post_args['post_style'] == 'all_types' ) {
477
+ return $posts->posts;
478
+ }
479
+
480
+ $return = array();
481
+ $return['count'] = $posts->found_posts;
482
+
483
+ ob_start();
484
+
485
+ while( $posts->have_posts() ) : $posts->the_post();
486
+ $isPrinted = false;
487
+ /**
488
+ * All content html here.
489
+ */
490
+ include ESSENTIAL_ADDONS_EL_PATH . 'includes/templates/content.php';
491
+ endwhile;
492
+ $return['content'] = ob_get_clean();
493
+ wp_reset_postdata();
494
+ wp_reset_query();
495
+ if( isset( $_POST['action'] ) && $_POST['action'] == 'load_more' ) {
496
+ echo $return['content'];
497
+ die();
498
+ } else {
499
+ return $return;
500
+ }
501
  }
502
+ add_action( 'wp_ajax_nopriv_load_more', 'eael_load_more_ajax' );
503
+ add_action( 'wp_ajax_load_more', 'eael_load_more_ajax' );
504
+ endif;
505
 
506
  /**
507
  * For All Settings Key Need To Display
513
  // for content-ticker
514
  'eael_ticker_type',
515
  'eael_ticker_custom_contents',
516
+
517
+ 'eael_post_grid_columns',
518
 
519
  // common
520
  'meta_position',
526
  'eael_excerpt_length',
527
  'eael_show_read_more',
528
  'eael_read_more_text',
529
+ 'show_load_more',
530
+ 'show_load_more_text',
531
 
532
  // query_args
533
  'post_type',
534
+ 'post__in',
535
  'posts_per_page',
536
  'post_style',
537
+ 'tax_query',
 
538
  'post__not_in',
 
539
  'eael_post_authors',
540
+ 'eaeposts_authors',
541
  'offset',
542
  'orderby',
543
  'order',
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Elementor Essential Addons ===
2
- Contributors: Codetic, re_enter_rupok, Asif2BD, robicse11128, priyomukul, mahfuz01
3
  Tags: elementor, elements, addons, elementor addon, elementor widget, page builder, builder, visual editor, wordpress page builder, elementor form
4
  Requires at least: 4.0
5
  Tested up to: 4.9.7
6
  Requires PHP: 5.6
7
- Stable tag: 2.7.4
8
  License: GPLv3
9
  License URI: https://opensource.org/licenses/GPL-3.0
10
 
@@ -137,6 +137,15 @@ Your existing elements/content will work with premium version. So you won't lose
137
 
138
 
139
 
 
 
 
 
 
 
 
 
 
140
  == Changelog ==
141
 
142
  = 2.7.4 =
@@ -322,9 +331,9 @@ Initial stable realese
322
 
323
  == Upgrade Notice ==
324
 
325
- = 2.2.2 =
326
 
327
- - Ninja Forms element added
328
- - Load more functionality added to Post elements (Post Grid & Post Timeline)
329
- - Few presets added for Team Members, Countdown, Fancy Text
330
- - Few minor improvements
1
  === Elementor Essential Addons ===
2
+ Contributors: Codetic, re_enter_rupok, Asif2BD, robicse11128, priyomukul, mahfuz01, manik08cse
3
  Tags: elementor, elements, addons, elementor addon, elementor widget, page builder, builder, visual editor, wordpress page builder, elementor form
4
  Requires at least: 4.0
5
  Tested up to: 4.9.7
6
  Requires PHP: 5.6
7
+ Stable tag: 2.7.5
8
  License: GPLv3
9
  License URI: https://opensource.org/licenses/GPL-3.0
10
 
137
 
138
 
139
 
140
+ == Changelog ==
141
+
142
+ = 2.7.5 =
143
+ - (Make sure to clear cache nad hrad refresh the page after update)
144
+ - Post elements improved and optimized
145
+ - Info Box element improved
146
+ - Flip Box element improved
147
+ - Few minor bugfix and improvements
148
+
149
  == Changelog ==
150
 
151
  = 2.7.4 =
331
 
332
  == Upgrade Notice ==
333
 
334
+ = 2.7.5 =
335
 
336
+ - Post elements improved and optimized
337
+ - Info Box element improved
338
+ - Flip Box element improved
339
+ - Few minor bugfix and improvements