Plugin Directory

Changeset 3325790


Ignore:
Timestamp:
07/10/2025 03:13:21 PM (7 months ago)
Author:
authorkit
Message:

Updated plugin to version 1.0.16: Add logging functionality and help page

Location:
author-kit/trunk
Files:
3 added
7 edited

Legend:

Unmodified
Added
Removed
  • author-kit/trunk/README.txt

    r3319388 r3325790  
    1 === Author Kit ===
     1=== Author Kit | Effortlessly Manage author profiles and add modern author bio boxes to posts ===
    22Contributors: @authorkit
    33Tags: author bio, author box, author profile, byline, multi-author
     
    55Tested up to: 6.8
    66Requires PHP: 7.4
    7 Stable tag: 1.0.15
     7Stable tag: 1.0.16
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    168168
    169169== Changelog ==
     170
     171= 1.0.16 - 2025-07-10 =
     172
     173* New: Added a help page so that user can read documentation and share their opinions and bugs with our team.
     174* New: Added a logging functionality in order to get log report to resolve issues.
     175
    170176= 1.0.15 = 
    171177Stable Release: 6, 22, 2025
  • author-kit/trunk/admin/assets/js/author-kit-settings.js

    r3315954 r3325790  
    11const { __, _x, _n, sprintf } = wp.i18n;
     2
     3// Help Page Script
     4document.addEventListener("DOMContentLoaded", function () {
     5
     6    document.getElementById('ak-help-form').addEventListener('submit', function (e) {
     7        e.preventDefault();
     8
     9        show_author_kit_toast("Sending an Email...", 'performing');
     10
     11        const form = document.getElementById('ak-help-form');
     12        const formData = new FormData(form);
     13
     14        formData.append('action', 'author_kit_help_email');
     15        formData.append('nonce', author_kit_settings_script_vars.nonce);
     16
     17        const submitButton = document.getElementById('ak-form-submit');
     18        submitButton.disabled = true;
     19        submitButton.textContent = "Sending...";
     20
     21        try {
     22            fetch(author_kit_settings_script_vars.ajax_url, {
     23                method: "POST",
     24                body: (formData),
     25            })
     26                .then((response) => response.json())
     27                .then((data) => {
     28                    if (data.success) {
     29                        show_author_kit_toast(data.data.message, 'success');
     30
     31                        setTimeout(function () {
     32                            document.getElementById('ak-help-form').reset();
     33                        }, 3000);
     34
     35
     36                    } else {
     37                        show_author_kit_toast(data.data.message, 'error');
     38                    }
     39                })
     40                .catch((error) => show_author_kit_toast(__("Error Occurred in Request", "author-kit"), 'error'));
     41
     42        } finally {
     43            submitButton.disabled = false;
     44            submitButton.textContent = "🚀 Submit Support Request";
     45        }
     46    });
     47
     48});
     49
     50
    251
    352// General Settings page Script
  • author-kit/trunk/admin/class-author-kit-admin.php

    r3315954 r3325790  
    6262        require_once AUTHOR_KIT_PLUGIN_PATH . 'includes/core/class-author-kit-profile-table.php';
    6363        require_once AUTHOR_KIT_PLUGIN_PATH . 'includes/core/class-author-kit-user-functionality.php';
     64        require_once AUTHOR_KIT_PLUGIN_PATH . 'includes/core/class-author-kit-help-email.php';
    6465        require_once AUTHOR_KIT_PLUGIN_PATH . 'includes/core/class-author-kit-load-kirki-pro.php';
    6566
  • author-kit/trunk/admin/views/author-kit-settings.php

    r3315954 r3325790  
    1818        <div class="nav-tabs">
    1919            <button class="nav-link" data-tab="general-settings"><?php esc_html_e( 'General Settings', 'author-kit' ); ?></button>   
    20    
     20            <button class="nav-link" data-tab="help-page"><?php esc_html_e( 'Help & Support', 'author-kit' ); ?></button>
     21
    2122            <span class="underline"></span>
    2223        </div>
     
    2728            <?php require AUTHOR_KIT_PLUGIN_PATH . 'admin/views/sub-settings/general-settings.php'; ?>
    2829        </div>
     30        <div id="help-page" class="content">
     31            <?php require AUTHOR_KIT_PLUGIN_PATH . 'admin/views/sub-settings/help.php'; ?>
     32        </div>
    2933    </div>
  • author-kit/trunk/author-kit.php

    r3319240 r3325790  
    99 * Plugin Name:       Author Kit
    1010 * Description:       Author Kit is a powerful, user-friendly WordPress plugin designed to simplify author management and enhance the user experience for multi-author websites. Perfect for blogs, magazines, and collaborative platforms, Author Kit empowers administrators and authors alike with its advanced features:
    11  * Version:           1.0.15
     11 * Version:           1.0.16
    1212 * Author:            Author Kit Team
    1313 * License:           GPL-2.0+
     
    2727 * Rename this for your plugin and update it as you release new versions.
    2828 */
    29 define( 'AUTHOR_KIT_VERSION', '1.0.15' );
     29define( 'AUTHOR_KIT_VERSION', '1.0.16' );
    3030define( 'AUTHOR_KIT_DB_VERSION', '1.0.0' );
    3131define( 'AUTHOR_KIT_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
  • author-kit/trunk/includes/class-author-kit.php

    r3315954 r3325790  
    120120
    121121        $this->loader = new Author_Kit_Loader();
     122
     123        /**
     124         * The class responsible for storing the log data of this plugin only.
     125         */
     126        require_once AUTHOR_KIT_PLUGIN_PATH . 'includes/class/class-author-kit-logger.php';
    122127    }
    123128
  • author-kit/trunk/includes/core/functions.php

    r3319237 r3325790  
    5858);
    5959
    60 
    61 
     60// Handles Post request for downloading of log file.
     61add_action(
     62    'admin_post_author_kit_download_log',
     63    function () {
     64        // Security check.
     65        if ( ! current_user_can( 'manage_options' ) || ! check_admin_referer( 'author_kit_download_log' ) ) {
     66            wp_die( 'Unauthorized', 403 );
     67        }
     68
     69        Author_Kit_Logger::download_log_file();
     70    }
     71);
     72
     73// Handles Post request for downloading of system report file.
     74add_action(
     75    'admin_post_author_kit_download_sys_report',
     76    function () {
     77        // Security check.
     78        if ( ! current_user_can( 'manage_options' ) || ! check_admin_referer( 'author_kit_download_sys_report' ) ) {
     79            wp_die( 'Unauthorized access', 403 );
     80        }
     81
     82        Author_Kit_Logger::download_system_report();
     83    }
     84);
    6285
    6386
     
    546569    foreach ( $raw_user_links as $platform_slug => $url ) {
    547570        if ( ! is_string( $url ) || empty( $url ) ) {
    548             //continue;
     571            // continue;
    549572        }
    550573
     
    857880 * @hook init
    858881 */
    859 add_action( 'init', function () {
    860     $normalized_theme   = ucwords( strtolower( wp_get_theme()->get( 'Name' ) ) );
    861     $last_checked_theme = get_option( 'author_kit_last_checked_theme' );
    862 
    863     if ( $last_checked_theme !== $normalized_theme ) {
    864         author_kit_update_compatibility_status();
    865     }
    866 }, 20 );
     882add_action(
     883    'init',
     884    function () {
     885        $normalized_theme   = ucwords( strtolower( wp_get_theme()->get( 'Name' ) ) );
     886        $last_checked_theme = get_option( 'author_kit_last_checked_theme' );
     887
     888        if ( $last_checked_theme !== $normalized_theme ) {
     889            author_kit_update_compatibility_status();
     890        }
     891    },
     892    20
     893);
    867894
    868895
     
    940967        }
    941968
    942     // Case: Kirki is active but version is outdated
     969        // Case: Kirki is active but version is outdated
    943970    } elseif ( version_compare( $kirki_version, $required_version, '<' ) ) {
    944971        printf(
     
    965992    $kirki_plugin     = 'kirki/kirki.php';
    966993    $required_version = '5.0.0';
    967 
    968 
    969994
    970995    $all_plugins        = get_plugins();
Note: See TracChangeset for help on using the changeset viewer.