Plugin Directory

Changeset 3209293


Ignore:
Timestamp:
12/17/2024 03:15:35 PM (16 months ago)
Author:
dbeja
Message:

Update to version 2.0.3 from GitHub

Location:
author-box-for-divi
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • author-box-for-divi/tags/2.0.3/css/author.css

    r3187348 r3209293  
    11body:not(.et_pb_pagebuilder_layout) .abfd_et_pb_row, .et_pb_pagebuilder_layout .et_pb_column {
    22    width: 100%;
     3}
     4
     5.abfd-preview-area {
     6    max-width: 1000px;
    37}
    48
     
    1620
    1721.abfd-container {
    18     width: 100%;
     22    width: auto;
    1923    padding: 20px;
    2024    background-color: #fff;
     
    142146    font-size: 14px;
    143147}
     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  
    44Plugin URI: https://wordpress.org/plugins/author-box-for-divi/
    55Description: A plugin which provides an author box for your WordPress blog.
    6 Version: 2.0.2
     6Version: 2.0.3
    77Text Domain: author-box-for-divi
    88Domain Path: /languages
     
    6565
    6666        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        }
    67104    }
    68105
  • author-box-for-divi/tags/2.0.3/readme.txt

    r3187348 r3209293  
    7575
    7676== 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
    7783
    7884= 2.0.2 =
  • author-box-for-divi/tags/2.0.3/social-networks.php

    r3160413 r3209293  
    4949    'windows' => array('Windows', '#00BCF2', 'brands'),
    5050    'rss' => array('RSS', '#FFA500', 'solid'),
     51    'theorg' => array('The Org', '#000', 'svg'),
    5152);
  • author-box-for-divi/tags/2.0.3/templates/settings.php

    r3160413 r3209293  
    2323        </p>
    2424        <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'); ?>
    2632        </p>
    2733    </div>
  • author-box-for-divi/trunk/css/author.css

    r3187348 r3209293  
    11body:not(.et_pb_pagebuilder_layout) .abfd_et_pb_row, .et_pb_pagebuilder_layout .et_pb_column {
    22    width: 100%;
     3}
     4
     5.abfd-preview-area {
     6    max-width: 1000px;
    37}
    48
     
    1620
    1721.abfd-container {
    18     width: 100%;
     22    width: auto;
    1923    padding: 20px;
    2024    background-color: #fff;
     
    142146    font-size: 14px;
    143147}
     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  
    44Plugin URI: https://wordpress.org/plugins/author-box-for-divi/
    55Description: A plugin which provides an author box for your WordPress blog.
    6 Version: 2.0.2
     6Version: 2.0.3
    77Text Domain: author-box-for-divi
    88Domain Path: /languages
     
    6565
    6666        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        }
    67104    }
    68105
  • author-box-for-divi/trunk/readme.txt

    r3187348 r3209293  
    7575
    7676== 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
    7783
    7884= 2.0.2 =
  • author-box-for-divi/trunk/social-networks.php

    r3160413 r3209293  
    4949    'windows' => array('Windows', '#00BCF2', 'brands'),
    5050    'rss' => array('RSS', '#FFA500', 'solid'),
     51    'theorg' => array('The Org', '#000', 'svg'),
    5152);
  • author-box-for-divi/trunk/templates/settings.php

    r3160413 r3209293  
    2323        </p>
    2424        <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'); ?>
    2632        </p>
    2733    </div>
Note: See TracChangeset for help on using the changeset viewer.