Changeset 2310439
- Timestamp:
- 05/22/2020 09:04:27 PM (6 years ago)
- Location:
- lct-useful-shortcodes-functions/trunk
- Files:
-
- 5 added
- 3 deleted
- 17 edited
-
assets/css/a.min.css (modified) (1 diff)
-
assets/css/custom.min.css (modified) (1 diff)
-
available/email-reminder/includes/classes/PDER.php (modified) (4 diffs)
-
available/email-reminder/includes/classes/PDER_Admin.php (modified) (6 diffs)
-
code/__init.php (modified) (3 diffs)
-
code/admin/_admin.php (modified) (2 diffs)
-
code/admin/git/_lct_wp/.htaccess (modified) (4 diffs)
-
code/admin/git/_lct_wp/_editzz-v8.2.txt (deleted)
-
code/admin/git/_lct_wp/_editzz-v8.3.txt (added)
-
code/admin/git/_lct_wp/apps/_p1.php (deleted)
-
code/admin/git/_lct_wp/apps/_p2.php (deleted)
-
code/admin/git/_lct_wp/apps/scratch1.php (added)
-
code/admin/git/_lct_wp/apps/scratch2.php (added)
-
code/admin/lct.php (modified) (3 diffs)
-
code/api/_helpers.php (modified) (4 diffs)
-
code/features/class/mail.php (modified) (3 diffs)
-
code/plugins/Avada/api/overrides.php (modified) (5 diffs)
-
code/plugins/acf/api/form.php (modified) (4 diffs)
-
code/plugins/acf/instant_save.php (modified) (14 diffs)
-
code/plugins/acf/op_main_fixes_cleanups.php (modified) (6 diffs)
-
code/plugins/acf/op_main_settings_groups.php (modified) (37 diffs)
-
code/plugins/wp-mail-smtp (added)
-
code/plugins/wp-mail-smtp/_admin.php (added)
-
lct-useful-shortcodes-functions.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lct-useful-shortcodes-functions/trunk/assets/css/a.min.css
r2036401 r2310439 1 a.button,a.fusion-button,a.fusion-button:hover,.fusion-button,.fusion-button:hover{text-decoration:none !important}.fusion-header-wrapper .menu-item a,.fusion-header-wrapper .menu-item a:hover,.fusion-social-network-icon,.fusion-social-network-icon:hover,.fusion-mobile-nav-holder a,.fusion-footer .fusion-footer-copyright-area{text-decoration:none !important;border-bottom:none !important}.tel,.tel:hover,[href*="tel:"],[href*="tel:"]:hover{cursor:default !important;text-decoration:none !important;border-bottom:none !important}.fusion-format-box .fusion-icon-pen{display:none !important}.pac-container{z-index:99999}#nks-tab-1:not(.nks-active){display:none !important}#nks-content-1>div{padding:0 !important}#wpadminbar{z-index:99999 !important}@media screen and (max-width: 600px){#wpadminbar{top:0 !important}}.simple-image .aligncenter{margin-bottom:0}.fusion-info-box a,.fusion-info-box a:hover{color:#FFFFFF}#lct_after_clear:after{content:".";visibility:hidden;display:block;height:0;clear:both}#hidden,.hidden{display:none}#hidden-imp ,.hidden-imp,#lct_current_user_can_not_access,.lct_current_user_can_not_access{display:none !important}.hidden_inner div{display:none}.hidden_inner_imp div{display:none !important}.disabled{cursor:not-allowed}.disabled_imp{cursor:not-allowed !important}.lct_text_right{text-align:right}.nomargin,.nom{margin:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-left:0 !important;margin-right:0 !important}.nomp{margin:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-left:0 !important;margin-right:0 !important;padding:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-left:0 !important;padding-right:0 !important}.nom-top{margin-top:0}.lazyframe{background-color:inherit}.lazyframe.map{background-size:contain !important}.lazyframe.map:before{padding-top:60% !important}.lazyframe.birdeye iframe{width:270px !important;border-width:0;display:block;margin:0 auto;overflow:hidden}.lazyframe.birdeye{max-width:270px !important;margin:0 auto}.lazyframe.birdeye:before{padding-top:170px !important}.lazyframe[data-vendor="youtube"]{background-color:#000000 !important}@media screen and (max-width: 1024px){.lct_overlay_menu{position:fixed;width:100%;height:100%;top:0;left:0;transition:all .5s ease;z-index:2;opacity:0;visibility:hidden}.lct_overlay_menu.open{opacity:1;visibility:visible;overflow-y:scroll}.lct_overlay_menu .fusion-mobile-nav-holder{padding-top:10%}.lct_overlay_menu .close{position:fixed;top:40px;right:45px;z-index:3;cursor:pointer;font-family:sans-serif;opacity:0.8}.lct_overlay_menu .close span,.lct_overlay_menu .close span:before,.lct_overlay_menu .close span:after{border-radius:4px;height:5px;width:35px;position:absolute;display:block;content:''}.lct_overlay_menu .close span{background:transparent !important}.lct_overlay_menu .close span:before{transform:rotate(45deg)}.lct_overlay_menu .close span:after{transform:rotate(-45deg)}.lct_overlay_menu .outer-close{position:absolute;right:0;top:0;width:85px;height:85px;cursor:pointer}.lct_overlay_menu .fusion-mobile-nav-holder>ul{border:0 !important}.lct_overlay_menu .fusion-mobile-current-nav-item>a,.lct_overlay_menu .fusion-mobile-nav-item a{background-color:transparent;overflow:hidden}.lct_overlay_menu img{margin-top:10%;max-width:15%}}@media (min-device-width: 320px) and (max-device-height: 568px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait), (max-width: 385px) and (-webkit-device-pixel-ratio: 1){.lct_overlay_menu .fusion-mobile-current-nav-item>a,.lct_overlay_menu .fusion-mobile-nav-item a{font-size:24px !important}}1 a.button,a.fusion-button,a.fusion-button:hover,.fusion-button,.fusion-button:hover{text-decoration:none !important}.fusion-header-wrapper .menu-item a,.fusion-header-wrapper .menu-item a:hover,.fusion-social-network-icon,.fusion-social-network-icon:hover,.fusion-mobile-nav-holder a,.fusion-footer .fusion-footer-copyright-area{text-decoration:none !important;border-bottom:none !important}.tel,.tel:hover,[href*="tel:"],[href*="tel:"]:hover{cursor:default !important;text-decoration:none !important;border-bottom:none !important}.fusion-format-box .fusion-icon-pen{display:none !important}.pac-container{z-index:99999}#nks-tab-1:not(.nks-active){display:none !important}#nks-content-1>div{padding:0 !important}#wpadminbar{z-index:99999 !important}@media screen and (max-width: 600px){#wpadminbar{top:0 !important}}.simple-image .aligncenter{margin-bottom:0}.fusion-info-box a,.fusion-info-box a:hover{color:#FFFFFF}#lct_after_clear:after{content:".";visibility:hidden;display:block;height:0;clear:both}#hidden,.hidden{display:none}#hidden-imp:not(.acf-error),.hidden-imp:not(.acf-error),#lct_current_user_can_not_access,.lct_current_user_can_not_access{display:none !important}.hidden_inner div{display:none}.hidden_inner_imp div{display:none !important}.disabled{cursor:not-allowed}.disabled_imp{cursor:not-allowed !important}.lct_text_right{text-align:right}.nomargin,.nom{margin:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-left:0 !important;margin-right:0 !important}.nomp{margin:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-left:0 !important;margin-right:0 !important;padding:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-left:0 !important;padding-right:0 !important}.nom-top{margin-top:0}.lazyframe{background-color:inherit}.lazyframe.map{background-size:contain !important}.lazyframe.map:before{padding-top:60% !important}.lazyframe.birdeye iframe{width:270px !important;border-width:0;display:block;margin:0 auto;overflow:hidden}.lazyframe.birdeye{max-width:270px !important;margin:0 auto}.lazyframe.birdeye:before{padding-top:170px !important}.lazyframe[data-vendor="youtube"]{background-color:#000000 !important}@media screen and (max-width: 1024px){.lct_overlay_menu{position:fixed;width:100%;height:100%;top:0;left:0;transition:all .5s ease;z-index:2;opacity:0;visibility:hidden}.lct_overlay_menu.open{opacity:1;visibility:visible;overflow-y:scroll}.lct_overlay_menu .fusion-mobile-nav-holder{padding-top:10%}.lct_overlay_menu .close{position:fixed;top:40px;right:45px;z-index:3;cursor:pointer;font-family:sans-serif;opacity:0.8}.lct_overlay_menu .close span,.lct_overlay_menu .close span:before,.lct_overlay_menu .close span:after{border-radius:4px;height:5px;width:35px;position:absolute;display:block;content:''}.lct_overlay_menu .close span{background:transparent !important}.lct_overlay_menu .close span:before{transform:rotate(45deg)}.lct_overlay_menu .close span:after{transform:rotate(-45deg)}.lct_overlay_menu .outer-close{position:absolute;right:0;top:0;width:85px;height:85px;cursor:pointer}.lct_overlay_menu .fusion-mobile-nav-holder>ul{border:0 !important}.lct_overlay_menu .fusion-mobile-current-nav-item>a,.lct_overlay_menu .fusion-mobile-nav-item a{background-color:transparent;overflow:hidden}.lct_overlay_menu img{margin-top:10%;max-width:15%}}@media (min-device-width: 320px) and (max-device-height: 568px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait), (max-width: 385px) and (-webkit-device-pixel-ratio: 1){.lct_overlay_menu .fusion-mobile-current-nav-item>a,.lct_overlay_menu .fusion-mobile-nav-item a{font-size:24px !important}} -
lct-useful-shortcodes-functions/trunk/assets/css/custom.min.css
r2036401 r2310439 1 a.button,a.fusion-button,a.fusion-button:hover,.fusion-button,.fusion-button:hover{text-decoration:none !important}.fusion-header-wrapper .menu-item a,.fusion-header-wrapper .menu-item a:hover,.fusion-social-network-icon,.fusion-social-network-icon:hover,.fusion-mobile-nav-holder a,.fusion-footer .fusion-footer-copyright-area{text-decoration:none !important;border-bottom:none !important}.tel,.tel:hover,[href*="tel:"],[href*="tel:"]:hover{cursor:default !important;text-decoration:none !important;border-bottom:none !important}.fusion-format-box .fusion-icon-pen{display:none !important}.pac-container{z-index:99999}#nks-tab-1:not(.nks-active){display:none !important}#nks-content-1>div{padding:0 !important}#wpadminbar{z-index:99999 !important}@media screen and (max-width: 600px){#wpadminbar{top:0 !important}}.simple-image .aligncenter{margin-bottom:0}.fusion-info-box a,.fusion-info-box a:hover{color:#FFFFFF}#lct_after_clear:after{content:".";visibility:hidden;display:block;height:0;clear:both}#hidden,.hidden{display:none}#hidden-imp ,.hidden-imp,#lct_current_user_can_not_access,.lct_current_user_can_not_access{display:none !important}.hidden_inner div{display:none}.hidden_inner_imp div{display:none !important}.disabled{cursor:not-allowed}.disabled_imp{cursor:not-allowed !important}.lct_text_right{text-align:right}.nomargin,.nom{margin:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-left:0 !important;margin-right:0 !important}.nomp{margin:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-left:0 !important;margin-right:0 !important;padding:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-left:0 !important;padding-right:0 !important}.nom-top{margin-top:0}.lazyframe{background-color:inherit}.lazyframe.map{background-size:contain !important}.lazyframe.map:before{padding-top:60% !important}.lazyframe.birdeye iframe{width:270px !important;border-width:0;display:block;margin:0 auto;overflow:hidden}.lazyframe.birdeye{max-width:270px !important;margin:0 auto}.lazyframe.birdeye:before{padding-top:170px !important}.lazyframe[data-vendor="youtube"]{background-color:#000000 !important}@media screen and (max-width: 1024px){.lct_overlay_menu{position:fixed;width:100%;height:100%;top:0;left:0;transition:all .5s ease;z-index:2;opacity:0;visibility:hidden}.lct_overlay_menu.open{opacity:1;visibility:visible;overflow-y:scroll}.lct_overlay_menu .fusion-mobile-nav-holder{padding-top:10%}.lct_overlay_menu .close{position:fixed;top:40px;right:45px;z-index:3;cursor:pointer;font-family:sans-serif;opacity:0.8}.lct_overlay_menu .close span,.lct_overlay_menu .close span:before,.lct_overlay_menu .close span:after{border-radius:4px;height:5px;width:35px;position:absolute;display:block;content:''}.lct_overlay_menu .close span{background:transparent !important}.lct_overlay_menu .close span:before{transform:rotate(45deg)}.lct_overlay_menu .close span:after{transform:rotate(-45deg)}.lct_overlay_menu .outer-close{position:absolute;right:0;top:0;width:85px;height:85px;cursor:pointer}.lct_overlay_menu .fusion-mobile-nav-holder>ul{border:0 !important}.lct_overlay_menu .fusion-mobile-current-nav-item>a,.lct_overlay_menu .fusion-mobile-nav-item a{background-color:transparent;overflow:hidden}.lct_overlay_menu img{margin-top:10%;max-width:15%}}@media (min-device-width: 320px) and (max-device-height: 568px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait), (max-width: 385px) and (-webkit-device-pixel-ratio: 1){.lct_overlay_menu .fusion-mobile-current-nav-item>a,.lct_overlay_menu .fusion-mobile-nav-item a{font-size:24px !important}}1 a.button,a.fusion-button,a.fusion-button:hover,.fusion-button,.fusion-button:hover{text-decoration:none !important}.fusion-header-wrapper .menu-item a,.fusion-header-wrapper .menu-item a:hover,.fusion-social-network-icon,.fusion-social-network-icon:hover,.fusion-mobile-nav-holder a,.fusion-footer .fusion-footer-copyright-area{text-decoration:none !important;border-bottom:none !important}.tel,.tel:hover,[href*="tel:"],[href*="tel:"]:hover{cursor:default !important;text-decoration:none !important;border-bottom:none !important}.fusion-format-box .fusion-icon-pen{display:none !important}.pac-container{z-index:99999}#nks-tab-1:not(.nks-active){display:none !important}#nks-content-1>div{padding:0 !important}#wpadminbar{z-index:99999 !important}@media screen and (max-width: 600px){#wpadminbar{top:0 !important}}.simple-image .aligncenter{margin-bottom:0}.fusion-info-box a,.fusion-info-box a:hover{color:#FFFFFF}#lct_after_clear:after{content:".";visibility:hidden;display:block;height:0;clear:both}#hidden,.hidden{display:none}#hidden-imp:not(.acf-error),.hidden-imp:not(.acf-error),#lct_current_user_can_not_access,.lct_current_user_can_not_access{display:none !important}.hidden_inner div{display:none}.hidden_inner_imp div{display:none !important}.disabled{cursor:not-allowed}.disabled_imp{cursor:not-allowed !important}.lct_text_right{text-align:right}.nomargin,.nom{margin:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-left:0 !important;margin-right:0 !important}.nomp{margin:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-left:0 !important;margin-right:0 !important;padding:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-left:0 !important;padding-right:0 !important}.nom-top{margin-top:0}.lazyframe{background-color:inherit}.lazyframe.map{background-size:contain !important}.lazyframe.map:before{padding-top:60% !important}.lazyframe.birdeye iframe{width:270px !important;border-width:0;display:block;margin:0 auto;overflow:hidden}.lazyframe.birdeye{max-width:270px !important;margin:0 auto}.lazyframe.birdeye:before{padding-top:170px !important}.lazyframe[data-vendor="youtube"]{background-color:#000000 !important}@media screen and (max-width: 1024px){.lct_overlay_menu{position:fixed;width:100%;height:100%;top:0;left:0;transition:all .5s ease;z-index:2;opacity:0;visibility:hidden}.lct_overlay_menu.open{opacity:1;visibility:visible;overflow-y:scroll}.lct_overlay_menu .fusion-mobile-nav-holder{padding-top:10%}.lct_overlay_menu .close{position:fixed;top:40px;right:45px;z-index:3;cursor:pointer;font-family:sans-serif;opacity:0.8}.lct_overlay_menu .close span,.lct_overlay_menu .close span:before,.lct_overlay_menu .close span:after{border-radius:4px;height:5px;width:35px;position:absolute;display:block;content:''}.lct_overlay_menu .close span{background:transparent !important}.lct_overlay_menu .close span:before{transform:rotate(45deg)}.lct_overlay_menu .close span:after{transform:rotate(-45deg)}.lct_overlay_menu .outer-close{position:absolute;right:0;top:0;width:85px;height:85px;cursor:pointer}.lct_overlay_menu .fusion-mobile-nav-holder>ul{border:0 !important}.lct_overlay_menu .fusion-mobile-current-nav-item>a,.lct_overlay_menu .fusion-mobile-nav-item a{background-color:transparent;overflow:hidden}.lct_overlay_menu img{margin-top:10%;max-width:15%}}@media (min-device-width: 320px) and (max-device-height: 568px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait), (max-width: 385px) and (-webkit-device-pixel-ratio: 1){.lct_overlay_menu .fusion-mobile-current-nav-item>a,.lct_overlay_menu .fusion-mobile-nav-item a{font-size:24px !important}} -
lct-useful-shortcodes-functions/trunk/available/email-reminder/includes/classes/PDER.php
r2002490 r2310439 5 5 6 6 7 /** 8 * @property array args 9 * @verified NEVER 10 */ 7 11 class PDER { 8 12 /** 9 * Get Ereminders 10 * Selects all 'reminders' custom post types from the 'posts' table whose 'post_date' is less than $date and 'post_status' = draft returns rows as a numerically indexed array of objects. Uses $wpdb->get_results() function to fetch the results from the database. 11 * 12 * @param string $date date in YYYY-MM-DD H:i:s format. Defaults to current local time 13 * @param string $status draft|publish. corresponds to scheduled and sent reminders respectively 14 * 15 * @return array numerically indexed array of row objects 13 * @var string 14 */ 15 public $post_type = null; 16 /** 17 * @var string 18 */ 19 public $post_type_slug = null; 20 /** 21 * @var array 22 */ 23 public $reminders = []; 24 25 26 /** 27 * Start up the class 28 * 29 * @param array $args 30 * 31 * @verified 2020.04.09 32 */ 33 function __construct( $args = [] ) { 34 //Store $args 35 $this->args = $args; 36 37 38 $this->post_type_slug = 'reminder'; 39 $this->post_type = get_cnst( $this->post_type_slug ); 40 41 42 //Setup WordPress action and filter hooks 43 $this->load_hooks(); 44 } 45 46 47 /** 48 * Setup WordPress action and filter hooks 49 * 50 * @since 2020.7 51 * @verified 2020.04.09 52 */ 53 function load_hooks() { 54 //bail early if already ran 55 if ( lct_did() ) 56 return; 57 58 59 /** 60 * everytime 61 */ 62 add_action( 'lct/is_cache_disabled/cache_flush', [ $this, '_flush' ] ); 63 64 65 //if ( lct_frontend() ) {} 66 67 68 //if ( lct_wp_admin_all() ) {} 69 70 71 //if ( lct_wp_admin_non_ajax() ) {} 72 73 74 //if ( lct_ajax_only() ) {} 75 } 76 77 78 /** 79 * Clear our cached items when memory gets too full 80 * 81 * @since 2020.7 82 * @verified 2020.04.09 83 */ 84 function _flush() { 85 $this->reminders = []; 86 } 87 88 89 /** 90 * Clean the ID of the post_id 91 * 92 * @param int|WP_Post $post_id 93 * 94 * @return int 95 * @since 2020.7 96 * @verified 2020.04.09 97 */ 98 function _get_post_id( $post_id ) { 99 return lct_get_clean_post_id( $post_id ); 100 } 101 102 103 /** 104 * Get the object of a particular reminder 105 * 106 * @param int|WP_Post $reminder_id Required. Post ID or post object. Defaults to global $post. 107 * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to 108 * a WP_Post object, an associative array, or a numeric array, respectively. Default OBJECT. 109 * @param string $filter Optional. Type of filter to apply. Accepts 'raw', 'edit', 'db', 110 * or 'display'. Default 'raw'. 111 * 112 * @return WP_Post 113 * @since 2018.26 114 * @verified 2020.04.09 115 */ 116 function get_ereminder( $reminder_id, $output = OBJECT, $filter = 'raw' ) { 117 $r = null; 118 119 120 if ( ! ( $reminder_id = $this->_get_post_id( $reminder_id ) ) ) 121 return $r; 122 123 124 if ( $this->_reminder_exists( $reminder_id ) ) 125 return $this->_get_existing_reminder( $reminder_id ); 126 127 128 if ( 129 ( $post = get_post( $reminder_id, $output, $filter ) ) && 130 lct_check_post_type_match( $post, $this->post_type ) 131 ) { 132 $r = $post; 133 $r->postmeta = lct_get_all_post_meta( $reminder_id, false, [ 'strpos_0' => [ 'pyre' ] ] ); 134 } 135 136 137 return $this->_update_reminder( $r ); 138 } 139 140 141 /** 142 * Update our list of reminders 143 * 144 * @param WP_Post $post 145 * 146 * @return WP_Post 147 * @since 2020.7 148 * @verified 2020.04.09 149 */ 150 function _update_reminder( $post ) { 151 if ( $reminder_id = $this->_get_post_id( $post ) ) 152 return $this->reminders[ $reminder_id ] = $post; 153 154 155 return null; 156 } 157 158 159 /** 160 * Check if a reminder has been retrieved yet 161 * 162 * @param int|WP_Post $reminder_id 163 * 164 * @return bool 165 * @since 2020.7 166 * @verified 2020.04.09 167 */ 168 function _reminder_exists( $reminder_id ) { 169 if ( 170 ( $reminder_id = $this->_get_post_id( $reminder_id ) ) && 171 isset( $this->reminders[ $reminder_id ] ) 172 ) { 173 return true; 174 } 175 176 177 return false; 178 } 179 180 181 /** 182 * Grab the object of a post that we have already retrieved 183 * 184 * @param int|WP_Post $reminder_id 185 * 186 * @return WP_Post 187 * @since 2020.7 188 * @verified 2020.04.09 189 */ 190 function _get_existing_reminder( $reminder_id ) { 191 if ( 192 ( $reminder_id = $this->_get_post_id( $reminder_id ) ) && 193 $this->_reminder_exists( $reminder_id ) 194 ) { 195 return $this->reminders[ $reminder_id ]; 196 } 197 198 199 return null; 200 } 201 202 203 /** 204 * Delete a reminder & everything attached to it 205 * 206 * @param int|WP_Post $reminder_id 207 * 208 * @return false|WP_Post|null 209 * @since 2020.7 210 * @verified 2020.04.09 211 */ 212 function delete_reminder( $reminder_id ) { 213 $reminder_id = $this->_get_post_id( $reminder_id ); 214 215 216 lct_delete_all_post_meta( $reminder_id ); 217 218 219 return wp_delete_post( $reminder_id, true ); 220 } 221 222 223 /** 224 * Get an array of a Reminder objects 225 * 226 * @param array $args 227 * 228 * @return WP_Post[] 16 229 * @since 7.3 17 * @verified 2018.02.21 18 */ 19 function get_ereminders( $date = '', $status = 'draft' ) { 20 global $wpdb; 21 22 if ( $date == '' ) 23 $date = current_time( 'mysql', 1 ); 24 25 if ( $status == 'sent' ) 26 $status = 'publish'; 27 elseif ( $status == 'scheduled' ) 28 $status = 'draft'; 29 30 31 $ereminders = $wpdb->get_results( 32 $wpdb->prepare( 33 "SELECT * 34 FROM {$wpdb->posts} 35 WHERE post_date_gmt < %s 36 AND post_type = %s 37 AND post_status = %s 38 ORDER BY post_date ASC", 39 $date, 40 get_cnst( 'reminder' ), 41 $status 42 ) 43 ); 44 45 46 return $ereminders; 47 } 48 49 50 /** 51 * Get a specific Ereminder 52 * 53 * @param $post_id 54 * @param string $status 55 * 56 * @return array|null|object 57 * @since 2018.26 58 * @verified 2018.03.05 59 */ 60 function get_ereminder( $post_id, $status = 'draft' ) { 61 global $wpdb; 62 63 if ( $status == 'sent' ) 64 $status = 'publish'; 65 elseif ( $status == 'scheduled' ) 66 $status = 'draft'; 67 68 69 $ereminder = $wpdb->get_results( 70 $wpdb->prepare( 71 "SELECT * 72 FROM {$wpdb->posts} 73 WHERE post_type = %s 74 AND post_status = %s 75 AND ID = %s", 76 get_cnst( 'reminder' ), 77 $status, 78 $post_id 79 ) 80 ); 81 82 83 if ( ! empty( $ereminder ) ) 84 $ereminder = $ereminder[0]; 85 86 87 return $ereminder; 230 * @verified 2020.04.09 231 */ 232 function get_ereminders( $args = [] ) { 233 $r = []; 234 235 236 /** 237 * Return early if cache is found 238 */ 239 $cache_key = lct_cache_key( compact( 'args' ) ); 240 if ( lct_isset_cache( $cache_key ) ) 241 return lct_get_cache( $cache_key ); 242 243 244 /** 245 * Full Post Array 246 */ 247 $postarr = [ 248 'posts_per_page' => - 1, 249 'post_type' => $this->post_type, 250 'post_status' => 'draft', 251 'cache_results' => true, 252 'update_post_meta_cache' => false, 253 'update_post_term_cache' => false, 254 'orderby' => 'post_date_gmt', 255 'order' => 'ASC', 256 ]; 257 $postarr = wp_parse_args( $args, $postarr ); 258 $posts = get_posts( $postarr ); 259 260 261 if ( 262 ! empty( $posts ) && 263 ! empty( $posts[0] ) && 264 empty( $postarr['fields'] ) 265 ) { 266 if ( lct_is_a( $posts[0], 'WP_Post' ) ) { 267 foreach ( $posts as $v ) { 268 $r[ $v->ID ] = $this->get_ereminder( $v->ID ); 269 } 270 } else { 271 foreach ( $posts as $v ) { 272 $r[ $v ] = $this->get_ereminder( $v ); 273 } 274 } 275 } else if ( ! empty( $posts ) ) { 276 $r = $posts; 277 } 278 279 280 /** 281 * Save the value to the cache 282 */ 283 lct_set_cache( $cache_key, $r ); 284 285 286 return $r; 88 287 } 89 288 … … 114 313 * 115 314 * @since 2018.26 116 * @verified 20 18.11.28315 * @verified 2020.04.15 117 316 */ 118 317 function send_ereminder( $post_id ) { … … 298 497 //delete reminder 299 498 if ( get_field( zxzacf( 'delete_email' ), $ereminder->ID, false ) ) { 300 wp_delete_post( $ereminder->ID, true);499 $this->delete_reminder( $ereminder->ID ); 301 500 302 501 … … 336 535 337 536 /** 537 * To was not set 538 */ 539 } else if ( empty( $mail['to'] ) ) { 540 //TODO: cs - Send an error - 4/15/2020 3:29 PM 541 542 543 /** 338 544 * Force cancel the reminder 339 545 */ 340 546 } else if ( ! empty( $mail['cancel'] ) ) { 341 wp_delete_post( $ereminder->ID, true);547 $this->delete_reminder( $ereminder->ID ); 342 548 } 343 549 } -
lct-useful-shortcodes-functions/trunk/available/email-reminder/includes/classes/PDER_Admin.php
r2061209 r2310439 40 40 * 41 41 * @since 7.3 42 * @verified 20 18.02.2142 * @verified 2020.05.14 43 43 */ 44 44 function create_menu() { … … 47 47 48 48 49 add_dashboard_page( $page_title, $menu_title, 'manage_options', zxzu( get_cnst( 'reminder' ) ), [ &$this, 'ereminder_page' ] );49 //add_dashboard_page( $page_title, $menu_title, 'manage_options', zxzu( get_cnst( 'reminder' ) ), [ &$this, 'ereminder_page' ] ); 50 50 add_menu_page( $page_title, $menu_title, 'manage_options', zxzu( get_cnst( 'reminder' ) ), [ &$this, 'ereminder_page' ], PDER_ASSETS . '/images/icon.png' ); 51 51 } … … 99 99 wp_verify_nonce( $_REQUEST['pder-delete-all-sent-nonce'], 'pder-delete-all-sent' ) 100 100 ) { 101 $this->delete_reminders_many( $_REQUEST , 'sent');101 $this->delete_reminders_many( $_REQUEST ); 102 102 } 103 103 } … … 381 381 * Delete all sent reminders 382 382 * 383 * @param $data 384 * @param string $status 383 * @param array $data 385 384 * 386 385 * @since 7.3 387 * @verified 20 18.02.21386 * @verified 2020.04.09 388 387 */ 389 function delete_reminders_many( 390 $data, 391 /** @noinspection PhpUnusedParameterInspection */ 392 $status = 'sent' 393 ) { 388 function delete_reminders_many( $data ) { 394 389 $pd = new PDER; 395 $ereminders = $pd->get_ereminders( current_time( 'mysql', 1 ), 'sent');390 $ereminders = $pd->get_ereminders( [ 'post_status' => 'publish' ] ); 396 391 $success = []; 397 392 $error = []; … … 404 399 } else { 405 400 foreach ( $ereminders as $ereminder ) { 406 if ( wp_delete_post( $ereminder->ID ) ) {401 if ( $pd->delete_reminder( $ereminder->ID ) ) 407 402 $success[] = sprintf( __( 'Reminder <strong>#%d</strong> deleted.', 'TD_LCT' ), $ereminder->ID ); 408 409 410 } else { 403 else 411 404 $error[] = sprintf( __( 'Error deleting reminder <strong>#%d</strong>.', 'TD_LCT' ), $ereminder->ID ); 412 }413 405 } 414 406 } 415 407 416 408 417 /** Return responses **/418 409 if ( isset( $data['ajax'] ) && $data['ajax'] == 'true' ) { 419 410 $response = [ … … 424 415 ] 425 416 ]; 417 418 426 419 echo json_encode( $response ); 427 420 exit; 428 429 430 421 } else { 431 422 $this->_messages = [ -
lct-useful-shortcodes-functions/trunk/code/__init.php
r2253752 r2310439 355 355 if ( ! defined( 'LCT_VALUE_EMPTY' ) ) 356 356 define( 'LCT_VALUE_EMPTY', '---empty---' ); 357 358 if ( ! defined( 'LCT_VALUE_UNSET' ) ) 359 define( 'LCT_VALUE_UNSET', '---not set yet---' ); 357 360 358 361 … … 507 510 lct_set_plugin( 'w3-total-cache/w3-total-cache.php', 'w3tc' ); //Last Check: Never 508 511 lct_set_plugin( 'woocommerce/woocommerce.php', 'wc' ); //Last Check: Never 512 lct_set_plugin( 'wp-mail-smtp/wp_mail_smtp.php', 'wp-mail-smtp' ); //Last Check: Never 509 513 lct_set_plugin( 'wp-rocket/wp-rocket.php', 'wp-rocket' ); //Last Check: Never 510 514 lct_set_plugin( 'wp-sweep/wp-sweep.php', 'wp-sweep' ); //Last Check: Never … … 1025 1029 lct_load_class( "{$dir}/_admin.php", 'admin', [ 'plugin' => $plugin ] ); 1026 1030 lct_load_class( "{$dir}/_shortcodes.php", 'shortcodes', [ 'plugin' => $plugin ] ); 1031 } 1032 1033 1034 /** 1035 * wp-mail-smtp 1036 */ 1037 $plugin = 'wp-mail-smtp'; 1038 $dir = "plugins/{$plugin}"; 1039 1040 if ( lct_plugin_active( $plugin ) ) { 1041 lct_load_class( "{$dir}/_admin.php", 'admin', [ 'plugin' => $plugin ] ); 1027 1042 } 1028 1043 -
lct-useful-shortcodes-functions/trunk/code/admin/_admin.php
r2147253 r2310439 88 88 89 89 add_action( 'add_post_metadata', [ $this, 'dont_save_pings' ], 10, 5 ); 90 91 add_filter( 'wp_mail', [ $this, 'force_send_to_on_sb' ] ); 90 92 91 93 … … 831 833 return $file_types; 832 834 } 835 836 837 /** 838 * Force all emails to be sent to the admin when you are on a sandbox 839 * 840 * @param array $atts 841 * 842 * @return array 843 * @since 2020.7 844 * @verified 2020.04.16 845 */ 846 function force_send_to_on_sb( $atts ) { 847 if ( 848 ! ( $admin_email = get_option( 'admin_email' ) ) || 849 ! lct_is_sb() 850 ) { 851 remove_filter( 'wp_mail', [ $this, 'force_send_to_on_sb' ] ); 852 853 854 return $atts; 855 } 856 857 858 $message_prefix = []; 859 860 861 if ( ! empty( $atts['to'] ) ) { 862 $message_prefix[] = 'To: ' . $atts['to']; 863 $atts['to'] = $admin_email; 864 865 866 if ( $tmp = lct_get_setting( 'force_send_to_on_sb_to' ) ) { 867 if ( is_array( $tmp ) ) 868 $tmp = implode( ',', $tmp ); 869 870 871 $atts['to'] = $tmp; 872 } 873 } 874 875 876 if ( ! empty( $atts['headers'] ) ) { 877 if ( ! is_array( $atts['headers'] ) ) { 878 // Explode the headers out, so this function can take 879 // both string headers and an array of headers. 880 $tmp_headers = explode( "\n", str_replace( "\r\n", "\n", $atts['headers'] ) ); 881 } else { 882 $tmp_headers = $atts['headers']; 883 } 884 885 886 // If it's actually got contents. 887 if ( ! empty( $tmp_headers ) ) { 888 // Iterate through the raw headers. 889 foreach ( (array) $tmp_headers as $key => $header ) { 890 if ( strpos( $header, ':' ) === false ) 891 continue; 892 893 894 // Explode them out. 895 [ $name, $content ] = explode( ':', trim( $header ), 2 ); 896 // Cleanup crew. 897 $name = strtolower( trim( $name ) ); 898 $content = trim( $content ); 899 900 901 switch ( $name ) { 902 case 'cc': 903 case 'bcc': 904 case 'reply-to': 905 $message_prefix[] = ucwords( $name ) . ': ' . $content; 906 unset( $tmp_headers[ $key ] ); 907 break; 908 909 910 default: 911 } 912 } 913 } 914 915 916 $atts['headers'] = implode( "\r\n", $tmp_headers ); 917 } 918 919 920 if ( ! empty( $message_prefix ) ) { 921 $atts['message'] = '<h3>Original Email Settings:</h3>' . implode( '<br />', $message_prefix ) . "\r\n" . $atts['message']; 922 } 923 924 925 return $atts; 926 } 833 927 } -
lct-useful-shortcodes-functions/trunk/code/admin/git/_lct_wp/.htaccess
r2238765 r2310439 1 # BEGIN WP Rocket v3. 4.41 # BEGIN WP Rocket v3.5.5.1 2 2 # Use UTF-8 encoding for anything served text/plain or text/html 3 3 AddDefaultCharset UTF-8 … … 19 19 <FilesMatch "\.(html|htm|rtf|rtx|txt|xsd|xsl|xml)$"> 20 20 <IfModule mod_headers.c> 21 Header set X-Powered-By "WP Rocket/3. 4.4"21 Header set X-Powered-By "WP Rocket/3.5.5.1" 22 22 Header unset Pragma 23 23 Header append Cache-Control "public" … … 143 143 ## _editzz Name: .htaccess 144 144 ## URI: 145 ## Version: 8. 2145 ## Version: 8.3 146 146 ## Author: Cary Smith 147 147 ## Author URI: … … 172 172 RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$ 173 173 RewriteCond %{HTTP_HOST} !\.eetah\.com?$ 174 RewriteRule ^(.*/)?(_pimg|_editzz|\.git|apps/_dev|apps/_prod|bower\.json|composer\.json|_p1\.php|_p2\.php|gulpfile\.js|package\.json )+ - [R=403,L]174 RewriteRule ^(.*/)?(_pimg|_editzz|\.git|apps/_dev|apps/_prod|bower\.json|composer\.json|_p1\.php|_p2\.php|gulpfile\.js|package\.json|apps/scratch1\.php|apps/scratch2\.php)+ - [R=403,L] 175 175 ## We use this IfModule for the WAMP server, I have no idea what mod_proxy_express.c is, but I know we won't ever need it on a production server. 176 176 <IfModule mod_proxy_express.c> -
lct-useful-shortcodes-functions/trunk/code/admin/lct.php
r2183253 r2310439 19 19 public $action = null; 20 20 public $api = null; 21 public $api_info = []; 21 public $api_info = [ 22 'full' => null, 23 'version' => null, 24 'route' => null, 25 'extended_route' => null, 26 ]; 22 27 public $special_action = null; 23 28 public $post = []; … … 143 148 * 144 149 * @since 2017.2 145 * @verified 20 19.05.02150 * @verified 2020.04.15 146 151 */ 147 152 function init() { … … 183 188 184 189 185 if ( $URI_parts[1])190 if ( isset( $URI_parts[1] ) ) 186 191 $this->api_info['version'] = $URI_parts[1]; 187 192 188 193 189 if ( $URI_parts[2])194 if ( isset( $URI_parts[2] ) ) 190 195 $this->api_info['route'] = $URI_parts[2]; 191 196 192 197 193 if ( $URI_parts[3])198 if ( isset( $URI_parts[3] ) ) 194 199 $this->api_info['extended_route'] = $URI_parts[3]; 195 200 -
lct-useful-shortcodes-functions/trunk/code/api/_helpers.php
r2263542 r2310439 2842 2842 * @return bool 2843 2843 * @since 2018.22 2844 * @verified 2020. 12.312844 * @verified 2020.04.09 2845 2845 */ 2846 2846 function lct_quick_send_email( $custom_args = [] ) { … … 2865 2865 $mail->set_subject( $args['subject'] ); 2866 2866 $mail->set_message( $args['message'] ); 2867 $mail->send(); 2868 2869 2870 return true; 2867 2868 2869 return $mail->send(); 2871 2870 } 2872 2871 … … 3351 3350 * Get a rel term_id of a post that has a rel 3352 3351 * 3353 * @param int $post_id3354 * @param string $default3352 * @param int|WP_Post $post_id 3353 * @param string $default 3355 3354 * 3356 3355 * @return int 3357 3356 * @since 2019.29 3358 * @verified 20 19.12.133357 * @verified 2020.04.10 3359 3358 */ 3360 3359 function lct_get_rel_tax_id( $post_id, $default = null ) { 3361 $r = $default; 3360 $r = $default; 3361 $post_id = lct_get_clean_post_id( $post_id ); 3362 3362 3363 3363 … … 3440 3440 return $v !== null; 3441 3441 } 3442 3443 3444 /** 3445 * Check if a post is the desired post_type 3446 * 3447 * @param WP_Post|int $post 3448 * @param string $post_type 3449 * 3450 * @return bool 3451 * @since 2020.7 3452 * @verified 2020.04.09 3453 */ 3454 function lct_check_post_type_match( $post, $post_type ) { 3455 $r = false; 3456 3457 3458 if ( 3459 ! lct_is_wp_error( $post ) && 3460 isset( $post->post_type ) && 3461 $post->post_type === $post_type 3462 ) { 3463 $r = true; 3464 } 3465 3466 3467 return $r; 3468 } -
lct-useful-shortcodes-functions/trunk/code/features/class/mail.php
r1644179 r2310439 6 6 7 7 /** 8 * @property array args 8 9 * @verified 2017.04.20 9 10 */ … … 23 24 * Start up the class 24 25 * 25 * @param $args26 * 27 * @verified 20 17.04.2026 * @param array $args 27 * 28 * @verified 2020.04.09 28 29 */ 29 30 function __construct( $args = [] ) { 30 31 //Store $args 31 32 $this->args = $args; 32 33 34 //Store parent class, maybe35 if ( $this->args['load_parent'] )36 $this->zxzp = lct();37 33 38 34 … … 259 255 function send() { 260 256 if ( $this->to ) 261 wp_mail( $this->get_to(), $this->get_subject(), $this->get_message(), $this->get_headers() ); 257 return wp_mail( $this->get_to(), $this->get_subject(), $this->get_message(), $this->get_headers() ); 258 259 260 return false; 262 261 } 263 262 } -
lct-useful-shortcodes-functions/trunk/code/plugins/Avada/api/overrides.php
r2263542 r2310439 476 476 * 477 477 * @since 2017.34 478 * @verified 20 18.03.22478 * @verified 2020.04.28 479 479 */ 480 480 function avada_main_menu( $flyout_menu = false ) { … … 499 499 avada_main_menu_v5( $flyout_menu ); 500 500 } 501 502 503 do_action( 'lct/avada_main_menu' ); 501 504 } 502 505 … … 541 544 542 545 $main_menu = wp_nav_menu( $main_menu_args ); 546 543 547 544 548 return $main_menu; … … 638 642 $main_menu = wp_nav_menu( $main_menu_args ); 639 643 644 640 645 return $main_menu; 641 646 … … 753 758 $main_menu .= wp_nav_menu( $sticky_menu_args ); 754 759 } 760 755 761 756 762 return $main_menu; -
lct-useful-shortcodes-functions/trunk/code/plugins/acf/api/form.php
r2253752 r2310439 65 65 * @return bool|string 66 66 * @since 7.49 67 * @verified 2020.0 2.1267 * @verified 2020.04.16 68 68 */ 69 69 function lct_acf_form2( $a ) { … … 215 215 */ 216 216 if ( $a['form_class'] ) { 217 $a['form_attributes']['class'] = $a['form_class'];217 $a['form_attributes']['class'] = 'acf-form ' . $a['form_class']; 218 218 219 219 … … 1379 1379 * @return mixed 1380 1380 * @since 2017.84 1381 * @verified 2020. 12.301381 * @verified 2020.04.16 1382 1382 */ 1383 1383 function lct_acf_format_value_user( $value, $return_format = 'value' ) { … … 1398 1398 $user_ids[] = (int) $value['ID']; 1399 1399 break; 1400 } else if ( ! empty( $user->ID ) ) { 1401 $user_ids[] = (int) $user->ID; 1400 1402 } else if ( ! empty( $user['ID'] ) ) { 1401 1403 $user_ids[] = (int) $user['ID']; -
lct-useful-shortcodes-functions/trunk/code/plugins/acf/instant_save.php
r2253752 r2310439 132 132 * 133 133 * @since 0.0 134 * @verified 2020.0 2.12134 * @verified 2020.05.20 135 135 */ 136 136 function ajax_handler() { … … 192 192 $this->vars[ $this->meta->field_key ] = str_replace( [ 'acf-', '-input' ], '', $this->vars[ $this->meta->field_key ] ); 193 193 $field = get_field_object( $this->vars[ $this->meta->field_key ], $this->vars['post_id'], false, false ); 194 $current_db_value = get_metadata( $this->vars['info_type'], $this->vars['post_id'], $field['_name'] ); 194 195 $parent_obj = null; 195 196 $parent_repeater = null; … … 205 206 if ( 206 207 $this->vars[ $this->meta->value_old ] === null && 208 isset( $current_db_value[0] ) && 207 209 ( $value_old = lct_acf_get_old_field_value( $this->vars[ $this->meta->field_key ], $this->vars['post_id'], false ) ) !== false 208 210 ) { 209 211 $this->vars[ $this->meta->value_old ] = $value_old; 212 } else if ( ! isset( $current_db_value[0] ) ) { 213 $this->vars[ $this->meta->value_old ] = LCT_VALUE_UNSET; 210 214 } 211 215 … … 375 379 * @return bool|false|int 376 380 * @since 0.0 377 * @verified 20 19.04.08381 * @verified 2020.05.20 378 382 */ 379 383 function add_comment( $vars ) { … … 383 387 $vars['info_type'] !== 'post' || //don't complete if it is NOT a post field 384 388 lct_is_new_save_post( $vars['post_id'] ) || //don't complete if it is a new post 385 ! $vars[ $this->meta->field_key ] //don't complete if we don't have a field key 389 ! $vars[ $this->meta->field_key ] || //don't complete if we don't have a field key 390 ( 391 ! empty( $vars['post_id'] ) && //don't complete if we want to exclude pages and this is a page 392 lct_acf_get_option_raw( 'audit_save_postmeta_exclude_pages' ) && 393 get_post_type( $vars['post_id'] ) === 'page' 394 ) || 395 ( 396 ! empty( $vars['post_id'] ) && //don't complete if we want to exclude pages and this is a page 397 ( $post_type = get_post_type( $vars['post_id'] ) ) && 398 in_array( $post_type, [ 'nav_menu_item', 'attachment' ] ) 399 ) 386 400 ) { 387 401 return false; … … 390 404 391 405 $current_user = wp_get_current_user(); 406 $current_field = get_field_object( $vars[ $this->meta->field_key ], $vars['post_id'], false, false ); 392 407 $comment_content = ''; 393 408 … … 398 413 399 414 if ( 400 ( $current_field = get_field_object( $vars[ $this->meta->field_key ], $vars['post_id'], false, false ) )&&415 $current_field && 401 416 in_array( $current_field['_name'], $audit_exclude ) 402 417 ) { … … 406 421 407 422 408 if ( ! $vars[ $this->meta->value ] ) 409 $vars[ $this->meta->value ] = LCT_VALUE_EMPTY; 410 411 if ( ! $vars[ $this->meta->value_old ] ) 412 $vars[ $this->meta->value_old ] = LCT_VALUE_EMPTY; 423 if ( ! $vars[ $this->meta->value ] ) { 424 if ( 425 ! in_array( $current_field['type'], [ 'radio', 'true_false' ] ) || 426 ( 427 $vars[ $this->meta->value ] !== 0 && 428 $vars[ $this->meta->value ] !== '0' 429 ) 430 ) { 431 $vars[ $this->meta->value ] = LCT_VALUE_EMPTY; 432 } 433 } 434 435 if ( ! $vars[ $this->meta->value_old ] ) { 436 if ( 437 ! in_array( $current_field['type'], [ 'radio', 'true_false' ] ) || 438 ( 439 $vars[ $this->meta->value_old ] !== 0 && 440 $vars[ $this->meta->value_old ] !== '0' 441 ) 442 ) { 443 $vars[ $this->meta->value_old ] = LCT_VALUE_EMPTY; 444 } 445 } 413 446 414 447 … … 464 497 * @return mixed 465 498 * @since 0.0 466 * @verified 20 19.05.02499 * @verified 2020.05.20 467 500 */ 468 501 function non_ajax_add_comment( $value, $post_id, $field ) { … … 478 511 $vars[ $this->meta->value ] = $value; 479 512 $vars[ $this->meta->audit_type ] = 'acf_update_field'; 513 $current_db_value = get_metadata( $this->vars['info_type'], $this->vars['post_id'], $field['_name'] ); 480 514 481 515 … … 497 531 498 532 if ( 499 lct_doing() || //don't complete through ajax 533 ( 534 lct_doing() && //don't complete through ajax 535 isset( $vars['action'] ) && 536 $vars['action'] === zxzu( 'acf_instant_save' ) 537 ) || 500 538 empty( $vars['info_id'] ) || //don't complete if there is not a post_id field 501 539 $vars['info_type'] !== 'post' || //don't complete if it is NOT a post field … … 504 542 $field['type'] === 'repeater' //don't complete if it is repeater field 505 543 ) { 544 lct_undid(); 545 546 506 547 return $value; 507 548 } … … 510 551 if ( 511 552 $vars[ $this->meta->value_old ] === null && 553 isset( $current_db_value[0] ) && 512 554 ( $value_old = lct_acf_get_old_field_value( $vars[ $this->meta->field_key ], $vars['post_id'], false ) ) !== false 513 555 ) { … … 527 569 $vars[ $this->meta->value_old ] = get_field( $field['name'], $vars['post_id'], false ); 528 570 } 571 } else if ( ! isset( $current_db_value[0] ) ) { 572 $vars[ $this->meta->value_old ] = LCT_VALUE_UNSET; 529 573 } 530 574 -
lct-useful-shortcodes-functions/trunk/code/plugins/acf/op_main_fixes_cleanups.php
r2183253 r2310439 924 924 * 925 925 * @since 5.40 926 * @verified 20 19.07.11926 * @verified 2020.03.24 927 927 */ 928 928 function lct_cleanup_uploads() { … … 1035 1035 1036 1036 /** 1037 * Prepare the array for counting images 1038 */ 1039 foreach ( $this->post_info['image_sizes_managed'] as $k => $v ) { 1040 $this->post_info['image_sizes_managed'][ $k ] = [ 'label' => $v, 'count' => 0 ]; 1041 } 1042 1043 1044 /** 1037 1045 * Removed images if they are a disabled size 1038 1046 * Produce an error for images of disabled size that are still in use … … 1256 1264 * Check the other sizes 1257 1265 */ 1258 if ( 1259 ( 1260 $delete_all_sizes || 1261 ! $in_use 1262 ) && 1263 ! empty( $_att_meta['sizes'] ) 1264 ) { 1266 if ( ! empty( $_att_meta['sizes'] ) ) { 1265 1267 foreach ( $_att_meta['sizes'] as $size => $_att_sizes ) { 1266 $_image_info = image_get_intermediate_size( $att_id, $size ); 1267 1268 1269 /** 1270 * Something weird is wrong 1271 * check manually 1272 */ 1268 $this->post_info['image_sizes_managed'][ $size ]['count'] ++; 1269 1270 1273 1271 if ( 1274 empty( $_image_info ) || 1275 empty( $_att_sizes['file'] ) || 1276 empty( $_image_info['file'] ) || 1277 empty( $_image_info['path'] ) || 1278 $_image_info['file'] !== $_att_sizes['file'] 1272 $delete_all_sizes || 1273 ! $in_use 1279 1274 ) { 1280 $this->post_info['disabled_images_note'][ 'zwrong3_' . $att_id ] = sprintf( 'Something is wrong #3: %s %s (%s)', $att_id, $_att_sizes['file'], $size ); 1281 1282 1283 /** 1284 * Image is on the server 1285 */ 1286 } else if ( 1287 ! empty( $_att_sizes['file'] ) && 1288 ! empty( $_image_info['path'] ) && 1289 $_image_info['file'] === $_att_sizes['file'] && 1290 ( $_image_path = $uploads_path . $_image_info['path'] ) && 1291 file_exists( $_image_path ) 1292 ) { 1293 if ( $delete_all_sizes ) { 1294 @unlink( $_image_path ); 1295 1296 1297 unset( $att_meta[ $att_id ]['sizes'][ $size ] ); 1298 unset( $att_meta_update[ $att_id ] ); 1299 1300 1301 wp_update_attachment_metadata( $att_id, $att_meta[ $att_id ] ); 1302 } else if ( $exists = lct_get_posts_with_image( $att_id, $_att_sizes ) ) { 1303 $in_use = true; 1304 break; 1305 } else if ( $exists = lct_get_featured_image_posts_with_image( $att_id ) ) { 1306 $in_use = true; 1307 break; 1308 } else if ( $exists = lct_get_postmetas_with_image( $att_id, $_att_sizes ) ) { 1309 $in_use = true; 1310 break; 1311 } else if ( $exists = lct_get_termmetas_with_image( $att_id, $_att_sizes ) ) { 1312 $in_use = true; 1313 break; 1314 } else if ( $exists = lct_get_usermetas_with_image( $att_id, $_att_sizes ) ) { 1315 $in_use = true; 1316 break; 1317 } else if ( $exists = lct_get_options_with_image( $att_id, $_att_sizes ) ) { 1318 $in_use = true; 1319 break; 1320 } 1275 $_image_info = image_get_intermediate_size( $att_id, $size ); 1321 1276 1322 1277 1323 1278 /** 1324 1279 * Something weird is wrong 1280 * check manually 1325 1281 */ 1326 } else { 1327 $this->post_info['disabled_images_note'][ 'zwrong4_' . $att_id ] = sprintf( 'Something is wrong #4: %s %s (%s)', $att_id, $_att_sizes['file'], $size ); 1282 if ( 1283 empty( $_image_info ) || 1284 empty( $_att_sizes['file'] ) || 1285 empty( $_image_info['file'] ) || 1286 empty( $_image_info['path'] ) || 1287 $_image_info['file'] !== $_att_sizes['file'] 1288 ) { 1289 $this->post_info['disabled_images_note'][ 'zwrong3_' . $att_id ] = sprintf( 'Something is wrong #3: %s %s (%s)', $att_id, $_att_sizes['file'], $size ); 1290 1291 1292 /** 1293 * Image is on the server 1294 */ 1295 } else if ( 1296 ! empty( $_att_sizes['file'] ) && 1297 ! empty( $_image_info['path'] ) && 1298 $_image_info['file'] === $_att_sizes['file'] && 1299 ( $_image_path = $uploads_path . $_image_info['path'] ) && 1300 file_exists( $_image_path ) 1301 ) { 1302 if ( $delete_all_sizes ) { 1303 @unlink( $_image_path ); 1304 1305 1306 unset( $att_meta[ $att_id ]['sizes'][ $size ] ); 1307 unset( $att_meta_update[ $att_id ] ); 1308 1309 1310 wp_update_attachment_metadata( $att_id, $att_meta[ $att_id ] ); 1311 } else if ( $exists = lct_get_posts_with_image( $att_id, $_att_sizes ) ) { 1312 $in_use = true; 1313 break; 1314 } else if ( $exists = lct_get_featured_image_posts_with_image( $att_id ) ) { 1315 $in_use = true; 1316 break; 1317 } else if ( $exists = lct_get_postmetas_with_image( $att_id, $_att_sizes ) ) { 1318 $in_use = true; 1319 break; 1320 } else if ( $exists = lct_get_termmetas_with_image( $att_id, $_att_sizes ) ) { 1321 $in_use = true; 1322 break; 1323 } else if ( $exists = lct_get_usermetas_with_image( $att_id, $_att_sizes ) ) { 1324 $in_use = true; 1325 break; 1326 } else if ( $exists = lct_get_options_with_image( $att_id, $_att_sizes ) ) { 1327 $in_use = true; 1328 break; 1329 } 1330 1331 1332 /** 1333 * Something weird is wrong 1334 */ 1335 } else { 1336 $this->post_info['disabled_images_note'][ 'zwrong4_' . $att_id ] = sprintf( 'Something is wrong #4: %s %s (%s)', $att_id, $_att_sizes['file'], $size ); 1337 } 1328 1338 } 1329 1339 } … … 1583 1593 echo '<h2 style="margin-bottom: 0;text-decoration: underline;">Managed image sizes</h2>'; 1584 1594 echo '<p style="margin-top: 0;">'; 1585 foreach ( $this->post_info['image_sizes_managed'] as $k => $ v) {1586 echo $k . ' :: ' . $ v . '<br />';1595 foreach ( $this->post_info['image_sizes_managed'] as $k => $info ) { 1596 echo $k . ' :: ' . $info['label'] . ' [' . $info['count'] . ']<br />'; 1587 1597 } 1588 1598 echo '</p>'; … … 2858 2868 * 2859 2869 * @since 5.40 2860 * @verified 20 19.07.302870 * @verified 2020.04.24 2861 2871 */ 2862 2872 function cleanup_guid_link_cleanup( $post, $single = false ) { … … 3055 3065 ) { 3056 3066 if ( lct_taxonomy_exists_by_slug( $path_tmp[0] ) ) { 3057 $path_object = lct_get_taxonomy_by_path( "/{$path_tmp[1]}/" ); 3067 unset( $path_tmp[0] ); 3068 3069 $path_tmp = implode( '/', $path_tmp ); 3070 3071 $path_object = lct_get_taxonomy_by_path( "/{$path_tmp}/" ); 3058 3072 3059 3073 -
lct-useful-shortcodes-functions/trunk/code/plugins/acf/op_main_settings_groups.php
r2217093 r2310439 4496 4496 ], 4497 4497 [ 4498 'key' => 'field_57edd15b02a7e',4499 'label' => 'Save an LCT audit entry for postmeta edits',4500 'name' => 'lct:::audit_save_postmeta',4501 'type' => 'true_false',4502 'instructions' => '',4503 'required' => 0,4504 'conditional_logic' => 0,4505 'wrapper' => [4506 'width' => '',4507 'class' => '',4508 'id' => '',4509 ],4510 'default_value' => 0,4511 'message' => '',4512 'ui' => 1,4513 'ui_on_text' => 'Enable',4514 'ui_off_text' => 'Disable',4515 'lct_class_selector' => '',4516 'menu_order' => 3,4517 ],4518 [4519 'key' => 'field_577c2b26c1972',4520 'label' => 'Use Email Queue System',4521 'name' => 'lct:::enable_email-reminder',4522 'type' => 'true_false',4523 'instructions' => '',4524 'required' => 0,4525 'conditional_logic' => 0,4526 'wrapper' => [4527 'width' => '',4528 'class' => '',4529 'id' => '',4530 ],4531 'default_value' => 0,4532 'message' => '',4533 'ui' => 1,4534 'ui_on_text' => 'Enable',4535 'ui_off_text' => 'Disable',4536 'lct_class_selector' => '',4537 'menu_order' => 4,4538 ],4539 [4540 4498 'key' => 'field_58292f4be7b13', 4541 4499 'label' => 'Remove Meta Boxes for Taxonomies', … … 4562 4520 'lct_class_selector' => '', 4563 4521 'placeholder' => '', 4564 'menu_order' => 5,4522 'menu_order' => 3, 4565 4523 ], 4566 4524 [ … … 4590 4548 'lct_class_selector' => '', 4591 4549 'placeholder' => '', 4592 'menu_order' => 6,4550 'menu_order' => 4, 4593 4551 ], 4594 4552 [ … … 4615 4573 'ui' => 1, 4616 4574 'lct_class_selector' => '', 4617 'menu_order' => 7,4575 'menu_order' => 5, 4618 4576 ], 4619 4577 [ … … 4636 4594 'ui_off_text' => 'Disable', 4637 4595 'lct_class_selector' => '', 4638 'menu_order' => 8,4596 'menu_order' => 6, 4639 4597 ], 4640 4598 [ 4641 4599 'key' => 'field_59035e0dd7bf6', 4642 'label' => ' Pages, Posts, Post Types, Taxonomies, ACF Fields Etc.',4600 'label' => 'Content Restrictions', 4643 4601 'name' => '', 4644 4602 'type' => 'tab', … … 4653 4611 'placement' => 'top', 4654 4612 'endpoint' => 1, 4655 'menu_order' => 9,4613 'menu_order' => 7, 4656 4614 ], 4657 4615 [ … … 4674 4632 'ui_off_text' => 'Disable', 4675 4633 'lct_class_selector' => '', 4676 'menu_order' => 10,4634 'menu_order' => 8, 4677 4635 ], 4678 4636 [ … … 4697 4655 'lct_roles_n_caps' => '', 4698 4656 'lct_roles_n_caps_viewonly' => '', 4699 'menu_order' => 11,4657 'menu_order' => 9, 4700 4658 ], 4701 4659 [ … … 4718 4676 'ui_off_text' => 'Disable', 4719 4677 'lct_class_selector' => '', 4720 'menu_order' => 1 2,4678 'menu_order' => 10, 4721 4679 ], 4722 4680 [ … … 4739 4697 'ui_off_text' => 'Disable', 4740 4698 'lct_class_selector' => '', 4741 'menu_order' => 1 3,4699 'menu_order' => 11, 4742 4700 ], 4743 4701 [ … … 4774 4732 'lct_class_selector' => '', 4775 4733 'placeholder' => '', 4776 'menu_order' => 1 4,4734 'menu_order' => 12, 4777 4735 ], 4778 4736 [ … … 4795 4753 'ui_off_text' => 'Disable', 4796 4754 'lct_class_selector' => '', 4797 'menu_order' => 1 5,4755 'menu_order' => 13, 4798 4756 ], 4799 4757 [ … … 4830 4788 'lct_class_selector' => '', 4831 4789 'placeholder' => '', 4832 'menu_order' => 1 6,4790 'menu_order' => 14, 4833 4791 ], 4834 4792 [ … … 4851 4809 'ui_off_text' => 'Disable', 4852 4810 'lct_class_selector' => '', 4853 'menu_order' => 1 7,4811 'menu_order' => 15, 4854 4812 ], 4855 4813 [ … … 5107 5065 ], 5108 5066 ], 5109 'menu_order' => 1 8,5067 'menu_order' => 16, 5110 5068 ], 5111 5069 [ … … 5128 5086 'ui_off_text' => 'Disable', 5129 5087 'lct_class_selector' => '', 5130 'menu_order' => 1 9,5088 'menu_order' => 17, 5131 5089 ], 5132 5090 [ … … 5384 5342 ], 5385 5343 ], 5344 'menu_order' => 18, 5345 ], 5346 [ 5347 'key' => 'field_5ec55bb4d2850', 5348 'label' => 'Conditional Post Types', 5349 'name' => '', 5350 'type' => 'tab', 5351 'instructions' => '', 5352 'required' => 0, 5353 'conditional_logic' => 0, 5354 'wrapper' => [ 5355 'width' => '', 5356 'class' => 'hide_label', 5357 'id' => '', 5358 ], 5359 'placement' => 'top', 5360 'endpoint' => 0, 5361 'menu_order' => 19, 5362 ], 5363 [ 5364 'key' => 'field_577c2b26c1972', 5365 'label' => 'Use Email Queue System', 5366 'name' => 'lct:::enable_email-reminder', 5367 'type' => 'true_false', 5368 'instructions' => '', 5369 'required' => 0, 5370 'conditional_logic' => 0, 5371 'wrapper' => [ 5372 'width' => '', 5373 'class' => '', 5374 'id' => '', 5375 ], 5376 'default_value' => 0, 5377 'message' => '', 5378 'ui' => 1, 5379 'ui_on_text' => 'Enable', 5380 'ui_off_text' => 'Disable', 5381 'lct_class_selector' => '', 5386 5382 'menu_order' => 20, 5387 5383 ], … … 5574 5570 'lct_class_selector' => '', 5575 5571 'menu_order' => 27, 5572 ], 5573 [ 5574 'key' => 'field_5ec55bfad2851', 5575 'label' => 'Audit Logging', 5576 'name' => '', 5577 'type' => 'tab', 5578 'instructions' => '', 5579 'required' => 0, 5580 'conditional_logic' => 0, 5581 'wrapper' => [ 5582 'width' => '', 5583 'class' => 'hide_label', 5584 'id' => '', 5585 ], 5586 'placement' => 'top', 5587 'endpoint' => 0, 5588 'menu_order' => 28, 5589 ], 5590 [ 5591 'key' => 'field_57edd15b02a7e', 5592 'label' => 'Logging for Postmeta Edits', 5593 'name' => 'lct:::audit_save_postmeta', 5594 'type' => 'true_false', 5595 'instructions' => '', 5596 'required' => 0, 5597 'conditional_logic' => 0, 5598 'wrapper' => [ 5599 'width' => '', 5600 'class' => '', 5601 'id' => '', 5602 ], 5603 'message' => '', 5604 'default_value' => 0, 5605 'ui' => 1, 5606 'ui_on_text' => 'Enable', 5607 'ui_off_text' => 'Disable', 5608 'lct_class_selector' => '', 5609 'menu_order' => 29, 5610 ], 5611 [ 5612 'key' => 'field_5ec55cfb5f9a9', 5613 'label' => 'Exclude Pages From Logging', 5614 'name' => 'lct:::audit_save_postmeta_exclude_pages', 5615 'type' => 'true_false', 5616 'instructions' => '', 5617 'required' => 0, 5618 'conditional_logic' => [ 5619 [ 5620 [ 5621 'field' => 'field_57edd15b02a7e', 5622 'operator' => '==', 5623 'value' => '1', 5624 ], 5625 ], 5626 ], 5627 'wrapper' => [ 5628 'width' => '', 5629 'class' => '', 5630 'id' => '', 5631 ], 5632 'message' => '', 5633 'default_value' => 0, 5634 'ui' => 1, 5635 'ui_on_text' => 'Exclude', 5636 'ui_off_text' => 'Include', 5637 'lct_class_selector' => '', 5638 'menu_order' => 30, 5576 5639 ], 5577 5640 [ … … 5590 5653 'placement' => 'top', 5591 5654 'endpoint' => 0, 5592 'menu_order' => 28,5655 'menu_order' => 31, 5593 5656 ], 5594 5657 [ … … 5611 5674 'ui_off_text' => 'Off', 5612 5675 'lct_class_selector' => '', 5613 'menu_order' => 29,5676 'menu_order' => 32, 5614 5677 ], 5615 5678 [ … … 5634 5697 'ui_off_text' => 'Unlock', 5635 5698 'lct_class_selector' => '', 5636 'menu_order' => 3 0,5699 'menu_order' => 33, 5637 5700 ], 5638 5701 [ … … 5663 5726 'multiple' => 1, 5664 5727 'return_format' => 'array', 5665 'menu_order' => 3 1,5728 'menu_order' => 34, 5666 5729 ], 5667 5730 [ … … 5688 5751 'display_format' => 'g:i a', 5689 5752 'return_format' => 'g:i a', 5690 'menu_order' => 3 2,5753 'menu_order' => 35, 5691 5754 ], 5692 5755 [ … … 5709 5772 'ui_off_text' => '', 5710 5773 'lct_class_selector' => '', 5711 'menu_order' => 3 3,5774 'menu_order' => 36, 5712 5775 ], 5713 5776 [ … … 5738 5801 'maxlength' => '', 5739 5802 'lct_class_selector' => '', 5740 'menu_order' => 3 4,5803 'menu_order' => 37, 5741 5804 ], 5742 5805 [ … … 5759 5822 'ui_off_text' => '', 5760 5823 'lct_class_selector' => '', 5761 'menu_order' => 3 5,5824 'menu_order' => 38, 5762 5825 ], 5763 5826 [ … … 5788 5851 'maxlength' => '', 5789 5852 'lct_class_selector' => '', 5790 'menu_order' => 3 6,5853 'menu_order' => 39, 5791 5854 ], 5792 5855 [ … … 5809 5872 'ui_off_text' => 'Disable', 5810 5873 'lct_class_selector' => '', 5811 'menu_order' => 37,5874 'menu_order' => 40, 5812 5875 ], 5813 5876 [ … … 5832 5895 'lct_roles_n_caps' => '', 5833 5896 'lct_roles_n_caps_viewonly' => '', 5834 'menu_order' => 38,5897 'menu_order' => 41, 5835 5898 ], 5836 5899 [ … … 5896 5959 ], 5897 5960 ], 5898 'menu_order' => 39,5961 'menu_order' => 42, 5899 5962 ], 5900 5963 [ … … 5913 5976 'placement' => 'top', 5914 5977 'endpoint' => 0, 5915 'menu_order' => 4 0,5978 'menu_order' => 43, 5916 5979 ], 5917 5980 [ … … 6033 6096 ], 6034 6097 ], 6035 'menu_order' => 4 1,6098 'menu_order' => 44, 6036 6099 ], 6037 6100 [ … … 6050 6113 'placement' => 'top', 6051 6114 'endpoint' => 0, 6052 'menu_order' => 4 2,6115 'menu_order' => 45, 6053 6116 ], 6054 6117 [ … … 6071 6134 'ui_off_text' => '', 6072 6135 'lct_class_selector' => '', 6073 'menu_order' => 4 3,6136 'menu_order' => 46, 6074 6137 ], 6075 6138 [ … … 6100 6163 'maxlength' => '', 6101 6164 'lct_class_selector' => '', 6102 'menu_order' => 4 4,6165 'menu_order' => 47, 6103 6166 ], 6104 6167 [ … … 6129 6192 'maxlength' => '', 6130 6193 'lct_class_selector' => '', 6131 'menu_order' => 4 5,6194 'menu_order' => 48, 6132 6195 ], 6133 6196 [ … … 6164 6227 'lct_class_selector' => '', 6165 6228 'placeholder' => '', 6166 'menu_order' => 4 6,6229 'menu_order' => 49, 6167 6230 ], 6168 6231 ], -
lct-useful-shortcodes-functions/trunk/lct-useful-shortcodes-functions.php
r2263542 r2310439 2 2 * Plugin Name: LCT Useful Shortcodes & Functions 3 3 * Plugin URI: http://lookclassy.com/wordpress-plugins/useful-shortcodes-functions/ 4 * Version: 2020. 64 * Version: 2020.7 5 5 * Requires at least: 4.0 6 6 * Tested up to: 5.3.2 -
lct-useful-shortcodes-functions/trunk/readme.txt
r2263542 r2310439 2 2 Contributors: ircary, pimg 3 3 Donate link: http://lookclassy.com/ 4 Stable tag: 2020. 64 Stable tag: 2020.7 5 5 Requires at least: 4.0 6 6 Tested up to: 5.3.2 … … 29 29 30 30 == Changelog == 31 = 2020.7 = 32 - Avada v6.2.2 Ready 33 - WP v5.4.1 Ready 34 - WP Rocket v3.5.5.1 Ready 35 - CSS Tweaks 36 - Improved: PDER{} 37 - Improved: send_ereminder() 38 - Improved: delete_reminders_many() 39 - Added: add_filter( 'wp_mail', [ $this, 'force_send_to_on_sb' ] ); 40 - Improved: lct_mu{} 41 - Improved: lct_quick_send_email() 42 - Improved: lct_get_rel_tax_id() 43 - Added: lct_check_post_type_match() 44 - Improved: lct_features_class_mail{} 45 - Improved: lct_acf_form2() 46 - Improved: lct_acf_format_value_user() 47 - Improved: lct_acf_instant_save{}ajax_handler() 48 - Improved: add_comment() 49 - Improved: non_ajax_add_comment() 50 - Updated: lct_cleanup_uploads() 51 - Improved: cleanup_guid_link_cleanup() 52 - ACF Field Updates; for LCT Audit Settings 53 - Updated: avada_main_menu(); Added: do_action( 'lct/avada_main_menu' ); 54 - Added: lct_wp_mail_smtp_admin{} 55 - Added: add_filter( 'wp_mail_smtp_options_get', [ $this, 'disable_smtp_on_dev' ], 10, 3 ); 56 - Updated: create_menu(); removed dashboard link 57 31 58 = 2020.6 = 32 59 - Avada v6.2.1 Ready
Note: See TracChangeset
for help on using the changeset viewer.