Changeset 3209293
- Timestamp:
- 12/17/2024 03:15:35 PM (16 months ago)
- Location:
- author-box-for-divi
- Files:
-
- 10 edited
- 1 copied
-
tags/2.0.3 (copied) (copied from author-box-for-divi/trunk)
-
tags/2.0.3/css/author.css (modified) (3 diffs)
-
tags/2.0.3/index.php (modified) (2 diffs)
-
tags/2.0.3/readme.txt (modified) (1 diff)
-
tags/2.0.3/social-networks.php (modified) (1 diff)
-
tags/2.0.3/templates/settings.php (modified) (1 diff)
-
trunk/css/author.css (modified) (3 diffs)
-
trunk/index.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/social-networks.php (modified) (1 diff)
-
trunk/templates/settings.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
author-box-for-divi/tags/2.0.3/css/author.css
r3187348 r3209293 1 1 body:not(.et_pb_pagebuilder_layout) .abfd_et_pb_row, .et_pb_pagebuilder_layout .et_pb_column { 2 2 width: 100%; 3 } 4 5 .abfd-preview-area { 6 max-width: 1000px; 3 7 } 4 8 … … 16 20 17 21 .abfd-container { 18 width: 100%;22 width: auto; 19 23 padding: 20px; 20 24 background-color: #fff; … … 142 146 font-size: 14px; 143 147 } 148 149 /* Custom SVG icons */ 150 .fa-svg { 151 background-color: currentColor; 152 width: 1em; 153 height: 1em; 154 } 155 156 .fa-theorg { 157 -webkit-mask: url('data:image/svg+xml;utf8,<svg id="Icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 604 604"><path class="cls-1" d="M473.24,248.95h-85.62c-23.64,0-42.82-19.2-42.82-42.81v-49.72h-85.62v49.72c0,23.61-19.17,42.81-42.82,42.81h-85.63c-23.64,0-42.81,19.15-42.81,42.81v128.46h85.62v-87.3h85.63v-83.97h85.62v83.97h85.63v87.3h85.63v-128.46c0-23.65-19.18-42.81-42.83-42.81Z"/></svg>') no-repeat center center; 158 mask: url('data:image/svg+xml;utf8,<svg id="Icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 604 604"><path class="cls-1" d="M473.24,248.95h-85.62c-23.64,0-42.82-19.2-42.82-42.81v-49.72h-85.62v49.72c0,23.61-19.17,42.81-42.82,42.81h-85.63c-23.64,0-42.81,19.15-42.81,42.81v128.46h85.62v-87.3h85.63v-83.97h85.62v83.97h85.63v87.3h85.63v-128.46c0-23.65-19.18-42.81-42.83-42.81Z"/></svg>') no-repeat center center; 159 background-color: currentColor; 160 } 161 -
author-box-for-divi/tags/2.0.3/index.php
r3187348 r3209293 4 4 Plugin URI: https://wordpress.org/plugins/author-box-for-divi/ 5 5 Description: A plugin which provides an author box for your WordPress blog. 6 Version: 2.0. 26 Version: 2.0.3 7 7 Text Domain: author-box-for-divi 8 8 Domain Path: /languages … … 65 65 66 66 load_plugin_textdomain('author-box-for-divi', false, dirname(plugin_basename(__FILE__)) . '/languages'); 67 68 // migrate old networks 69 $has_migrated = get_option('abfd-option-migrate-old-networks', false); 70 if (!$has_migrated) { 71 self::migrate_old_networks(); 72 update_option('abfd-option-migrate-old-networks', true); 73 } 74 } 75 76 static function migrate_old_networks() 77 { 78 global $wpdb; 79 $old_networks = array( 80 'facebook' => 'facebook-f', 81 'twitter' => 'x-twitter', 82 'linkedin' => 'linkedin-in', 83 'pinterest' => 'pinterest-p', 84 'vimeo' => 'vimeo-v' 85 ); 86 87 foreach ($old_networks as $old => $new) { 88 // Get all user IDs where the old network key exists and the new network key does not 89 $user_ids = $wpdb->get_col($wpdb->prepare( 90 "SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value != '' AND user_id NOT IN ( 91 SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s 92 )", 93 'abfd-user-social-networks-' . $old, 94 'abfd-user-social-networks-' . $new 95 )); 96 97 // update all keys old to new for all user_ids using a single query 98 $wpdb->query($wpdb->prepare( 99 "UPDATE $wpdb->usermeta SET meta_key = %s WHERE meta_key = %s AND user_id IN (" . implode(',', $user_ids) . ")", 100 'abfd-user-social-networks-' . $new, 101 'abfd-user-social-networks-' . $old 102 )); 103 } 67 104 } 68 105 -
author-box-for-divi/tags/2.0.3/readme.txt
r3187348 r3209293 75 75 76 76 == Changelog == 77 78 = 2.0.3 = 79 * Fixed a bug when migrating the data from v1* to v2 80 * Styling improvements 81 * Added theorg social network 82 * Improved shortcode instructions 77 83 78 84 = 2.0.2 = -
author-box-for-divi/tags/2.0.3/social-networks.php
r3160413 r3209293 49 49 'windows' => array('Windows', '#00BCF2', 'brands'), 50 50 'rss' => array('RSS', '#FFA500', 'solid'), 51 'theorg' => array('The Org', '#000', 'svg'), 51 52 ); -
author-box-for-divi/tags/2.0.3/templates/settings.php
r3160413 r3209293 23 23 </p> 24 24 <p> 25 <code>[author-box-wp-lens id="user id | username"]</code> 25 <code>[author-box-wp-lens]</code> - <?php _e('Display the author box for the current post author', 'author-box-for-divi'); ?> 26 </p> 27 <p> 28 <code>[author-box-wp-lens id="123"]</code> - <?php _e('Display the author box for the user with id 123', 'author-box-for-divi'); ?> 29 </p> 30 <p> 31 <code>[author-box-wp-lens id="john-doe"]</code> - <?php _e('Display the author box for the user with username "john-doe"', 'author-box-for-divi'); ?> 26 32 </p> 27 33 </div> -
author-box-for-divi/trunk/css/author.css
r3187348 r3209293 1 1 body:not(.et_pb_pagebuilder_layout) .abfd_et_pb_row, .et_pb_pagebuilder_layout .et_pb_column { 2 2 width: 100%; 3 } 4 5 .abfd-preview-area { 6 max-width: 1000px; 3 7 } 4 8 … … 16 20 17 21 .abfd-container { 18 width: 100%;22 width: auto; 19 23 padding: 20px; 20 24 background-color: #fff; … … 142 146 font-size: 14px; 143 147 } 148 149 /* Custom SVG icons */ 150 .fa-svg { 151 background-color: currentColor; 152 width: 1em; 153 height: 1em; 154 } 155 156 .fa-theorg { 157 -webkit-mask: url('data:image/svg+xml;utf8,<svg id="Icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 604 604"><path class="cls-1" d="M473.24,248.95h-85.62c-23.64,0-42.82-19.2-42.82-42.81v-49.72h-85.62v49.72c0,23.61-19.17,42.81-42.82,42.81h-85.63c-23.64,0-42.81,19.15-42.81,42.81v128.46h85.62v-87.3h85.63v-83.97h85.62v83.97h85.63v87.3h85.63v-128.46c0-23.65-19.18-42.81-42.83-42.81Z"/></svg>') no-repeat center center; 158 mask: url('data:image/svg+xml;utf8,<svg id="Icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 604 604"><path class="cls-1" d="M473.24,248.95h-85.62c-23.64,0-42.82-19.2-42.82-42.81v-49.72h-85.62v49.72c0,23.61-19.17,42.81-42.82,42.81h-85.63c-23.64,0-42.81,19.15-42.81,42.81v128.46h85.62v-87.3h85.63v-83.97h85.62v83.97h85.63v87.3h85.63v-128.46c0-23.65-19.18-42.81-42.83-42.81Z"/></svg>') no-repeat center center; 159 background-color: currentColor; 160 } 161 -
author-box-for-divi/trunk/index.php
r3187348 r3209293 4 4 Plugin URI: https://wordpress.org/plugins/author-box-for-divi/ 5 5 Description: A plugin which provides an author box for your WordPress blog. 6 Version: 2.0. 26 Version: 2.0.3 7 7 Text Domain: author-box-for-divi 8 8 Domain Path: /languages … … 65 65 66 66 load_plugin_textdomain('author-box-for-divi', false, dirname(plugin_basename(__FILE__)) . '/languages'); 67 68 // migrate old networks 69 $has_migrated = get_option('abfd-option-migrate-old-networks', false); 70 if (!$has_migrated) { 71 self::migrate_old_networks(); 72 update_option('abfd-option-migrate-old-networks', true); 73 } 74 } 75 76 static function migrate_old_networks() 77 { 78 global $wpdb; 79 $old_networks = array( 80 'facebook' => 'facebook-f', 81 'twitter' => 'x-twitter', 82 'linkedin' => 'linkedin-in', 83 'pinterest' => 'pinterest-p', 84 'vimeo' => 'vimeo-v' 85 ); 86 87 foreach ($old_networks as $old => $new) { 88 // Get all user IDs where the old network key exists and the new network key does not 89 $user_ids = $wpdb->get_col($wpdb->prepare( 90 "SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value != '' AND user_id NOT IN ( 91 SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s 92 )", 93 'abfd-user-social-networks-' . $old, 94 'abfd-user-social-networks-' . $new 95 )); 96 97 // update all keys old to new for all user_ids using a single query 98 $wpdb->query($wpdb->prepare( 99 "UPDATE $wpdb->usermeta SET meta_key = %s WHERE meta_key = %s AND user_id IN (" . implode(',', $user_ids) . ")", 100 'abfd-user-social-networks-' . $new, 101 'abfd-user-social-networks-' . $old 102 )); 103 } 67 104 } 68 105 -
author-box-for-divi/trunk/readme.txt
r3187348 r3209293 75 75 76 76 == Changelog == 77 78 = 2.0.3 = 79 * Fixed a bug when migrating the data from v1* to v2 80 * Styling improvements 81 * Added theorg social network 82 * Improved shortcode instructions 77 83 78 84 = 2.0.2 = -
author-box-for-divi/trunk/social-networks.php
r3160413 r3209293 49 49 'windows' => array('Windows', '#00BCF2', 'brands'), 50 50 'rss' => array('RSS', '#FFA500', 'solid'), 51 'theorg' => array('The Org', '#000', 'svg'), 51 52 ); -
author-box-for-divi/trunk/templates/settings.php
r3160413 r3209293 23 23 </p> 24 24 <p> 25 <code>[author-box-wp-lens id="user id | username"]</code> 25 <code>[author-box-wp-lens]</code> - <?php _e('Display the author box for the current post author', 'author-box-for-divi'); ?> 26 </p> 27 <p> 28 <code>[author-box-wp-lens id="123"]</code> - <?php _e('Display the author box for the user with id 123', 'author-box-for-divi'); ?> 29 </p> 30 <p> 31 <code>[author-box-wp-lens id="john-doe"]</code> - <?php _e('Display the author box for the user with username "john-doe"', 'author-box-for-divi'); ?> 26 32 </p> 27 33 </div>
Note: See TracChangeset
for help on using the changeset viewer.