Changeset 2263542
- Timestamp:
- 03/19/2020 01:49:19 AM (6 years ago)
- Location:
- lct-useful-shortcodes-functions/trunk
- Files:
-
- 7 edited
-
assets/js/plugins/acf/front.min.js (modified) (1 diff)
-
code/admin/git/_lct_wp/_editzz-v8.2.txt (modified) (1 diff)
-
code/api/_helpers.php (modified) (6 diffs)
-
code/features/shortcodes/_shortcodes.php (modified) (3 diffs)
-
code/plugins/Avada/api/overrides.php (modified) (10 diffs)
-
lct-useful-shortcodes-functions.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lct-useful-shortcodes-functions/trunk/assets/js/plugins/acf/front.min.js
r2253752 r2263542 1 jQuery,"undefined"!=typeof acf&&acf.addAction("ready",function(){lct_acf_hooks()});var lct_acf_hooks=function(){"undefined"!=typeof acf&&(acf.addAction("remove",lct_remove_instant_repeater),acf.addFilter("prepare_for_ajax",lct_prepare_for_ajax))},lct_remove_instant_repeater=function(t){ var a=t.closest("form").serialize(),e=t.closest(".acf-field"),c=e.closest('form > .acf-fields > .acf-field[data-type="repeater"]').data("key"),_=e.data("key"),o=e.closest(".acf-row").data("id"),r=null;jQuery(t.closest(".acf-table").find("tr.acf-row:not(.acf-clone)")).each(function(){t[0].dataset.id===jQuery(this).data("id")&&(r=t[0].dataset.id)}),lct_acf_ajax("lct/acf/ajax/save_repeater_after_remove",{selector:c,affected_repeater:_,repeater_parent_row:o,skip:r,form:a})},lct_prepare_for_ajax=function(t){return"undefined"!=typeof lct_custom&&void 0!==lct_custom.acf_data&&(void 0!==t.form&&(t.post_id=lct_get_url_parameter("_acf_post_id",t.form)),t.lct_root_post_id=null,t.lct_acf_post_id=null,void 0!==lct_custom.acf_data.lct_root_post_id&&(t.lct_root_post_id=lct_custom.acf_data.lct_root_post_id),void 0!==lct_custom.acf_data.lct_acf_post_id&&(t.lct_acf_post_id=lct_custom.acf_data.lct_acf_post_id)),t};jQuery,"undefined"!=typeof acf&&acf.addAction("ready",function(){lct_acf_hooks()});var lct_acf_hooks=function(){"undefined"!=typeof acf&&(acf.addAction("remove",lct_remove_instant_repeater),acf.addFilter("prepare_for_ajax",lct_prepare_for_ajax))},lct_remove_instant_repeater=function(t){var a=t.closest("form").serialize(),e=t.closest(".acf-field"),c=e.closest('form > .acf-fields > .acf-field[data-type="repeater"]').data("key"),_=e.data("key"),o=e.closest(".acf-row").data("id"),r=null;jQuery(t.closest(".acf-table").find("tr.acf-row:not(.acf-clone)")).each(function(){t[0].dataset.id===jQuery(this).data("id")&&(r=t[0].dataset.id)}),lct_acf_ajax("lct/acf/ajax/save_repeater_after_remove",{selector:c,affected_repeater:_,repeater_parent_row:o,skip:r,form:a})},lct_prepare_for_ajax=function(t){return"undefined"!=typeof lct_custom&&void 0!==lct_custom.acf_data&&(void 0!==t.form&&(t.post_id=lct_get_url_parameter("_acf_post_id",t.form)),t.lct_root_post_id=null,t.lct_acf_post_id=null,void 0!==lct_custom.acf_data.lct_root_post_id&&(t.lct_root_post_id=lct_custom.acf_data.lct_root_post_id),void 0!==lct_custom.acf_data.lct_acf_post_id&&(t.lct_acf_post_id=lct_custom.acf_data.lct_acf_post_id)),t};1 jQuery,"undefined"!=typeof acf&&acf.addAction("ready",function(){lct_acf_hooks()});var lct_acf_hooks=function(){"undefined"!=typeof acf&&(acf.addAction("remove",lct_remove_instant_repeater),acf.addFilter("prepare_for_ajax",lct_prepare_for_ajax))},lct_remove_instant_repeater=function(t){if(!0===t.closest("form").hasClass("lct_instant")){var a=t.closest("form").serialize(),e=t.closest(".acf-field"),c=e.closest('form > .acf-fields > .acf-field[data-type="repeater"]').data("key"),_=e.data("key"),o=e.closest(".acf-row").data("id"),r=null;jQuery(t.closest(".acf-table").find("tr.acf-row:not(.acf-clone)")).each(function(){t[0].dataset.id===jQuery(this).data("id")&&(r=t[0].dataset.id)}),lct_acf_ajax("lct/acf/ajax/save_repeater_after_remove",{selector:c,affected_repeater:_,repeater_parent_row:o,skip:r,form:a})}},lct_prepare_for_ajax=function(t){return"undefined"!=typeof lct_custom&&void 0!==lct_custom.acf_data&&(void 0!==t.form&&(t.post_id=lct_get_url_parameter("_acf_post_id",t.form)),t.lct_root_post_id=null,t.lct_acf_post_id=null,void 0!==lct_custom.acf_data.lct_root_post_id&&(t.lct_root_post_id=lct_custom.acf_data.lct_root_post_id),void 0!==lct_custom.acf_data.lct_acf_post_id&&(t.lct_acf_post_id=lct_custom.acf_data.lct_acf_post_id)),t}; -
lct-useful-shortcodes-functions/trunk/code/admin/git/_lct_wp/_editzz-v8.2.txt
r2238765 r2263542 61 61 62 62 63 <!-- Avada v6. 1.2 || Last Checked: 2020.01.01-->63 <!-- Avada v6.2.1 || Last Checked: 2020.03.04 --> 64 64 NONE -
lct-useful-shortcodes-functions/trunk/code/api/_helpers.php
r2253752 r2263542 2787 2787 * @return mixed 2788 2788 * @since 2018.21 2789 * @verified 20 18.06.182789 * @verified 2020.03.05 2790 2790 */ 2791 2791 function lct_wpdb_prepare_in( $sql, $vals ) { … … 2801 2801 * Save step #2 placeholders for later 2802 2802 */ 2803 $sql = str_replace( [ '%s2', '%d2', '%f2' ], [ 'tmpzzszzhold', 'tmpzzdzzhold', 'tmpzzfzzhold', '%%' ], $sql );2803 $sql = str_replace( [ '%s2', '%d2', '%f2', '[IN2]' ], [ 'tmpzzszzhold', 'tmpzzdzzhold', 'tmpzzfzzhold', 'tmpzzINzzhold', '%%' ], $sql ); 2804 2804 2805 2805 … … 2827 2827 * Add the step #2 placeholders back in 2828 2828 */ 2829 $sql = str_replace( [ 'tmpzzszzhold', 'tmpzzdzzhold', 'tmpzzfzzhold', ], [ '%s', '%d', '%f' ], $sql );2829 $sql = str_replace( [ 'tmpzzszzhold', 'tmpzzdzzhold', 'tmpzzfzzhold', 'tmpzzINzzhold' ], [ '%s', '%d', '%f', '[IN]' ], $sql ); 2830 2830 } 2831 2831 … … 3174 3174 * 3175 3175 * @since 2019.29 3176 * @verified 2020.0 1.023176 * @verified 2020.03.05 3177 3177 */ 3178 3178 function lct_add_rel_term( $post_id, $taxonomy ) { … … 3193 3193 if ( $post_title !== $terms[0]->name ) 3194 3194 wp_update_term( $terms[0]->term_id, $taxonomy, [ 'name' => $post_title ] ); 3195 3196 3197 if ( ! ( $rel = get_field( lct_rel_post(), lct_t( $terms[0]->term_id, $taxonomy ) ) ) ) 3198 update_field( lct_rel_post(), $post_id, lct_t( $terms[0]->term_id, $taxonomy ) ); 3195 3199 3196 3200 … … 3364 3368 return $r; 3365 3369 } 3370 3371 3372 /** 3373 * Flatten a multidimensional array 3374 * 3375 * @param array $arr 3376 * @param bool $maintain_keys 3377 * @param array $r 3378 * @param int $level 3379 * @param int $curr_level 3380 * 3381 * @return array 3382 * @since 2020.6 3383 * @verified 2020.03.05 3384 */ 3385 function lct_array_flatten( $arr, $maintain_keys = false, $r = [], $level = 0, $curr_level = 0 ) { 3386 $curr_level ++; 3387 3388 3389 foreach ( $arr as $k => $v ) { 3390 if ( 3391 is_array( $arr[ $k ] ) && 3392 ( 3393 $level === 0 || 3394 $curr_level <= $level 3395 ) 3396 ) { 3397 $r = lct_array_flatten( $arr[ $k ], $maintain_keys, $r, $level, $curr_level ); 3398 } else if ( isset( $arr[ $k ] ) ) { 3399 if ( $maintain_keys ) 3400 $r[ $k ] = $arr[ $k ]; 3401 else 3402 $r[] = $arr[ $k ]; 3403 } 3404 } 3405 3406 3407 return $r; 3408 } 3409 3410 3411 /** 3412 * Flatten a multidimensional array and make it unique 3413 * 3414 * @param array $arr 3415 * @param bool $maintain_keys 3416 * 3417 * @return array 3418 * @since 2020.6 3419 * @verified 2020.03.04 3420 */ 3421 function lct_array_flatten_unique( $arr, $maintain_keys = false ) { 3422 if ( $arr = lct_array_flatten( $arr, $maintain_keys ) ) 3423 $arr = array_unique( $arr ); 3424 3425 3426 return $arr; 3427 } 3428 3429 3430 /** 3431 * Check if a value is not null 3432 * 3433 * @param mixed $v 3434 * 3435 * @return bool 3436 * @since 2020.6 3437 * @verified 2020.03.04 3438 */ 3439 function lct_is_not_null( $v ) { 3440 return $v !== null; 3441 } -
lct-useful-shortcodes-functions/trunk/code/features/shortcodes/_shortcodes.php
r2253752 r2263542 964 964 * @return string 965 965 * @since 2018.11 966 * @verified 20 18.06.11966 * @verified 2020.03.18 967 967 */ 968 968 function lazy_youtube( $a ) { … … 977 977 'title' => ' ', 978 978 'params' => 'feature=oembed&rel=0&controls=0&showinfo=0&modestbranding=1&enablejsapi=1&wmode=opaque', 979 'thumbnail' => '',979 'thumbnail' => null, 980 980 ], 981 981 $a … … 994 994 if ( strtolower( $a['title'] ) === 'true' ) 995 995 $a['title'] = ''; 996 997 /** 998 * thumbnail 999 */ 1000 if ( $a['thumbnail'] === null ) 1001 $a['thumbnail'] = sprintf( 'https://img.youtube.com/vi/%s/maxresdefault.jpg', $a['id'] ); 996 1002 997 1003 -
lct-useful-shortcodes-functions/trunk/code/plugins/Avada/api/overrides.php
r2238765 r2263542 38 38 * @return string 39 39 * @since 2019.25 40 * @verified 20 19.11.1440 * @verified 2020.03.04 41 41 */ 42 42 function lct_avada_template_version_router( $template ) { … … 65 65 case 6: 66 66 case 6.1: 67 case 6.2: 67 68 $piece = 'v3'; 68 69 break; … … 95 96 case 6: 96 97 case 6.1: 98 case 6.2: 97 99 $template = 'templates/header-1'; 98 100 $piece = 'v3'; … … 132 134 case 6: 133 135 case 6.1: 136 case 6.2: 134 137 $template = 'templates/header-1'; 135 138 $piece = 'v3'; … … 162 165 case 6: 163 166 case 6.1: 167 case 6.2: 164 168 $piece = 'v2'; 165 169 break; … … 189 193 case 6: 190 194 case 6.1: 195 case 6.2: 191 196 $piece = 'v2'; 192 197 break; … … 216 221 case 6: 217 222 case 6.1: 223 case 6.2: 218 224 $piece = 'v3'; 219 225 break; … … 239 245 case 6: 240 246 case 6.1: 247 case 6.2: 241 248 $piece = 'v2'; 242 249 break; … … 283 290 case 6: 284 291 case 6.1: 292 case 6.2: 285 293 $piece = 'v7'; 286 294 break; … … 317 325 case 6: 318 326 case 6.1: 327 case 6.2: 319 328 $piece = 'v4'; 320 329 break; -
lct-useful-shortcodes-functions/trunk/lct-useful-shortcodes-functions.php
r2253752 r2263542 2 2 * Plugin Name: LCT Useful Shortcodes & Functions 3 3 * Plugin URI: http://lookclassy.com/wordpress-plugins/useful-shortcodes-functions/ 4 * Version: 2020. 54 * Version: 2020.6 5 5 * Requires at least: 4.0 6 6 * Tested up to: 5.3.2 -
lct-useful-shortcodes-functions/trunk/readme.txt
r2253752 r2263542 2 2 Contributors: ircary, pimg 3 3 Donate link: http://lookclassy.com/ 4 Stable tag: 2020. 54 Stable tag: 2020.6 5 5 Requires at least: 4.0 6 6 Tested up to: 5.3.2 … … 29 29 30 30 == Changelog == 31 = 2020.6 = 32 - Avada v6.2.1 Ready 33 - JS Tweaks 34 - Improved: lct_wpdb_prepare_in() 35 - Improved: lct_add_rel_term() 36 - Added: lct_array_flatten() 37 - Added: lct_array_flatten_unique() 38 - Added: lct_is_not_null() 39 - Updated: lct_avada_template_version_router(); Avada v6.2.1 Ready 40 - Improved: [lct_lazy_youtube] 41 31 42 = 2020.5 = 32 43 - Improved: lct_get_field_post_id()
Note: See TracChangeset
for help on using the changeset viewer.