Plugin Directory

Changeset 3325722


Ignore:
Timestamp:
07/10/2025 01:38:31 PM (9 months ago)
Author:
edwenjohn
Message:

Version 1.0.1

Location:
member-mail-drop
Files:
190 added
4 edited

Legend:

Unmodified
Added
Removed
  • member-mail-drop/trunk/README.txt

    r3264106 r3325722  
    33Tags: mail, digitize, members, management
    44Requires at least: 4.9
    5 Tested up to: 6.7.2
     5Tested up to: 6.8.1
    66Stable tag: 1.0.0
    77License: GPLv2 or later
     
    44444. Activate the plugin through the 'Plugins' menu in WordPress.
    4545
     46
     47== Frequently Asked Questions ==
     48
     49= Can I rename or delete the Primary folder? =
     50Yes, but it is created as a default on activation to help you get started.
     51
     52= Where are the mail items stored? =
     53They are stored as custom post types linked to their folder pages.
     54
    4655== Changelog ==
    4756
     57= 1.0.1 =
     58* Automatically creates a "Primary" folder under the main Member Mail Drop page on plugin activation.
     59* "Primary" folder is now selected by default in the folder dropdown selector.
     60
    4861= 1.0.0 =
    49 * Initial release
     62* Initial plugin release.
     63* Created settings table and default pages.
     64* Added AJAX folder creation with `[mmd_list]` shortcode support.
    5065
    5166== Upgrade Notice ==
    5267
    53 = 1.0.0 =
    54 This is the initial release of Member Mail Drop.
     68= 1.0.1 =
     69Recommended update: Automatically creates and selects the “Primary” folder on activation and in the folder selector.
    5570
    5671== Additional Notes ==
  • member-mail-drop/trunk/core/class-member-mail-drop.php

    r3055888 r3325722  
    180180            self::mmdhg_create_settings_table();
    181181            self::mmdhg_create_mmd_mail_page();
     182
     183            // Get the main front page by path (used as parent)
     184            $main_front_page = get_page_by_path(self::$main_page, OBJECT, 'page');
     185
     186            if ($main_front_page) {
     187                // Check if "Primary" folder already exists under main page
     188                $existing_primary = get_page_by_title('Primary', OBJECT, 'page');
     189                if (!$existing_primary || $existing_primary->post_parent != $main_front_page->ID) {
     190                    // Create Primary folder as a child page
     191                    $folder_args = array(
     192                        'post_title'     => 'Primary',
     193                        'post_content'   => '[mmd_list]',
     194                        'post_type'      => 'page',
     195                        'post_status'    => 'publish',
     196                        'post_parent'    => $main_front_page->ID,
     197                    );
     198                    wp_insert_post($folder_args);
     199                }
     200            }
     201
    182202        }
    183203
  • member-mail-drop/trunk/core/includes/mmd-add-new-mail.php

    r3055888 r3325722  
    6464                                        <option value="select-folder"><?php esc_html_e( '-- Select Folder --', 'member-mail-drop' ); ?></option>
    6565                                        <?php
    66                                    
     66                                            $primary_page = get_page_by_title('Primary', OBJECT, 'page');
     67                                            $primary_id = $primary_page ? $primary_page->ID : 0;
     68
    6769                                            $child_pages_args = MMDHGAdminClass::mmdhg_folder_query();
    6870                                            if ($child_pages_args) {
    69                                                
     71
    7072                                                if (!empty($search_query)) {
    7173                                                    $child_pages_args['s'] = $search_query;
     
    7779                                                    while ($child_pages_query->have_posts()) {
    7880                                                        $child_pages_query->the_post();
     81                                                        $current_id = get_the_ID();
     82                                                        $selected = ($current_id == $primary_id) ? 'selected' : '';
    7983                                                        printf(
    80                                                             '<option value="%s">%s</option>',
    81                                                             esc_attr(get_the_ID()),
     84                                                            '<option value="%s" %s>%s</option>',
     85                                                            esc_attr($current_id),
     86                                                            $selected,
    8287                                                            esc_html(get_the_title())
    8388                                                        );
     
    8893                                        ?>
    8994                                    </select>
     95
    9096                                </div>
    9197                                <div class="mmd-input-h">
  • member-mail-drop/trunk/member-mail-drop.php

    r3055888 r3325722  
    33 * Plugin Name: Member Mail Drop
    44 * Description: Digitize Physical Mail for Your Members. Member Mail Drop is a WordPress plugin primarily crafted to digitize physical mail for your members, converting it into an easily accessible virtual format.
    5  * Version: 1.0.0
     5 * Version: 1.0.1
    66 * Author: HG Pro
    77 * Plugin URI: https://membermaildrop.com/
     
    2727
    2828// Plugin version
    29 define( 'MMDHG_VERSION',       '1.0.0' );
     29define( 'MMDHG_VERSION',       '1.0.1' );
    3030
    3131// Plugin Root File
Note: See TracChangeset for help on using the changeset viewer.