Plugin Directory

Changeset 3427415


Ignore:
Timestamp:
12/25/2025 05:52:46 PM (3 months ago)
Author:
themeplugs
Message:

release 1.0.7

Location:
authorsy
Files:
305 added
4 edited

Legend:

Unmodified
Added
Removed
  • authorsy/trunk/authorsy.php

    r3358941 r3427415  
    55 * Plugin URI:        https://themeplugs.com/
    66 * Description:       Author box and bio link for WordPress.
    7  * Version:           1.0.6
     7 * Version:           1.0.7
    88 * Requires at least: 5.2
    99 * Requires PHP:      7.3
     
    5454     */
    5555    public static function get_version() {
    56         return '1.0.6';
     56        return '1.0.7';
    5757    }
    5858
  • authorsy/trunk/core/authors/api-author.php

    r3082030 r3427415  
    4747                    'callback'            => [ $this, 'get_items' ],
    4848                    'permission_callback' => function () {
    49                         return true;
     49                        // Require administrator privileges to access sensitive author data
     50                        return current_user_can( 'manage_options' );
    5051                    },
    5152                ],
     
    8990                    'callback'            => [ $this, 'get_item' ],
    9091                    'permission_callback' => function () {
    91                         return true;
     92                        // Require administrator privileges to access sensitive author data
     93                        return current_user_can( 'manage_options' );
    9294                    },
    9395                ],
  • authorsy/trunk/core/authors/author.php

    r3039349 r3427415  
    249249     */
    250250    public function get_data() {
    251         return [
     251        $is_authenticated = is_user_logged_in();
     252       
     253        $data = [
    252254            'id'         => $this->get_id(),
    253255            'full_name'  => $this->get_full_name(),
    254256            'first_name' => $this->get_first_name(),
    255257            'last_name'  => $this->get_last_name(),
    256             'user_name'  => $this->get_user_name(),
    257             'user_email' => $this->get_email(),
    258             'phone'      => $this->get_phone(),
    259258            'image'      => $this->get_image(),
    260             'role'       => $this->get_user_role(),
    261259            'social'     => $this->get_social(),
    262260            'extra_bio'  => $this->get_extra_bio(),
     
    266264            'permalink'  => $this->get_permalink()
    267265        ];
    268     }
    269     /**
    270      * Get all data for a author
     266       
     267        // Only include sensitive fields for authenticated users
     268        if ( $is_authenticated ) {
     269            $data['user_name']  = $this->get_user_name();
     270            $data['user_email'] = $this->get_email();
     271            $data['phone']      = $this->get_phone();
     272            $data['role']       = $this->get_user_role();
     273        }
     274       
     275        return $data;
     276    }
     277    /**
     278     * Get all data for a author (frontend/public version)
    271279     *
    272280     * @return array
    273281     */
    274282    public function get_frontend_data() {
    275         return [
     283        $is_authenticated = is_user_logged_in();
     284       
     285        $data = [
    276286            'full_name'  => $this->get_full_name(),
    277287            'first_name' => $this->get_first_name(),
    278288            'last_name'  => $this->get_last_name(), 
    279             'phone'      => $this->get_phone(),
    280289            'image'      => $this->get_image(),
    281             'role'       => $this->get_user_role(),
    282290            'social'     => $this->get_social(),
    283291            'extra_bio'  => $this->get_extra_bio(),
     
    287295            'permalink'  => $this->get_permalink()
    288296        ];
     297       
     298        // Only include phone and role for authenticated users
     299        if ( $is_authenticated ) {
     300            $data['phone'] = $this->get_phone();
     301            $data['role']  = $this->get_user_role();
     302        }
     303       
     304        return $data;
    289305    }
    290306
  • authorsy/trunk/readme.txt

    r3358941 r3427415  
    11=== Authorsy – Author Box, Multiple Authors, Guest Authors & Post Rating ===
    2 Contributors: themeplugs, abrasel600
     2Contributors: themeplugs
    33Tags: author box, author profile, multiple authors, guest authors, author bio, post rating, co-authors, author widget
    44Requires at least: 5.2
    5 Tested up to: 6.8
    6 Stable tag: 1.0.6
     5Tested up to: 6.9
     6Stable tag: 1.0.7
    77Requires PHP: 7.3
    88License: GPLv2 or later
     
    6969
    7070### 🔄 Changelog
     71= 1.0.7 =
     72- Tweak: Security Performance improvement. 
     73- Tweak: WordPress 6.9 Compatibility
    7174
    7275= 1.0.6 =
Note: See TracChangeset for help on using the changeset viewer.