Plugin Directory

Changeset 3441776


Ignore:
Timestamp:
01/18/2026 06:54:15 AM (2 months ago)
Author:
edgarr41
Message:

Cleaned up the code

Location:
eh-mortgage-calculator
Files:
2 added
2 deleted
40 edited

Legend:

Unmodified
Added
Removed
  • eh-mortgage-calculator/tags/3.1.0/admin/admin-styles.css

    r3441254 r3441776  
    3232    display: block;
    3333}
     34
     35.fw-bold {
     36    font-weight: 600;
     37}
  • eh-mortgage-calculator/tags/3.1.0/admin/tabs/display.php

    r3441254 r3441776  
    11<?php
    2 $show_summary = get_option('ehmc_show_summary', '1');
    3 $show_table   = get_option('ehmc_show_table', '1');
    4 $show_chart   = get_option('ehmc_show_chart', '0');
     2// Translations
     3$title              = __( 'Display Options', 'eh-mortgage-calculator' );
     4$description        = __( 'Choose which elements of the calculator should be visible on the frontend.', 'eh-mortgage-calculator' );
     5$summary_scope      = __( 'Show Summary Box', 'eh-mortgage-calculator' );
     6$summary_label      = __( 'Enable summary section (monthly payment, total interest, total cost)', 'eh-mortgage-calculator' );
     7$amortization_scope = __( 'Show Amortization Table', 'eh-mortgage-calculator' );
     8$amortization_label = __( 'Display full amortization schedule', 'eh-mortgage-calculator' );
     9$chart_scope        = __( 'Show Chart', 'eh-mortgage-calculator' );
     10$chart_label        = __( 'Display a visual chart', 'eh-mortgage-calculator' );
     11$chart_description  = __( 'A simple doughnut chart that visualizes the breakdown of principal and interest.', 'eh-mortgage-calculator' );
    512
    6 $title         = esc_html__( 'Display Options', 'eh-mortgage-calculator' );
    7 $description   = esc_html__( 'Choose which elements of the calculator should be visible on the frontend.', 'eh-mortgage-calculator' );
    8 
    9 $summary_scope   = esc_html__( 'Show Summary Box', 'eh-mortgage-calculator' );
    10 $summary_label   = esc_html__( 'Enable summary section (monthly payment, total interest, total cost)', 'eh-mortgage-calculator' );
    11 
    12 $amortization_scope = esc_html__( 'Show Amortization Table', 'eh-mortgage-calculator' );
    13 $amortization_label = esc_html__( 'Display full amortization schedule', 'eh-mortgage-calculator' );
    14 
    15 $chart_scope       = esc_html__( 'Show Chart', 'eh-mortgage-calculator' );
    16 $chart_label       = esc_html__( 'Display a visual chart', 'eh-mortgage-calculator' );
    17 $chart_description = esc_html__( 'A simple doughnut chart that visualizes the breakdown of principal and interest.', 'eh-mortgage-calculator' );
     13// Fetch saved values (with safe defaults)
     14$show_summary = get_option('ehmc_show_summary');
     15$show_table   = get_option('ehmc_show_table');
     16$show_chart   = get_option('ehmc_show_chart');
    1817?>
    1918
    2019<div class="ehmc-card">
    21     <h2><?= $title ?></h2>
    22     <p class="description"><?= $description ?></p>
     20    <h2><?= esc_html( $title ) ?></h2>
     21    <p class="description"><?= esc_html( $description ) ?></p>
    2322    <table class="form-table">
    2423        <!-- Show Summary Box -->
    2524        <tr>
    26             <th scope="row"><?= $summary_scope ?></th>
     25            <th scope="row"><?= esc_html( $summary_scope ) ?></th>
    2726            <td>
    28                 <label>
    29                     <input type="checkbox" name="ehmc_show_summary" value="1"
     27                <label for="ehmc_show_summary">
     28                    <input type="checkbox" name="ehmc_show_summary" id="ehmc_show_summary" value="1"
    3029                        <?php checked($show_summary, '1'); ?> />
    31                     <?= $summary_label ?>
     30                    <?= esc_html( $summary_label ) ?>
    3231                </label>
    3332            </td>
     
    3534        <!-- Show Amortization Table -->
    3635        <tr>
    37             <th scope="row"><?= $amortization_scope ?></th>
     36            <th scope="row"><?= esc_html( $amortization_scope ) ?></th>
    3837            <td>
    39                 <label>
    40                     <input type="checkbox" name="ehmc_show_table" value="1"
     38                <label for="ehmc_show_table">
     39                    <input type="checkbox" name="ehmc_show_table" id="ehmc_show_table" value="1"
    4140                        <?php checked($show_table, '1'); ?> />
    42                     <?= $amortization_label ?>
     41                    <?= esc_html( $amortization_label ) ?>
    4342                </label>
    4443            </td>
     
    4645        <!-- Show Chart -->
    4746        <tr>
    48             <th scope="row"><?= $chart_scope ?></th>
     47            <th scope="row"><?= esc_html( $chart_scope ) ?></th>
    4948            <td>
    50                 <label>
    51                     <input type="checkbox" name="ehmc_show_chart" value="1"
     49                <label for="ehmc_show_chart" aria-describedby="summary-desc">
     50                    <input type="checkbox" name="ehmc_show_chart" id="ehmc_show_chart" value="1"
    5251                        <?php checked($show_chart, '1'); ?> />
    53                     <?= $chart_label ?>
     52                    <?= esc_html( $chart_label ) ?>
    5453                </label>
    55                 <p class="description"><?= $chart_description ?></p>
     54                <p id="summary-desc" class="description"><?= esc_html( $chart_description ) ?></p>
    5655            </td>
    5756        </tr>
  • eh-mortgage-calculator/tags/3.1.0/admin/tabs/general.php

    r3441254 r3441776  
    11<?php
     2// Translations
     3$title                    = __( 'General Settings', 'eh-mortgage-calculator' );
     4$description              = __( 'Control the default values and labels used in the mortgage calculator.', 'eh-mortgage-calculator' );
     5$default_label            = __( 'Label', 'eh-mortgage-calculator');
     6$button_calculate_label   = __( 'Calculate Button', 'eh-mortgage-calculator');
     7$button_reset_label       = __( 'Reset Button', 'eh-mortgage-calculator');
     8$default_amount_label     = __( 'Loan Amount', 'eh-mortgage-calculator' );
     9$default_interest_label   = __( 'Interest Rate', 'eh-mortgage-calculator' );
     10$default_years_label      = __( 'Years', 'eh-mortgage-calculator' );
     11$amount_label             = __( 'Default Loan Amount', 'eh-mortgage-calculator' );
     12$amount_description       = __( 'The starting loan amount shown in the calculator.', 'eh-mortgage-calculator' );
     13$interest_label           = __( 'Default Interest Rate (%)', 'eh-mortgage-calculator' );
     14$interest_description     = __( 'The default yearly interest rate.', 'eh-mortgage-calculator' );
     15$term_label               = __( 'Default Term (Years)', 'eh-mortgage-calculator' );
     16$term_description         = __( 'The default loan term in years.', 'eh-mortgage-calculator' );
     17$uninstall_scope          = __( 'Cleanup on Uninstall', 'eh-mortgage-calculator' );
     18$uninstall_label          = __( 'Delete all plugin data when uninstalling', 'eh-mortgage-calculator' );
     19$uninstall_description    = __( 'If enabled, all EHMC settings will be permanently removed when the plugin is deleted.', 'eh-mortgage-calculator' );
     20
    221// Fetch saved values (with safe defaults)
    3 $default_amount   = get_option('ehmc_default_amount', '300000');
    4 $default_interest = get_option('ehmc_default_interest', '6.5');
    5 $default_years    = get_option('ehmc_default_years', '30');
    6 
    7 $default_label            = esc_html__( 'Label', 'eh-mortgage-calculator');
    8 
    9 $button_calculate_label = esc_html__( 'Calculate Button', 'eh-mortgage-calculator');
    10 $button_reset_label     = esc_html__( 'Reset Button', 'eh-mortgage-calculator');
    11 
    12 $default_amount_label     = esc_html__( 'Loan Amount', 'eh-mortgage-calculator' );
    13 $default_interest_label   = esc_html__( 'Interest Rate', 'eh-mortgage-calculator' );
    14 $default_years_label      = esc_html__( 'Years', 'eh-mortgage-calculator' );
    15 $default_button_calculate = esc_html__( 'Calculate', 'eh-mortgage-calculator' );
    16 $default_button_reset     = esc_html__( 'Reset', 'eh-mortgage-calculator' );
    17 
    18 $label_amount             = get_option('ehmc_label_amount', $default_amount_label);
    19 $label_interest           = get_option('ehmc_label_interest', $default_interest_label);
    20 $label_years              = get_option('ehmc_label_years', $default_years_label);
    21 $label_button_calculate   = get_option('ehmc_label_button_calculate', $default_button_calculate);
    22 $label_button_reset       = get_option('ehmc_label_button_reset', $default_button_reset);
    23 
    24 $title         = esc_html__( 'General Settings', 'eh-mortgage-calculator' );
    25 $description   = esc_html__( 'Control the default values and labels used in the mortgage calculator.', 'eh-mortgage-calculator' );
    26 
    27 $amount_label         = esc_html__( 'Default Loan Amount', 'eh-mortgage-calculator' );
    28 $amount_description   = esc_html__( 'The starting loan amount shown in the calculator.', 'eh-mortgage-calculator' );
    29 
    30 $interest_label       = esc_html__( 'Default Interest Rate (%)', 'eh-mortgage-calculator' );
    31 $interest_description = esc_html__( 'The default yearly interest rate.', 'eh-mortgage-calculator' );
    32 
    33 $term_label       = esc_html__( 'Default Term (Years)', 'eh-mortgage-calculator' );
    34 $term_description = esc_html__( 'The default loan term in years.', 'eh-mortgage-calculator' );
    35 
    36 $uninstall_scope       = esc_html__( 'Cleanup on Uninstall', 'eh-mortgage-calculator' );
    37 $uninstall_label       = esc_html__( 'Delete all plugin data when uninstalling', 'eh-mortgage-calculator' );
    38 $uninstall_description = esc_html__( 'If enabled, all EHMC settings will be permanently removed when the plugin is deleted.', 'eh-mortgage-calculator' );
     22$default_amount           = get_option('ehmc_default_amount');
     23$default_interest         = get_option('ehmc_default_interest');
     24$default_years            = get_option('ehmc_default_years');
     25$label_amount             = get_option('ehmc_label_amount');
     26$label_interest           = get_option('ehmc_label_interest');
     27$label_years              = get_option('ehmc_label_years');
     28$label_button_calculate   = get_option('ehmc_label_button_calculate');
     29$label_button_reset       = get_option('ehmc_label_button_reset');
    3930?>
    4031
    4132<div class="ehmc-card">
    42     <h2><?= $title ?></h2>
    43     <p class="description"><?= $description ?></p>
     33    <h2><?= esc_html( $title ) ?></h2>
     34    <p class="description"><?= esc_html( $description ) ?></p>
    4435
    4536    <table class="form-table">
     
    4738        <!-- Default Loan Amount -->
    4839        <tr>
    49             <th scope="row"><label for="ehmc_default_amount"><?= $amount_label ?></label></th>
     40            <th scope="row"><label for="ehmc_default_amount"><?= esc_html( $amount_label ) ?></label></th>
    5041            <td>
    51                 <input type="number" name="ehmc_default_amount" id="ehmc_default_amount"
    52                        value="<?php echo esc_attr($default_amount); ?>"
     42                <input type="number" min="10000" max="20000000" step="1000" name="ehmc_default_amount" id="ehmc_default_amount"
     43                       value="<?php echo esc_attr( $default_amount ); ?>"
    5344                       class="regular-text" />
    54                 <p class="description"><?= $amount_description ?></p>
     45                <p class="description"><?= esc_html( $amount_description ) ?></p>
    5546            </td>
    5647        </tr>
     
    5849        <!-- Default Interest Rate -->
    5950        <tr>
    60             <th scope="row"><label for="ehmc_default_interest"><?= $interest_label ?></label></th>
     51            <th scope="row"><label for="ehmc_default_interest"><?= esc_html( $interest_label ) ?></label></th>
    6152            <td>
    62                 <input type="number" step="0.01" name="ehmc_default_interest" id="ehmc_default_interest"
     53                <input type="number" min="1" max="25" step="0.01" name="ehmc_default_interest" id="ehmc_default_interest"
    6354                       value="<?php echo esc_attr($default_interest); ?>"
    6455                       class="regular-text" />
    65                 <p class="description"><?= $interest_description ?></p>
     56                <p class="description"><?= esc_html( $interest_description ) ?></p>
    6657            </td>
    6758        </tr>
     
    6960        <!-- Default Term -->
    7061        <tr>
    71             <th scope="row"><label for="ehmc_default_years"><?= $term_label ?></label></th>
     62            <th scope="row"><label for="ehmc_default_years"><?= esc_html( $term_label ) ?></label></th>
    7263            <td>
    73                 <input type="number" name="ehmc_default_years" id="ehmc_default_years"
    74                        value="<?php echo esc_attr($default_years); ?>"
     64                <input type="number" min="1" max="45" step="1" name="ehmc_default_years" id="ehmc_default_years"
     65                       value="<?= esc_attr( $default_years ); ?>"
    7566                       class="regular-text" />
    76                 <p class="description"><?= $term_description ?></p>
     67                <p class="description"><?= esc_html( $term_description ) ?></p>
    7768            </td>
    7869        </tr>
     
    8273        <!-- Label: Loan Amount -->
    8374        <tr>
    84             <th scope="row"><label for="ehmc_label_amount"><?= $default_label . ': ' . $default_amount_label ?></label></th>
     75            <th scope="row"><label for="ehmc_label_amount"><?= esc_html( $default_label ) ?>: <?= esc_html( $default_amount_label ) ?></label></th>
    8576            <td>
    8677                <input type="text" name="ehmc_label_amount" id="ehmc_label_amount"
     
    9283        <!-- Label: Interest Rate -->
    9384        <tr>
    94             <th scope="row"><label for="ehmc_label_interest"><?= $default_label . ': ' . $default_interest_label ?></label></th>
     85            <th scope="row"><label for="ehmc_label_interest"><?= esc_html( $default_label ) ?>: <?= esc_html( $default_interest_label ) ?></label></th>
    9586            <td>
    9687                <input type="text" name="ehmc_label_interest" id="ehmc_label_interest"
     
    10293        <!-- Label: Years -->
    10394        <tr>
    104             <th scope="row"><label for="ehmc_label_years"><?= $default_label . ': ' . $default_years_label ?></label></th>
     95            <th scope="row"><label for="ehmc_label_years"><?= esc_html( $default_label ) ?>: <?= esc_html( $default_years_label ) ?></label></th>
    10596            <td>
    10697                <input type="text" name="ehmc_label_years" id="ehmc_label_years"
     
    112103        <!-- Label: Buttons -->
    113104        <tr>
    114             <th scope="row"><label for="ehmc_label_button_calculate"><?= $default_label . ': ' . $button_calculate_label ?></label></th>
     105            <th scope="row"><label for="ehmc_label_button_calculate"><?= esc_html( $default_label ) ?>: <?= esc_html( $button_calculate_label ) ?></label></th>
    115106            <td>
    116107                <input type="text" name="ehmc_label_button_calculate" id="ehmc_label_button_calculate"
    117                        value="<?php echo esc_attr($label_button_calculate); ?>"
     108                       value="<?php echo esc_attr( $label_button_calculate ); ?>"
    118109                       class="regular-text" />
    119110            </td>
    120111        </tr>
    121112        <tr>
    122             <th scope="row"><label for="ehmc_label_button_reset"><?= $default_label . ': ' . $button_reset_label ?></label></th>
     113            <th scope="row"><label for="ehmc_label_button_reset"><?= esc_html( $default_label ) ?>: <?= esc_html( $button_reset_label ) ?></label></th>
    123114            <td>
    124115                <input type="text" name="ehmc_label_button_reset" id="ehmc_label_button_reset"
    125                        value="<?php echo esc_attr($label_button_reset); ?>"
     116                       value="<?php echo esc_attr( $label_button_reset ); ?>"
    126117                       class="regular-text" />
    127118            </td>
     
    130121        <!-- Label: Uninstall -->
    131122        <tr>
    132             <th scope="row"><?= $uninstall_scope ?></th>
     123            <th scope="row"><?= esc_html( $uninstall_scope ) ?></th>
    133124            <td>
    134125                <label>
    135126                    <input type="checkbox" name="ehmc_delete_data_on_uninstall" value="1"
    136127                        <?php checked( get_option('ehmc_delete_data_on_uninstall'), '1' ); ?>>
    137                     <?= $uninstall_label ?>
     128                    <?= esc_html( $uninstall_label ) ?>
    138129                </label>
    139                 <p class="description"><?= $uninstall_description ?></p>
     130                <p class="description"><?= esc_html( $uninstall_description ) ?></p>
    140131            </td>
    141132        </tr>
  • eh-mortgage-calculator/tags/3.1.0/admin/tabs/shortcode.php

    r3441254 r3441776  
    11<?php
    2 $title         = esc_html__( 'Shortcode', 'eh-mortgage-calculator' );
    3 $description   = esc_html__( 'Use this shortcode to display the mortgage calculator anywhere on your site.', 'eh-mortgage-calculator' );
    4 
    5 $shortcode_scope         = esc_html__('Main Shortcode', 'eh-mortgage-calculator' );
    6 $shortcode_label         = esc_html__( 'Copy', 'eh-mortgage-calculator' );
    7 $shortcode_description   = esc_html__( 'Paste this shortcode into any page, post, or widget.', 'eh-mortgage-calculator' );
    8 
    9 $example_scope         = esc_html__('Example Usage', 'eh-mortgage-calculator' );
    10 $example_description   = esc_html__( 'No attributes are required — the calculator uses your saved settings.', 'eh-mortgage-calculator' );
    11 
     2// Translations
     3$title                 = __( 'Shortcode', 'eh-mortgage-calculator' );
     4$description           = __( 'Use this shortcode to display the mortgage calculator anywhere on your site.', 'eh-mortgage-calculator' );
     5$shortcode_scope       = __( 'Main Shortcode', 'eh-mortgage-calculator' );
     6$shortcode_label       = __( 'Copy', 'eh-mortgage-calculator' );
     7$shortcode_description = __( 'Paste this shortcode into any page, post, or widget.', 'eh-mortgage-calculator' );
     8$shortcode_copy        = __( 'Copy shortcode to clipboard', 'eh-mortgage-calculator' );
     9$example_scope         = __( 'Example Usage', 'eh-mortgage-calculator' );
     10$example_description   = __( 'No attributes are required — the calculator uses your saved settings.', 'eh-mortgage-calculator' );
    1211?>
    1312<div class="ehmc-card">
    14     <h2><?= $title ?></h2>
    15     <p class="description"><?= $description ?></p>
     13    <h2><?= esc_html( $title ) ?></h2>
     14    <p class="description"><?= esc_html( $description ) ?></p>
    1615
    1716    <table class="form-table">
    1817        <tr>
    19             <th scope="row"><?= $shortcode_scope ?></th>
     18            <th scope="row"><?= esc_html( $shortcode_scope ) ?></th>
    2019            <td>
    2120                <input type="text"
    2221                       id="ehmc-shortcode-field"
    23                        class="regular-text"
    24                        value="[eh_mortgage_calculator]"
    25                        readonly
    26                        style="width: 300px; font-weight: 600;" />
     22                       class="regular-text fw-bold"
     23                       value="<?= esc_attr( '[eh_mortgage_calculator]' ) ?>"
     24                       aria-label="<?= esc_attr__( $shortcode_copy ); ?>"
     25                       readonly />
    2726
    2827                <button type="button"
    2928                        class="button"
    3029                        id="ehmc-copy-shortcode">
    31                     <?= $shortcode_label ?>
     30                    <?= esc_html( $shortcode_label ) ?>
    3231                </button>
    3332
    34                 <p class="description"><?= $shortcode_description ?></p>
     33                <p class="description"><?= esc_html( $shortcode_description ) ?></p>
    3534            </td>
    3635        </tr>
     
    3938
    4039        <tr>
    41             <th scope="row"><?= $example_scope ?></th>
     40            <th scope="row"><?= esc_html( $example_scope ) ?></th>
    4241            <td>
    43                 <code>[eh_mortgage_calculator]</code>
    44                 <p class="description"><?= $example_description ?></p>
     42                <code><?= esc_html( '[eh_mortgage_calculator]' ) ?></code>
     43                <p class="description"><?= esc_html( $example_description ) ?></p>
    4544            </td>
    4645        </tr>
  • eh-mortgage-calculator/tags/3.1.0/admin/tabs/styling.php

    r3441254 r3441776  
    11<?php
     2// Translations
     3$title                              = __( 'Styling Options', 'eh-mortgage-calculator' );
     4$description                        = __( 'Customize the appearance of the mortgage calculator on the frontend.', 'eh-mortgage-calculator' );
     5$primary_color_label                = __( 'Primary Color', 'eh-mortgage-calculator' );
     6$primary_color_description          = __( 'Used for highlights and accents.', 'eh-mortgage-calculator' );
     7$button_calculate_color_label       = __( 'Calculate Button Color', 'eh-mortgage-calculator' );
     8$button_calculate_color_description = __( 'Color of the Calculate button.', 'eh-mortgage-calculator' );
     9$button_reset_color_label           = __( 'Reset Button Color', 'eh-mortgage-calculator' );
     10$button_reset_color_description     = __( 'Color of the Reset button.', 'eh-mortgage-calculator' );
     11$table_header_color_label           = __( 'Table Header Color', 'eh-mortgage-calculator' );
     12$table_header_color_description     = __( 'Background color for the amortization table header.', 'eh-mortgage-calculator' );
     13$border_radius_scope                = __( 'Border Radius', 'eh-mortgage-calculator' );
     14$border_radius_labels = [
     15    'none'   => __( 'None', 'eh-mortgage-calculator' ),
     16    'small'  => __( 'Small (4px)', 'eh-mortgage-calculator' ),
     17    'medium' => __( 'Medium (8px)', 'eh-mortgage-calculator' ),
     18    'large'  => __( 'Large (12px)', 'eh-mortgage-calculator' )
     19];
     20$border_radius_description = __( 'Controls the roundness of input fields, buttons, and cards.', 'eh-mortgage-calculator' );
     21
     22// Fetch saved values (with safe defaults)
    223$primary_color           = get_option('ehmc_primary_color', '#2271b1');
    324$button_calculate_color  = get_option('ehmc_button_color_calculate', '#2271b1');
     
    526$table_header_color      = get_option('ehmc_table_header_color', '#f1f1f1');
    627$border_radius           = get_option('ehmc_border_radius', 'medium');
    7 
    8 $title         = esc_html__( 'Styling Options', 'eh-mortgage-calculator' );
    9 $description   = esc_html__( 'Customize the appearance of the mortgage calculator on the frontend.', 'eh-mortgage-calculator' );
    10 
    11 $primary_color_label       = esc_html__( 'Primary Color', 'eh-mortgage-calculator' );
    12 $primary_color_description = esc_html__( 'Used for highlights and accents.', 'eh-mortgage-calculator' );
    13 
    14 $button_calculate_color_label       = esc_html__( 'Calculate Button Color', 'eh-mortgage-calculator' );
    15 $button_calculate_color_description = esc_html__( 'Color of the Calculate button.', 'eh-mortgage-calculator' );
    16 
    17 $button_reset_color_label       = esc_html__( 'Reset Button Color', 'eh-mortgage-calculator' );
    18 $button_reset_color_description = esc_html__( 'Color of the Reset button.', 'eh-mortgage-calculator' );
    19 
    20 $table_header_color_label       = esc_html__( 'Table Header Color', 'eh-mortgage-calculator' );
    21 $table_header_color_description = esc_html__( 'Background color for the amortization table header.', 'eh-mortgage-calculator' );
    22 
    23 $border_radius_scope  = esc_html__( 'Border Radius', 'eh-mortgage-calculator' );
    24 $border_radius_labels = [
    25     'none'   => esc_html__( 'None', 'eh-mortgage-calculator' ),
    26     'small'  => esc_html__( 'Small (4px)', 'eh-mortgage-calculator' ),
    27     'medium' => esc_html__( 'Medium (8px)', 'eh-mortgage-calculator' ),
    28     'large'  => esc_html__( 'Large (12px)', 'eh-mortgage-calculator' )
    29 ];
    30 $border_radius_description = esc_html__( 'Controls the roundness of input fields, buttons, and cards.', 'eh-mortgage-calculator' );
    3128?>
    3229
    3330<div class="ehmc-card">
    34     <h2><?= $title ?></h2>
    35     <p class="description"><?= $description ?></p>
     31    <h2><?= esc_html( $title ) ?></h2>
     32    <p class="description"><?= esc_html( $description ) ?></p>
    3633
    3734    <table class="form-table">
    3835        <!-- Primary Color -->
    3936        <tr>
    40             <th scope="row"><label for="ehmc_primary_color"><?= $primary_color_label ?></label></th>
     37            <th scope="row"><label for="ehmc_primary_color" aria-describedby="primary-desc"><?= esc_html( $primary_color_label ) ?></label></th>
    4138            <td>
    4239                <input type="color" name="ehmc_primary_color" id="ehmc_primary_color"
    4340                       value="<?php echo esc_attr($primary_color); ?>" />
    44                 <p class="description"><?= $primary_color_description ?></p>
     41                <p id="primary-desc" class="description"><?= esc_html( $primary_color_description ) ?></p>
    4542            </td>
    4643        </tr>
     
    4845        <!-- Buttons Color -->
    4946        <tr>
    50             <th scope="row"><label for="ehmc_button_color_calculate"><?= $button_calculate_color_label ?></label></th>
     47            <th scope="row"><label for="ehmc_button_color_calculate" aria-describedby="button-calculate-desc"><?= esc_html( $button_calculate_color_label ) ?></label></th>
    5148            <td>
    5249                <input type="color" name="ehmc_button_color_calculate" id="ehmc_button_color_calculate"
    5350                       value="<?php echo esc_attr($button_calculate_color); ?>" />
    54                 <p class="description"><?= $button_calculate_color_description ?></p>
     51                <p id="button-calculate-desc" class="description"><?= esc_html( $button_calculate_color_description ) ?></p>
    5552            </td>
    5653        </tr>
    5754        <tr>
    58             <th scope="row"><label for="ehmc_button_color_reset"><?= $button_reset_color_label ?></label></th>
     55            <th scope="row"><label for="ehmc_button_color_reset" aria-describedby="button-reset-desc"><?= esc_html( $button_reset_color_label ) ?></label></th>
    5956            <td>
    6057                <input type="color" name="ehmc_button_color_reset" id="ehmc_button_color_reset"
    6158                       value="<?php echo esc_attr($button_reset_color); ?>" />
    62                 <p class="description"><?= $button_reset_color_description ?></p>
     59                <p id="button-reset-desc" class="description"><?= esc_html( $button_reset_color_description ) ?></p>
    6360            </td>
    6461        </tr>
     
    6663        <!-- Table Header Color -->
    6764        <tr>
    68             <th scope="row"><label for="ehmc_table_header_color"><?= $table_header_color_label ?></label></th>
     65            <th scope="row"><label for="ehmc_table_header_color" aria-describedby="table-header-desc"><?= esc_html( $table_header_color_label ) ?></label></th>
    6966            <td>
    7067                <input type="color" name="ehmc_table_header_color" id="ehmc_table_header_color"
    7168                       value="<?php echo esc_attr($table_header_color); ?>" />
    72                 <p class="description"><?= $table_header_color_description ?></p>
     69                <p id="table-header-desc" class="description"><?= esc_html( $table_header_color_description ) ?></p>
    7370            </td>
    7471        </tr>
     
    7875        <!-- Border Radius -->
    7976        <tr>
    80             <th scope="row"><?= $border_radius_scope ?></th>
     77            <th scope="row"><?= esc_html( $border_radius_scope ) ?></th>
    8178            <td>
    82                 <fieldset>
     79                <fieldset aria-labelledby="border-radius-desc">
     80                    <?php $x = 0 ?>
    8381                    <?php foreach( $border_radius_labels as $key => $value ): ?>
    84                     <label>
    85                         <input type="radio" name="ehmc_border_radius" value="<?= $key ?>"
     82                    <label for="ehmc_border_radius-<?= $x ?>" aria-describedby="border-radius-desc">
     83                        <input id="ehmc_border_radius-<?= $x ?>" type="radio" name="ehmc_border_radius" value="<?= $key ?>"
    8684                            <?php checked($border_radius, $key); ?> />
    87                         <?= $value ?>
     85                        <?= esc_html( $value ) ?>
    8886                    </label>
    8987                    <br />
     88                    <?php $x++; ?>
    9089                    <?php endforeach; ?>
    9190                </fieldset>
    92                 <p class="description"><?= $border_radius_description ?></p>
     91                <p id="border-radius-desc" class="description"><?= esc_html( $border_radius_description ) ?></p>
    9392            </td>
    9493        </tr>
  • eh-mortgage-calculator/tags/3.1.0/assets/js/modules/EHMortgageCalculator.js

    r3441675 r3441776  
    184184        let i = this.interestInput.value;
    185185        let n = this.termInput.value;
    186 
    187         const validation = validateForm(P, i, n);
     186       
     187        let ranges = {
     188            pMin: 10000,
     189            pMax: 20000000,
     190            iMin: 1,
     191            iMax: 25,
     192            nMin: 1,
     193            nMax: 45
     194          }
     195
     196
     197        const validation = validateForm(P, i, n, ranges);
    188198
    189199        if (Object.values(validation).includes(false)) {
  • eh-mortgage-calculator/tags/3.1.0/assets/js/modules/validation.js

    r3441255 r3441776  
    11/**
    2  * Validate user input.
     2 * Validate user input using numeric ranges.
    33 *
    44 * @param {string} P Principal
    55 * @param {string} i Interest rate
    66 * @param {string} n Term
     7 * @param {object} ranges  { pMin, pMax, iMin, iMax, nMin, nMax }
    78 * @returns {{ principal: boolean, interest: boolean, term: boolean }}
    89 */
    9 export function validateForm(P, i, n) {
    10     // principal: > 0, up to 2 decimals
    11     const principalRegex = /^(?:[1-9]\d*(\.\d{1,2})?)$/;
     10export function validateForm(P, i, n, ranges) {
    1211
    13     // interest: 1–25% with up to 2 decimals
    14     const interestRegex = /^([1-9](\.\d{1,2})?|1\d(\.\d{1,2})?|2[0-4](\.\d{1,2})?|25)$/;
     12    // Remove commas and spaces
     13    const principal = parseFloat(String(P).replace(/,/g, ''));
     14    const interest  = parseFloat(i);
     15    const term      = parseInt(n, 10);
    1516
    16     // term: 1–45 years
    17     const termRegex = /^(?:[1-9]|[1-3][0-9]|4[0-5])$/;
     17    const {
     18        pMin, pMax,
     19        iMin, iMax,
     20        nMin, nMax
     21    } = ranges;
    1822
    1923    return {
    20         principal: principalRegex.test(P),
    21         interest:  interestRegex.test(i),
    22         term:      termRegex.test(n)
     24        principal: !isNaN(principal) && principal >= pMin && principal <= pMax,
     25        interest:  !isNaN(interest)  && interest  >= iMin && interest  <= iMax,
     26        term:      !isNaN(term)      && term      >= nMin && term      <= nMax
    2327    };
    2428}
  • eh-mortgage-calculator/tags/3.1.0/eh-mortgage-calculator.php

    r3441255 r3441776  
    44 * Description: A modern, modular mortgage calculator with amortization table.
    55 * Version: 3.1.0
     6 * Requires at least: 5.0
     7 * Tested up to: 6.9
    68 * Author: Edgar Hernandez
    79 * Text Domain: eh-mortgage-calculator
     
    1214}
    1315
    14 define( 'EHMORTGAGECALCULATOR__VERSION',     '3.0' );
     16define( 'EHMORTGAGECALCULATOR_VERSION',     '3.1.0' );
    1517define( 'EHMC_PATH', plugin_dir_path( __FILE__ ) );
    1618define( 'EHMC_URL',  plugin_dir_url( __FILE__ ) );
  • eh-mortgage-calculator/tags/3.1.0/includes/class-ehmc-admin.php

    r3441255 r3441776  
    44     public function __construct() {
    55        add_action('admin_menu', [ $this, 'ehmc_register_settings_page' ]);
    6         add_action('admin_enqueue_scripts', [ $this, 'ehmc_admin_assets' ]);
    76    }
    87   
    98    public function ehmc_register_settings_page() {
     9        if ( ! current_user_can( 'manage_options' ) ) {
     10            return;
     11        }
     12       
    1013        $title = esc_html__( 'Mortgage Calculator Settings', 'eh-mortgage-calculator');
    11         $menu_title = esc_html__( 'Mortgage', 'eh-mortgage-calculator');
     14        $menu_title = esc_html__( 'Mortgage Calculator', 'eh-mortgage-calculator');
    1215       
    1316        add_options_page(
     
    2225    public function ehmc_register_settings() {
    2326        // General
    24         register_setting('ehmc_settings_group', 'ehmc_default_amount');
    25         register_setting('ehmc_settings_group', 'ehmc_default_interest');
    26         register_setting('ehmc_settings_group', 'ehmc_default_years');
    27         register_setting('ehmc_settings_group', 'ehmc_label_amount');
    28         register_setting('ehmc_settings_group', 'ehmc_label_interest');
    29         register_setting('ehmc_settings_group', 'ehmc_label_years');
    30         register_setting('ehmc_settings_group', 'ehmc_label_button_calculate');
    31         register_setting('ehmc_settings_group', 'ehmc_label_button_reset');
    32        
     27        $this->ehmc_register_setting('ehmc_default_amount', 'number', 'absint', 300000);
     28        $this->ehmc_register_setting('ehmc_default_interest', 'string', [ $this, 'sanitize_float' ], '6.5');
     29        $this->ehmc_register_setting('ehmc_default_years', 'number', 'absint', 30);
     30        $this->ehmc_register_setting('ehmc_label_amount', 'string', 'sanitize_text_field', esc_html__( 'Loan Amount', 'eh-mortgage-calculator' ));
     31        $this->ehmc_register_setting('ehmc_label_interest', 'string', 'sanitize_text_field', esc_html__( 'Interest Rate', 'eh-mortgage-calculator' ));
     32        $this->ehmc_register_setting('ehmc_label_years', 'string', 'sanitize_text_field', esc_html__( 'Years', 'eh-mortgage-calculator' ));
     33        $this->ehmc_register_setting('ehmc_label_button_calculate', 'string', 'sanitize_text_field', esc_html__( 'Calculate', 'eh-mortgage-calculator' ));
     34        $this->ehmc_register_setting('ehmc_label_button_reset', 'string', 'sanitize_text_field', esc_html__( 'Reset', 'eh-mortgage-calculator' ));
    3335        // Display
    34         register_setting('ehmc_settings_group', 'ehmc_show_summary');
    35         register_setting('ehmc_settings_group', 'ehmc_show_table');
    36         register_setting('ehmc_settings_group', 'ehmc_show_chart');
     36        $this->ehmc_register_setting('ehmc_show_summary', 'integer', 'absint', 1);
     37        $this->ehmc_register_setting('ehmc_show_table', 'integer', 'absint', 1);
     38        $this->ehmc_register_setting('ehmc_show_chart', 'integer', 'absint', 0);
     39        // Styling
     40        $this->ehmc_register_setting('ehmc_primary_color', 'string', 'sanitize_hex_color', '#2271b1');
     41        $this->ehmc_register_setting('ehmc_button_color_calculate', 'string', 'sanitize_hex_color', '#2271b1');
     42        $this->ehmc_register_setting('ehmc_button_color_reset', 'string', 'sanitize_hex_color', '#6c757d');
     43        $this->ehmc_register_setting('ehmc_table_header_color', 'string', 'sanitize_hex_color', '#f1f1f1');
     44        $this->ehmc_register_setting('ehmc_border_radius', 'string', [ $this, 'sanitize_border_radius' ], 'medium');
     45        // Uninstall
     46        $this->ehmc_register_setting('ehmc_delete_data_on_uninstall', 'integer', 'absint', 0);
     47    }
     48   
     49    /**
     50     *
     51     * @param string $setting
     52     * @param string $type
     53     * @param string|array $sanitize_callback
     54     * @param string|int $default
     55     */
     56    public function ehmc_register_setting(string $setting, string $type, string | array $sanitize_callback, string | int $default) {
     57        register_setting(
     58            'ehmc_settings_group',
     59            $setting,
     60            [
     61                'type'              => $type,
     62                'sanitize_callback' => $sanitize_callback,
     63                'default'           => $default,
     64            ]
     65        );
     66    }
     67   
     68    /**
     69     * Sanitize float values (interest rate)
     70     */
     71    public function sanitize_float( $value ) {
     72        return is_numeric( $value ) ? $value : '';
     73    }
    3774
    38         // Styling
    39         register_setting('ehmc_settings_group', 'ehmc_primary_color');
    40         register_setting('ehmc_settings_group', 'ehmc_button_color_calculate');
    41         register_setting('ehmc_settings_group', 'ehmc_button_color_reset');
    42         register_setting('ehmc_settings_group', 'ehmc_table_header_color');
    43         register_setting('ehmc_settings_group', 'ehmc_border_radius');
    44        
    45         // Uninstall
    46         register_setting('ehmc_settings_group', 'ehmc_delete_data_on_uninstall');
     75    /**
     76     * Sanitize border radius option
     77     */
     78    public function sanitize_border_radius( $value ) {
     79
     80        $allowed = [ 'none', 'small', 'medium', 'large' ];
     81
     82        return in_array( $value, $allowed, true ) ? $value : 'medium';
    4783    }
    4884   
     
    6096        echo $output;
    6197    }
    62    
    63    
    64     public function ehmc_admin_assets($hook) {
    65         if ($hook !== 'settings_page_ehmc-settings') {
    66             return;
    67         }
    68        
    69         wp_enqueue_script(
    70             'ehmc-admin-js',
    71             EHMC_URL . 'admin/admin-scripts.js',
    72             [],
    73             EHMORTGAGECALCULATOR__VERSION,
    74             true
    75         );
    76        
    77         wp_enqueue_style(
    78             'ehmc-admin-css',
    79             EHMC_URL . 'admin/admin-styles.css',
    80             [],
    81             EHMORTGAGECALCULATOR__VERSION
    82         );
    83     }
    8498}
  • eh-mortgage-calculator/tags/3.1.0/includes/class-ehmc-assets.php

    r3441675 r3441776  
    1010            EHMC_URL . 'assets/css/bootstrap-custom.css',
    1111            [],
    12             EHMORTGAGECALCULATOR__VERSION
     12            EHMORTGAGECALCULATOR_VERSION
    1313        );
    14 
     14       
     15        wp_enqueue_script( 'wp-i18n' );
     16       
    1517        // JS (ES6 module)
    1618        wp_enqueue_script_module(
     
    2527            EHMC_URL . 'assets/js/frontend.js',
    2628            ['chartjs'],
    27             EHMORTGAGECALCULATOR__VERSION
     29            EHMORTGAGECALCULATOR_VERSION
    2830        );
    2931
    3032        wp_set_script_translations( 'ehmc-frontend', 'eh-mortgage-calculator' );
     33       
     34        add_filter( 'script_module_data_ehmc-frontend', [ $this, 'localize_module_data' ] );
    3135
    32         // Important: load as module
    33         wp_enqueue_script( 'wp-i18n' );
    34        
    35         // Provide data specifically for this module
    36         add_filter( "script_module_data_ehmc-frontend", function ( array $data ): array {
    37             $data['labels'] = [
    38                 // Chart
    39                 'principal' => __( 'Principal', 'eh-mortgage-calculator' ),
    40                 'interest'  => __( 'Interest', 'eh-mortgage-calculator' ),
    41                 // Summary
    42                 'monthly_payment' => __('Monthly Payment', 'eh-mortgage-calculator' ),
    43                 'total_interest'  => __('Total Interest', 'eh-mortgage-calculator' ),
    44                 'total_paid'      => __('Total Paid', 'eh-mortgage-calculator' )
    45             ];
    46             return $data;
    47         } );
     36    }
     37   
     38    public function localize_module_data( array $data ): array {
     39        $data['labels'] = [
     40            'principal'       => __( 'Principal', 'eh-mortgage-calculator' ),
     41            'interest'        => __( 'Interest', 'eh-mortgage-calculator' ),
     42            'monthly_payment' => __( 'Monthly Payment', 'eh-mortgage-calculator' ),
     43            'total_interest'  => __( 'Total Interest', 'eh-mortgage-calculator' ),
     44            'total_paid'      => __( 'Total Paid', 'eh-mortgage-calculator' ),
     45        ];
     46        return $data;
    4847    }
    4948}
  • eh-mortgage-calculator/tags/3.1.0/includes/class-ehmc-blocks.php

    r3441255 r3441776  
    3838            EHMC_URL . 'blocks/ehmc-calculator/editor.css',
    3939            [],
    40             EHMORTGAGECALCULATOR__VERSION
     40            EHMORTGAGECALCULATOR_VERSION
    4141        );
    4242       
     
    4545            EHMC_URL . 'blocks/ehmc-calculator/editor.js',
    4646            [ 'wp-blocks', 'wp-element', 'wp-editor' ],
    47             EHMORTGAGECALCULATOR__VERSION,
     47            EHMORTGAGECALCULATOR_VERSION,
    4848            true
    4949        );
  • eh-mortgage-calculator/tags/3.1.0/includes/class-ehmc-loader.php

    r3441308 r3441776  
    99        require_once EHMC_PATH . 'includes/class-ehmc-blocks.php';
    1010        require_once EHMC_PATH . 'includes/class-ehmc-admin.php';
     11        require_once EHMC_PATH . 'includes/class-ehmc-admin-assets.php';
    1112    }
    1213
     
    1617        $this->load_assets();
    1718        $this->load_shortcode();
    18         $this->load_admin();
     19        if ( is_admin() ) {
     20            $this->load_admin_assets();
     21            $this->load_admin();
     22        }
    1923    }
    2024
     
    4347        add_action( 'admin_init', [ $admin, 'ehmc_register_settings' ] );
    4448    }
     49   
     50    private function load_admin_assets() {
     51        $admin_assets = new EHMC_Admin_Assets();
     52        add_action( 'admin_enqueue_scripts', [ $admin_assets, 'ehmc_admin_assets' ] );
     53    }
    4554}
  • eh-mortgage-calculator/tags/3.1.0/includes/class-ehmc-shortcode.php

    r3428826 r3441776  
    77    public function render( $atts = [] ) {
    88        self::$instance_counter++;
    9         $instance = self::$instance_counter;
     9        $instance = absint( self::$instance_counter );
    1010
    1111        // 1. Start fresh buffering
  • eh-mortgage-calculator/tags/3.1.0/languages/eh-mortgage-calculator-es_ES.po

    r3441255 r3441776  
    44"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/eh-mortgage-"
    55"calculator\n"
    6 "POT-Creation-Date: 2026-01-16T20:00:18+00:00\n"
    7 "PO-Revision-Date: 2026-01-16 12:05-0800\n"
     6"POT-Creation-Date: 2026-01-18T05:30:23+00:00\n"
     7"PO-Revision-Date: 2026-01-17 21:34-0800\n"
    88"Last-Translator: \n"
    99"Language-Team: \n"
     
    3535msgstr "Edgar Hernandez"
    3636
    37 #: admin/settings-page.php:2 includes/class-ehmc-admin.php:10
     37#: admin/settings-page.php:2 includes/class-ehmc-admin.php:13
    3838msgid "Mortgage Calculator Settings"
    3939msgstr "Ajustes de la calculadora hipotecaria"
     
    5151msgstr "Estilo"
    5252
    53 #: admin/settings-page.php:6 admin/tabs/shortcode.php:2
     53#: admin/settings-page.php:6 admin/tabs/shortcode.php:3
    5454msgid "Shortcode"
    5555msgstr "Shortcode"
     
    5959msgstr "Guardar cambios"
    6060
    61 #: admin/tabs/display.php:6
     61#: admin/tabs/display.php:3
    6262msgid "Display Options"
    6363msgstr "Opciones de Visualización"
    6464
    65 #: admin/tabs/display.php:7
     65#: admin/tabs/display.php:4
    6666msgid ""
    6767"Choose which elements of the calculator should be visible on the frontend."
     
    7070"pública."
    7171
    72 #: admin/tabs/display.php:9
     72#: admin/tabs/display.php:5
    7373msgid "Show Summary Box"
    7474msgstr "Mostrar cuadro de resumen"
    7575
    76 #: admin/tabs/display.php:10
     76#: admin/tabs/display.php:6
    7777msgid "Enable summary section (monthly payment, total interest, total cost)"
    7878msgstr ""
    7979"Habilitar sección de resumen (pago mensual, interés total, costo total)"
    8080
    81 #: admin/tabs/display.php:12
     81#: admin/tabs/display.php:7
    8282msgid "Show Amortization Table"
    8383msgstr "Mostrar tabla de amortización"
    8484
    85 #: admin/tabs/display.php:13
     85#: admin/tabs/display.php:8
    8686msgid "Display full amortization schedule"
    8787msgstr "Mostrar calendario de amortización completo"
    8888
    89 #: admin/tabs/display.php:15
     89#: admin/tabs/display.php:9
    9090msgid "Show Chart"
    9191msgstr "Mostrar gráfico"
    9292
    93 #: admin/tabs/display.php:16
     93#: admin/tabs/display.php:10
    9494msgid "Display a visual chart"
    9595msgstr "Mostrar gráfico visual"
    9696
    97 #: admin/tabs/display.php:17
     97#: admin/tabs/display.php:11
    9898msgid ""
    9999"A simple doughnut chart that visualizes the breakdown of principal and "
     
    103103"(principal) y los intereses."
    104104
    105 #: admin/tabs/general.php:7
     105#: admin/tabs/general.php:3
     106msgid "General Settings"
     107msgstr "Ajustes Generales"
     108
     109#: admin/tabs/general.php:4
     110msgid "Control the default values and labels used in the mortgage calculator."
     111msgstr ""
     112"Controla los valores predeterminados y las etiquetas utilizadas en la "
     113"calculadora hipotecaria."
     114
     115#: admin/tabs/general.php:5
    106116msgid "Label"
    107117msgstr "Etiqueta"
    108118
    109 #: admin/tabs/general.php:9
     119#: admin/tabs/general.php:6
    110120msgid "Calculate Button"
    111121msgstr "Botón de calcular"
    112122
    113 #: admin/tabs/general.php:10
     123#: admin/tabs/general.php:7
    114124msgid "Reset Button"
    115125msgstr "Botón de restablecer"
    116126
    117 #: admin/tabs/general.php:12 templates/calculator.php:9
     127#: admin/tabs/general.php:8 includes/class-ehmc-admin.php:30
     128#: templates/calculator.php:12
    118129msgid "Loan Amount"
    119130msgstr "Monto del préstamo"
    120131
    121 #: admin/tabs/general.php:13
     132#: admin/tabs/general.php:9 includes/class-ehmc-admin.php:31
    122133msgid "Interest Rate"
    123134msgstr "Tasa de interés"
    124135
    125 #: admin/tabs/general.php:14
     136#: admin/tabs/general.php:10 includes/class-ehmc-admin.php:32
    126137msgid "Years"
    127138msgstr "Años"
    128139
    129 #: admin/tabs/general.php:15
    130 msgid "Calculate"
    131 msgstr "Calcular"
    132 
    133 #: admin/tabs/general.php:16
    134 msgid "Reset"
    135 msgstr "Restablecer"
    136 
    137 #: admin/tabs/general.php:24
    138 msgid "General Settings"
    139 msgstr "Ajustes Generales"
    140 
    141 #: admin/tabs/general.php:25
    142 msgid "Control the default values and labels used in the mortgage calculator."
    143 msgstr ""
    144 "Controla los valores predeterminados y las etiquetas utilizadas en la "
    145 "calculadora hipotecaria."
    146 
    147 #: admin/tabs/general.php:27
     140#: admin/tabs/general.php:11
    148141msgid "Default Loan Amount"
    149142msgstr "Monto de préstamo predeterminado"
    150143
    151 #: admin/tabs/general.php:28
     144#: admin/tabs/general.php:12
    152145msgid "The starting loan amount shown in the calculator."
    153146msgstr "El monto inicial del préstamo que se muestra en la calculadora."
    154147
    155 #: admin/tabs/general.php:30
     148#: admin/tabs/general.php:13
    156149msgid "Default Interest Rate (%)"
    157150msgstr "Tasa de interés predeterminada (%)"
    158151
    159 #: admin/tabs/general.php:31
     152#: admin/tabs/general.php:14
    160153msgid "The default yearly interest rate."
    161154msgstr "La tasa de interés anual predeterminada."
    162155
    163 #: admin/tabs/general.php:33
     156#: admin/tabs/general.php:15
    164157msgid "Default Term (Years)"
    165158msgstr "Plazo predeterminado (Años)"
    166159
    167 #: admin/tabs/general.php:34
     160#: admin/tabs/general.php:16
    168161msgid "The default loan term in years."
    169162msgstr "El plazo predeterminado del préstamo en años."
    170163
    171 #: admin/tabs/general.php:36
     164#: admin/tabs/general.php:17
    172165msgid "Cleanup on Uninstall"
    173166msgstr "Eliminar datos al desinstalar"
    174167
    175 #: admin/tabs/general.php:37
     168#: admin/tabs/general.php:18
    176169msgid "Delete all plugin data when uninstalling"
    177170msgstr "Eliminar todos los datos del plugin al desinstalar"
    178171
    179 #: admin/tabs/general.php:38
     172#: admin/tabs/general.php:19
    180173msgid ""
    181174"If enabled, all EHMC settings will be permanently removed when the plugin is "
     
    185178"desinstalar el plugin."
    186179
    187 #: admin/tabs/shortcode.php:3
     180#: admin/tabs/shortcode.php:4
    188181msgid ""
    189182"Use this shortcode to display the mortgage calculator anywhere on your site."
     
    204197msgstr "Pega este shortcode en cualquier página, entrada o widget."
    205198
     199#: admin/tabs/shortcode.php:8
     200msgid "Copy shortcode to clipboard"
     201msgstr "Copiar shortcode al portapapeles"
     202
    206203#: admin/tabs/shortcode.php:9
    207204msgid "Example Usage"
     
    213210"No se requiere ningún atributo; la calculadora utiliza los ajustes guardados."
    214211
    215 #: admin/tabs/styling.php:8
     212#: admin/tabs/styling.php:3
    216213msgid "Styling Options"
    217214msgstr "Opciones de Estilo"
    218215
    219 #: admin/tabs/styling.php:9
     216#: admin/tabs/styling.php:4
    220217msgid "Customize the appearance of the mortgage calculator on the frontend."
    221218msgstr ""
    222219"Personaliza la apariencia de la calculadora hipotecaria en la página pública."
    223220
    224 #: admin/tabs/styling.php:11
     221#: admin/tabs/styling.php:5
    225222msgid "Primary Color"
    226223msgstr "Color principal"
    227224
    228 #: admin/tabs/styling.php:12
     225#: admin/tabs/styling.php:6
    229226msgid "Used for highlights and accents."
    230227msgstr "Se utiliza para resaltar y acentuar."
    231228
    232 #: admin/tabs/styling.php:14
     229#: admin/tabs/styling.php:7
    233230msgid "Calculate Button Color"
    234231msgstr "Color del botón Calcular"
    235232
    236 #: admin/tabs/styling.php:15
     233#: admin/tabs/styling.php:8
    237234msgid "Color of the Calculate button."
    238235msgstr "Color para el botón Calcular."
    239236
    240 #: admin/tabs/styling.php:17
     237#: admin/tabs/styling.php:9
    241238msgid "Reset Button Color"
    242239msgstr "Color del botón Restablecer"
    243240
    244 #: admin/tabs/styling.php:18
     241#: admin/tabs/styling.php:10
    245242msgid "Color of the Reset button."
    246243msgstr "Color para el botón Restablecer."
    247244
    248 #: admin/tabs/styling.php:20
     245#: admin/tabs/styling.php:11
    249246msgid "Table Header Color"
    250247msgstr "Color del encabezado de la tabla"
    251248
    252 #: admin/tabs/styling.php:21
     249#: admin/tabs/styling.php:12
    253250msgid "Background color for the amortization table header."
    254251msgstr "Color de fondo para el encabezado de la tabla de amortización."
    255252
    256 #: admin/tabs/styling.php:23
     253#: admin/tabs/styling.php:13
    257254msgid "Border Radius"
    258255msgstr "Radio del borde"
    259256
    260 #: admin/tabs/styling.php:25
     257#: admin/tabs/styling.php:15
    261258msgid "None"
    262259msgstr "Ninguno"
    263260
    264 #: admin/tabs/styling.php:26
     261#: admin/tabs/styling.php:16
    265262msgid "Small (4px)"
    266263msgstr "Pequeño (4px)"
    267264
    268 #: admin/tabs/styling.php:27
     265#: admin/tabs/styling.php:17
    269266msgid "Medium (8px)"
    270267msgstr "Mediano (8px)"
    271268
    272 #: admin/tabs/styling.php:28
     269#: admin/tabs/styling.php:18
    273270msgid "Large (12px)"
    274271msgstr "Grande (12px)"
    275272
    276 #: admin/tabs/styling.php:30
     273#: admin/tabs/styling.php:20
    277274msgid "Controls the roundness of input fields, buttons, and cards."
    278275msgstr "Controla el redondeo de los campos de entrada, botones y tarjetas."
    279276
    280 #: includes/class-ehmc-admin.php:11
    281 msgid "Mortgage"
    282 msgstr "Hipoteca"
    283 
    284 #: includes/class-ehmc-assets.php:40 templates/calculator.php:27
     277#: includes/class-ehmc-admin.php:14
     278msgid "Mortgage Calculator"
     279msgstr "Calculadora de hipoteca"
     280
     281#: includes/class-ehmc-admin.php:33
     282msgid "Calculate"
     283msgstr "Calcular"
     284
     285#: includes/class-ehmc-admin.php:34
     286msgid "Reset"
     287msgstr "Restablecer"
     288
     289#: includes/class-ehmc-assets.php:40 templates/calculator.php:22
    285290msgid "Principal"
    286291msgstr "Principal"
    287292
    288 #: includes/class-ehmc-assets.php:41 templates/calculator.php:28
     293#: includes/class-ehmc-assets.php:41 templates/calculator.php:23
    289294msgid "Interest"
    290295msgstr "Interés"
    291296
    292 #: includes/class-ehmc-assets.php:43
     297#: includes/class-ehmc-assets.php:42
    293298msgid "Monthly Payment"
    294299msgstr "Pago Mensual"
    295300
    296 #: includes/class-ehmc-assets.php:44
     301#: includes/class-ehmc-assets.php:43
    297302msgid "Total Interest"
    298303msgstr "Interés Total"
    299304
    300 #: includes/class-ehmc-assets.php:45
     305#: includes/class-ehmc-assets.php:44
    301306msgid "Total Paid"
    302307msgstr "Total Pagado"
     
    306311msgstr "Este bloque mostrará la calculadora en el sitio web."
    307312
     313#: templates/calculator.php:9
     314msgid "Please enter an amount between 10,000 and 20,000,000"
     315msgstr "Por favor, introduzca una cantidad entre 10.000 y 20.000.000"
     316
    308317#: templates/calculator.php:10
    309 msgid "Please enter a loan amount, e.g. \"40,000\", \"50,000.23\""
    310 msgstr "Por favor, ingresa un monto de préstamo, ej. \"40.000\", \"50.000.23\""
    311 
    312 #: templates/calculator.php:12
     318msgid "Please enter a number between 1 and 25, e.g. \"5\", \"5.5\", \"5.75\""
     319msgstr ""
     320"Por favor, ingresa un número entre 1 y 25, ej. \"5\", \"5,5\", \"5,75\""
     321
     322#: templates/calculator.php:11
     323msgid "Please enter a number between 1 and 45: no decimals allowed"
     324msgstr "Por favor, ingresa un número entre 1 y 45: no se permiten decimales"
     325
     326#: templates/calculator.php:13
    313327msgid "Yearly Interest"
    314328msgstr "Interés Anual"
    315329
    316 #: templates/calculator.php:13
    317 msgid "Please enter a number between 1 and 25, e.g. \"5\", \"5.5\", \"5.75\""
    318 msgstr ""
    319 "Por favor, ingresa un número entre 1 y 25, ej. \"5\", \"5,5\", \"5,75\""
    320 
    321 #: templates/calculator.php:15
     330#: templates/calculator.php:14
    322331msgid "Number of years"
    323332msgstr "Número de años"
    324333
    325 #: templates/calculator.php:16
    326 msgid "Please enter a number between 1 and 45: no decimals allowed"
    327 msgstr "Por favor, ingresa un número entre 1 y 45: no se permiten decimales"
    328 
    329 #: templates/calculator.php:22
     334#: templates/calculator.php:17
    330335msgid "Payment Breakdown"
    331336msgstr "Desglose del Pago"
    332337
    333 #: templates/calculator.php:23
     338#: templates/calculator.php:18
    334339msgid "Summary"
    335340msgstr "Resumen"
    336341
    337 #: templates/calculator.php:26
     342#: templates/calculator.php:21
    338343msgid "Payment"
    339344msgstr "Pago"
    340345
    341 #: templates/calculator.php:29
     346#: templates/calculator.php:24
    342347msgid "Balance"
    343348msgstr "Saldo"
    344349
    345 #: templates/calculator.php:31
     350#: templates/calculator.php:25
    346351msgid "Amortization results pages"
    347352msgstr "Páginas de resultados de amortización"
    348353
    349 #: assets/js/modules/EHMortgageCalculator.js:226
     354#: assets/js/modules/EHMortgageCalculator.js:236
    350355msgid "Previous"
    351356msgstr "Anterior"
    352357
    353 #: assets/js/modules/EHMortgageCalculator.js:256
     358#: assets/js/modules/EHMortgageCalculator.js:266
    354359msgid "Next"
    355360msgstr "Siguiente"
     
    380385msgstr "préstamo"
    381386
     387#~ msgid "Mortgage"
     388#~ msgstr "Hipoteca"
     389
    382390#~ msgid "Loan amount:"
    383391#~ msgstr "Monto del Préstamo:"
  • eh-mortgage-calculator/tags/3.1.0/languages/eh-mortgage-calculator-es_MX.po

    r3441255 r3441776  
    44"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/eh-mortgage-"
    55"calculator\n"
    6 "POT-Creation-Date: 2026-01-16T20:00:18+00:00\n"
    7 "PO-Revision-Date: 2026-01-16 12:09-0800\n"
     6"POT-Creation-Date: 2026-01-18T05:30:23+00:00\n"
     7"PO-Revision-Date: 2026-01-17 21:36-0800\n"
    88"Last-Translator: \n"
    99"Language-Team: \n"
     
    3535msgstr "Edgar Hernandez"
    3636
    37 #: admin/settings-page.php:2 includes/class-ehmc-admin.php:10
     37#: admin/settings-page.php:2 includes/class-ehmc-admin.php:13
    3838msgid "Mortgage Calculator Settings"
    3939msgstr "Ajustes de la calculadora hipotecaria"
     
    5151msgstr "Estilo"
    5252
    53 #: admin/settings-page.php:6 admin/tabs/shortcode.php:2
     53#: admin/settings-page.php:6 admin/tabs/shortcode.php:3
    5454msgid "Shortcode"
    5555msgstr "Shortcode"
     
    5959msgstr "Guardar cambios"
    6060
    61 #: admin/tabs/display.php:6
     61#: admin/tabs/display.php:3
    6262msgid "Display Options"
    6363msgstr "Opciones de Visualización"
    6464
    65 #: admin/tabs/display.php:7
     65#: admin/tabs/display.php:4
    6666msgid ""
    6767"Choose which elements of the calculator should be visible on the frontend."
     
    7070"pública."
    7171
    72 #: admin/tabs/display.php:9
     72#: admin/tabs/display.php:5
    7373msgid "Show Summary Box"
    7474msgstr "Mostrar cuadro de resumen"
    7575
    76 #: admin/tabs/display.php:10
     76#: admin/tabs/display.php:6
    7777msgid "Enable summary section (monthly payment, total interest, total cost)"
    7878msgstr ""
    7979"Habilitar sección de resumen (pago mensual, interés total, costo total)"
    8080
    81 #: admin/tabs/display.php:12
     81#: admin/tabs/display.php:7
    8282msgid "Show Amortization Table"
    8383msgstr "Mostrar tabla de amortización"
    8484
    85 #: admin/tabs/display.php:13
     85#: admin/tabs/display.php:8
    8686msgid "Display full amortization schedule"
    8787msgstr "Mostrar calendario de amortización completo"
    8888
    89 #: admin/tabs/display.php:15
     89#: admin/tabs/display.php:9
    9090msgid "Show Chart"
    9191msgstr "Mostrar gráfico"
    9292
    93 #: admin/tabs/display.php:16
     93#: admin/tabs/display.php:10
    9494msgid "Display a visual chart"
    9595msgstr "Mostrar gráfico visual"
    9696
    97 #: admin/tabs/display.php:17
     97#: admin/tabs/display.php:11
    9898msgid ""
    9999"A simple doughnut chart that visualizes the breakdown of principal and "
     
    103103"(principal) y los intereses."
    104104
    105 #: admin/tabs/general.php:7
     105#: admin/tabs/general.php:3
     106msgid "General Settings"
     107msgstr "Ajustes Generales"
     108
     109#: admin/tabs/general.php:4
     110msgid "Control the default values and labels used in the mortgage calculator."
     111msgstr ""
     112"Controla los valores predeterminados y las etiquetas utilizadas en la "
     113"calculadora hipotecaria."
     114
     115#: admin/tabs/general.php:5
    106116msgid "Label"
    107117msgstr "Etiqueta"
    108118
    109 #: admin/tabs/general.php:9
     119#: admin/tabs/general.php:6
    110120msgid "Calculate Button"
    111121msgstr "Botón de calcular"
    112122
    113 #: admin/tabs/general.php:10
     123#: admin/tabs/general.php:7
    114124msgid "Reset Button"
    115125msgstr "Botón de restablecer"
    116126
    117 #: admin/tabs/general.php:12 templates/calculator.php:9
     127#: admin/tabs/general.php:8 includes/class-ehmc-admin.php:30
     128#: templates/calculator.php:12
    118129msgid "Loan Amount"
    119130msgstr "Monto del préstamo"
    120131
    121 #: admin/tabs/general.php:13
     132#: admin/tabs/general.php:9 includes/class-ehmc-admin.php:31
    122133msgid "Interest Rate"
    123134msgstr "Tasa de interés"
    124135
    125 #: admin/tabs/general.php:14
     136#: admin/tabs/general.php:10 includes/class-ehmc-admin.php:32
    126137msgid "Years"
    127138msgstr "Años"
    128139
    129 #: admin/tabs/general.php:15
    130 msgid "Calculate"
    131 msgstr "Calcular"
    132 
    133 #: admin/tabs/general.php:16
    134 msgid "Reset"
    135 msgstr "Restablecer"
    136 
    137 #: admin/tabs/general.php:24
    138 msgid "General Settings"
    139 msgstr "Ajustes Generales"
    140 
    141 #: admin/tabs/general.php:25
    142 msgid "Control the default values and labels used in the mortgage calculator."
    143 msgstr ""
    144 "Controla los valores predeterminados y las etiquetas utilizadas en la "
    145 "calculadora hipotecaria."
    146 
    147 #: admin/tabs/general.php:27
     140#: admin/tabs/general.php:11
    148141msgid "Default Loan Amount"
    149142msgstr "Monto de préstamo predeterminado"
    150143
    151 #: admin/tabs/general.php:28
     144#: admin/tabs/general.php:12
    152145msgid "The starting loan amount shown in the calculator."
    153146msgstr "El monto inicial del préstamo que se muestra en la calculadora."
    154147
    155 #: admin/tabs/general.php:30
     148#: admin/tabs/general.php:13
    156149msgid "Default Interest Rate (%)"
    157150msgstr "Tasa de interés predeterminada (%)"
    158151
    159 #: admin/tabs/general.php:31
     152#: admin/tabs/general.php:14
    160153msgid "The default yearly interest rate."
    161154msgstr "La tasa de interés anual predeterminada."
    162155
    163 #: admin/tabs/general.php:33
     156#: admin/tabs/general.php:15
    164157msgid "Default Term (Years)"
    165158msgstr "Plazo predeterminado (Años)"
    166159
    167 #: admin/tabs/general.php:34
     160#: admin/tabs/general.php:16
    168161msgid "The default loan term in years."
    169162msgstr "El plazo predeterminado del préstamo en años."
    170163
    171 #: admin/tabs/general.php:36
     164#: admin/tabs/general.php:17
    172165msgid "Cleanup on Uninstall"
    173166msgstr "Eliminar datos al desinstalar"
    174167
    175 #: admin/tabs/general.php:37
     168#: admin/tabs/general.php:18
    176169msgid "Delete all plugin data when uninstalling"
    177170msgstr "Eliminar todos los datos del plugin al desinstalar"
    178171
    179 #: admin/tabs/general.php:38
     172#: admin/tabs/general.php:19
    180173msgid ""
    181174"If enabled, all EHMC settings will be permanently removed when the plugin is "
     
    185178"desinstalar el plugin."
    186179
    187 #: admin/tabs/shortcode.php:3
     180#: admin/tabs/shortcode.php:4
    188181msgid ""
    189182"Use this shortcode to display the mortgage calculator anywhere on your site."
     
    204197msgstr "Pega este shortcode en cualquier página, entrada o widget."
    205198
     199#: admin/tabs/shortcode.php:8
     200msgid "Copy shortcode to clipboard"
     201msgstr "Copiar shortcode al portapapeles"
     202
    206203#: admin/tabs/shortcode.php:9
    207204msgid "Example Usage"
     
    213210"No se requiere ningún atributo; la calculadora utiliza los ajustes guardados."
    214211
    215 #: admin/tabs/styling.php:8
     212#: admin/tabs/styling.php:3
    216213msgid "Styling Options"
    217214msgstr "Opciones de Estilo"
    218215
    219 #: admin/tabs/styling.php:9
     216#: admin/tabs/styling.php:4
    220217msgid "Customize the appearance of the mortgage calculator on the frontend."
    221218msgstr ""
    222219"Personaliza la apariencia de la calculadora hipotecaria en la página pública."
    223220
    224 #: admin/tabs/styling.php:11
     221#: admin/tabs/styling.php:5
    225222msgid "Primary Color"
    226223msgstr "Color principal"
    227224
    228 #: admin/tabs/styling.php:12
     225#: admin/tabs/styling.php:6
    229226msgid "Used for highlights and accents."
    230227msgstr "Se utiliza para resaltar y acentuar."
    231228
    232 #: admin/tabs/styling.php:14
     229#: admin/tabs/styling.php:7
    233230msgid "Calculate Button Color"
    234231msgstr "Color del botón Calcular"
    235232
    236 #: admin/tabs/styling.php:15
     233#: admin/tabs/styling.php:8
    237234msgid "Color of the Calculate button."
    238235msgstr "Color para el botón Calcular."
    239236
    240 #: admin/tabs/styling.php:17
     237#: admin/tabs/styling.php:9
    241238msgid "Reset Button Color"
    242239msgstr "Color del botón Restablecer"
    243240
    244 #: admin/tabs/styling.php:18
     241#: admin/tabs/styling.php:10
    245242msgid "Color of the Reset button."
    246243msgstr "Color para el botón Restablecer."
    247244
    248 #: admin/tabs/styling.php:20
     245#: admin/tabs/styling.php:11
    249246msgid "Table Header Color"
    250247msgstr "Color del encabezado de la tabla"
    251248
    252 #: admin/tabs/styling.php:21
     249#: admin/tabs/styling.php:12
    253250msgid "Background color for the amortization table header."
    254251msgstr "Color de fondo para el encabezado de la tabla de amortización."
    255252
    256 #: admin/tabs/styling.php:23
     253#: admin/tabs/styling.php:13
    257254msgid "Border Radius"
    258255msgstr "Radio del borde"
    259256
    260 #: admin/tabs/styling.php:25
     257#: admin/tabs/styling.php:15
    261258msgid "None"
    262259msgstr "Ninguno"
    263260
    264 #: admin/tabs/styling.php:26
     261#: admin/tabs/styling.php:16
    265262msgid "Small (4px)"
    266263msgstr "Pequeño (4px)"
    267264
    268 #: admin/tabs/styling.php:27
     265#: admin/tabs/styling.php:17
    269266msgid "Medium (8px)"
    270267msgstr "Mediano (8px)"
    271268
    272 #: admin/tabs/styling.php:28
     269#: admin/tabs/styling.php:18
    273270msgid "Large (12px)"
    274271msgstr "Grande (12px)"
    275272
    276 #: admin/tabs/styling.php:30
     273#: admin/tabs/styling.php:20
    277274msgid "Controls the roundness of input fields, buttons, and cards."
    278275msgstr "Controla el redondeo de los campos de entrada, botones y tarjetas."
    279276
    280 #: includes/class-ehmc-admin.php:11
    281 msgid "Mortgage"
    282 msgstr "Hipoteca"
    283 
    284 #: includes/class-ehmc-assets.php:40 templates/calculator.php:27
     277#: includes/class-ehmc-admin.php:14
     278msgid "Mortgage Calculator"
     279msgstr "Calculadora de hipoteca"
     280
     281#: includes/class-ehmc-admin.php:33
     282msgid "Calculate"
     283msgstr "Calcular"
     284
     285#: includes/class-ehmc-admin.php:34
     286msgid "Reset"
     287msgstr "Restablecer"
     288
     289#: includes/class-ehmc-assets.php:40 templates/calculator.php:22
    285290msgid "Principal"
    286291msgstr "Principal"
    287292
    288 #: includes/class-ehmc-assets.php:41 templates/calculator.php:28
     293#: includes/class-ehmc-assets.php:41 templates/calculator.php:23
    289294msgid "Interest"
    290295msgstr "Interés"
    291296
    292 #: includes/class-ehmc-assets.php:43
     297#: includes/class-ehmc-assets.php:42
    293298msgid "Monthly Payment"
    294299msgstr "Pago Mensual"
    295300
    296 #: includes/class-ehmc-assets.php:44
     301#: includes/class-ehmc-assets.php:43
    297302msgid "Total Interest"
    298303msgstr "Interés Total"
    299304
    300 #: includes/class-ehmc-assets.php:45
     305#: includes/class-ehmc-assets.php:44
    301306msgid "Total Paid"
    302307msgstr "Total Pagado"
     
    306311msgstr "Este bloque mostrará la calculadora en el sitio web."
    307312
     313#: templates/calculator.php:9
     314msgid "Please enter an amount between 10,000 and 20,000,000"
     315msgstr "Por favor, introduzca una cantidad entre 10.000 y 20.000.000"
     316
    308317#: templates/calculator.php:10
    309 msgid "Please enter a loan amount, e.g. \"40,000\", \"50,000.23\""
    310 msgstr "Por favor, ingresa un monto de préstamo, ej. \"40.000\", \"50.000.23\""
    311 
    312 #: templates/calculator.php:12
     318msgid "Please enter a number between 1 and 25, e.g. \"5\", \"5.5\", \"5.75\""
     319msgstr ""
     320"Por favor, ingresa un número entre 1 y 25, ej. \"5\", \"5,5\", \"5,75\""
     321
     322#: templates/calculator.php:11
     323msgid "Please enter a number between 1 and 45: no decimals allowed"
     324msgstr "Por favor, ingresa un número entre 1 y 45: no se permiten decimales"
     325
     326#: templates/calculator.php:13
    313327msgid "Yearly Interest"
    314328msgstr "Interés Anual"
    315329
    316 #: templates/calculator.php:13
    317 msgid "Please enter a number between 1 and 25, e.g. \"5\", \"5.5\", \"5.75\""
    318 msgstr ""
    319 "Por favor, ingresa un número entre 1 y 25, ej. \"5\", \"5,5\", \"5,75\""
    320 
    321 #: templates/calculator.php:15
     330#: templates/calculator.php:14
    322331msgid "Number of years"
    323332msgstr "Número de años"
    324333
    325 #: templates/calculator.php:16
    326 msgid "Please enter a number between 1 and 45: no decimals allowed"
    327 msgstr "Por favor, ingresa un número entre 1 y 45: no se permiten decimales"
    328 
    329 #: templates/calculator.php:22
     334#: templates/calculator.php:17
    330335msgid "Payment Breakdown"
    331336msgstr "Desglose del Pago"
    332337
    333 #: templates/calculator.php:23
     338#: templates/calculator.php:18
    334339msgid "Summary"
    335340msgstr "Resumen"
    336341
    337 #: templates/calculator.php:26
     342#: templates/calculator.php:21
    338343msgid "Payment"
    339344msgstr "Pago"
    340345
    341 #: templates/calculator.php:29
     346#: templates/calculator.php:24
    342347msgid "Balance"
    343348msgstr "Saldo"
    344349
    345 #: templates/calculator.php:31
     350#: templates/calculator.php:25
    346351msgid "Amortization results pages"
    347352msgstr "Páginas de resultados de amortización"
    348353
    349 #: assets/js/modules/EHMortgageCalculator.js:226
     354#: assets/js/modules/EHMortgageCalculator.js:236
    350355msgid "Previous"
    351356msgstr "Anterior"
    352357
    353 #: assets/js/modules/EHMortgageCalculator.js:256
     358#: assets/js/modules/EHMortgageCalculator.js:266
    354359msgid "Next"
    355360msgstr "Siguiente"
     
    380385msgstr "préstamo"
    381386
     387#~ msgid "Mortgage"
     388#~ msgstr "Hipoteca"
     389
    382390#~ msgid "Loan amount:"
    383391#~ msgstr "Monto del Préstamo:"
  • eh-mortgage-calculator/tags/3.1.0/languages/eh-mortgage-calculator.pot

    r3441255 r3441776  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: EH Mortgage Calculator 3.0.0\n"
     5"Project-Id-Version: EH Mortgage Calculator 3.1.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/eh-mortgage-calculator\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2026-01-16T20:00:18+00:00\n"
     12"POT-Creation-Date: 2026-01-18T05:30:23+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.12.0\n"
     
    3131
    3232#: admin/settings-page.php:2
    33 #: includes/class-ehmc-admin.php:10
     33#: includes/class-ehmc-admin.php:13
    3434msgid "Mortgage Calculator Settings"
    3535msgstr ""
     
    4848
    4949#: admin/settings-page.php:6
    50 #: admin/tabs/shortcode.php:2
     50#: admin/tabs/shortcode.php:3
    5151msgid "Shortcode"
    5252msgstr ""
     
    5656msgstr ""
    5757
     58#: admin/tabs/display.php:3
     59msgid "Display Options"
     60msgstr ""
     61
     62#: admin/tabs/display.php:4
     63msgid "Choose which elements of the calculator should be visible on the frontend."
     64msgstr ""
     65
     66#: admin/tabs/display.php:5
     67msgid "Show Summary Box"
     68msgstr ""
     69
    5870#: admin/tabs/display.php:6
    59 msgid "Display Options"
     71msgid "Enable summary section (monthly payment, total interest, total cost)"
    6072msgstr ""
    6173
    6274#: admin/tabs/display.php:7
    63 msgid "Choose which elements of the calculator should be visible on the frontend."
     75msgid "Show Amortization Table"
     76msgstr ""
     77
     78#: admin/tabs/display.php:8
     79msgid "Display full amortization schedule"
    6480msgstr ""
    6581
    6682#: admin/tabs/display.php:9
    67 msgid "Show Summary Box"
     83msgid "Show Chart"
    6884msgstr ""
    6985
    7086#: admin/tabs/display.php:10
    71 msgid "Enable summary section (monthly payment, total interest, total cost)"
    72 msgstr ""
    73 
    74 #: admin/tabs/display.php:12
    75 msgid "Show Amortization Table"
    76 msgstr ""
    77 
    78 #: admin/tabs/display.php:13
    79 msgid "Display full amortization schedule"
    80 msgstr ""
    81 
    82 #: admin/tabs/display.php:15
    83 msgid "Show Chart"
    84 msgstr ""
    85 
    86 #: admin/tabs/display.php:16
    8787msgid "Display a visual chart"
    8888msgstr ""
    8989
    90 #: admin/tabs/display.php:17
     90#: admin/tabs/display.php:11
    9191msgid "A simple doughnut chart that visualizes the breakdown of principal and interest."
    9292msgstr ""
    9393
     94#: admin/tabs/general.php:3
     95msgid "General Settings"
     96msgstr ""
     97
     98#: admin/tabs/general.php:4
     99msgid "Control the default values and labels used in the mortgage calculator."
     100msgstr ""
     101
     102#: admin/tabs/general.php:5
     103msgid "Label"
     104msgstr ""
     105
     106#: admin/tabs/general.php:6
     107msgid "Calculate Button"
     108msgstr ""
     109
    94110#: admin/tabs/general.php:7
    95 msgid "Label"
     111msgid "Reset Button"
     112msgstr ""
     113
     114#: admin/tabs/general.php:8
     115#: includes/class-ehmc-admin.php:30
     116#: templates/calculator.php:12
     117msgid "Loan Amount"
    96118msgstr ""
    97119
    98120#: admin/tabs/general.php:9
    99 msgid "Calculate Button"
     121#: includes/class-ehmc-admin.php:31
     122msgid "Interest Rate"
    100123msgstr ""
    101124
    102125#: admin/tabs/general.php:10
    103 msgid "Reset Button"
     126#: includes/class-ehmc-admin.php:32
     127msgid "Years"
     128msgstr ""
     129
     130#: admin/tabs/general.php:11
     131msgid "Default Loan Amount"
    104132msgstr ""
    105133
    106134#: admin/tabs/general.php:12
    107 #: templates/calculator.php:9
    108 msgid "Loan Amount"
     135msgid "The starting loan amount shown in the calculator."
    109136msgstr ""
    110137
    111138#: admin/tabs/general.php:13
    112 msgid "Interest Rate"
     139msgid "Default Interest Rate (%)"
    113140msgstr ""
    114141
    115142#: admin/tabs/general.php:14
    116 msgid "Years"
     143msgid "The default yearly interest rate."
    117144msgstr ""
    118145
    119146#: admin/tabs/general.php:15
    120 msgid "Calculate"
     147msgid "Default Term (Years)"
    121148msgstr ""
    122149
    123150#: admin/tabs/general.php:16
    124 msgid "Reset"
    125 msgstr ""
    126 
    127 #: admin/tabs/general.php:24
    128 msgid "General Settings"
    129 msgstr ""
    130 
    131 #: admin/tabs/general.php:25
    132 msgid "Control the default values and labels used in the mortgage calculator."
    133 msgstr ""
    134 
    135 #: admin/tabs/general.php:27
    136 msgid "Default Loan Amount"
    137 msgstr ""
    138 
    139 #: admin/tabs/general.php:28
    140 msgid "The starting loan amount shown in the calculator."
    141 msgstr ""
    142 
    143 #: admin/tabs/general.php:30
    144 msgid "Default Interest Rate (%)"
    145 msgstr ""
    146 
    147 #: admin/tabs/general.php:31
    148 msgid "The default yearly interest rate."
    149 msgstr ""
    150 
    151 #: admin/tabs/general.php:33
    152 msgid "Default Term (Years)"
    153 msgstr ""
    154 
    155 #: admin/tabs/general.php:34
    156151msgid "The default loan term in years."
    157152msgstr ""
    158153
    159 #: admin/tabs/general.php:36
     154#: admin/tabs/general.php:17
    160155msgid "Cleanup on Uninstall"
    161156msgstr ""
    162157
    163 #: admin/tabs/general.php:37
     158#: admin/tabs/general.php:18
    164159msgid "Delete all plugin data when uninstalling"
    165160msgstr ""
    166161
    167 #: admin/tabs/general.php:38
     162#: admin/tabs/general.php:19
    168163msgid "If enabled, all EHMC settings will be permanently removed when the plugin is deleted."
    169164msgstr ""
    170165
    171 #: admin/tabs/shortcode.php:3
     166#: admin/tabs/shortcode.php:4
    172167msgid "Use this shortcode to display the mortgage calculator anywhere on your site."
    173168msgstr ""
     
    185180msgstr ""
    186181
     182#: admin/tabs/shortcode.php:8
     183msgid "Copy shortcode to clipboard"
     184msgstr ""
     185
    187186#: admin/tabs/shortcode.php:9
    188187msgid "Example Usage"
     
    193192msgstr ""
    194193
     194#: admin/tabs/styling.php:3
     195msgid "Styling Options"
     196msgstr ""
     197
     198#: admin/tabs/styling.php:4
     199msgid "Customize the appearance of the mortgage calculator on the frontend."
     200msgstr ""
     201
     202#: admin/tabs/styling.php:5
     203msgid "Primary Color"
     204msgstr ""
     205
     206#: admin/tabs/styling.php:6
     207msgid "Used for highlights and accents."
     208msgstr ""
     209
     210#: admin/tabs/styling.php:7
     211msgid "Calculate Button Color"
     212msgstr ""
     213
    195214#: admin/tabs/styling.php:8
    196 msgid "Styling Options"
     215msgid "Color of the Calculate button."
    197216msgstr ""
    198217
    199218#: admin/tabs/styling.php:9
    200 msgid "Customize the appearance of the mortgage calculator on the frontend."
     219msgid "Reset Button Color"
     220msgstr ""
     221
     222#: admin/tabs/styling.php:10
     223msgid "Color of the Reset button."
    201224msgstr ""
    202225
    203226#: admin/tabs/styling.php:11
    204 msgid "Primary Color"
     227msgid "Table Header Color"
    205228msgstr ""
    206229
    207230#: admin/tabs/styling.php:12
    208 msgid "Used for highlights and accents."
    209 msgstr ""
    210 
    211 #: admin/tabs/styling.php:14
    212 msgid "Calculate Button Color"
     231msgid "Background color for the amortization table header."
     232msgstr ""
     233
     234#: admin/tabs/styling.php:13
     235msgid "Border Radius"
    213236msgstr ""
    214237
    215238#: admin/tabs/styling.php:15
    216 msgid "Color of the Calculate button."
     239msgid "None"
     240msgstr ""
     241
     242#: admin/tabs/styling.php:16
     243msgid "Small (4px)"
    217244msgstr ""
    218245
    219246#: admin/tabs/styling.php:17
    220 msgid "Reset Button Color"
     247msgid "Medium (8px)"
    221248msgstr ""
    222249
    223250#: admin/tabs/styling.php:18
    224 msgid "Color of the Reset button."
     251msgid "Large (12px)"
    225252msgstr ""
    226253
    227254#: admin/tabs/styling.php:20
    228 msgid "Table Header Color"
    229 msgstr ""
    230 
    231 #: admin/tabs/styling.php:21
    232 msgid "Background color for the amortization table header."
    233 msgstr ""
    234 
    235 #: admin/tabs/styling.php:23
    236 msgid "Border Radius"
    237 msgstr ""
    238 
    239 #: admin/tabs/styling.php:25
    240 msgid "None"
    241 msgstr ""
    242 
    243 #: admin/tabs/styling.php:26
    244 msgid "Small (4px)"
    245 msgstr ""
    246 
    247 #: admin/tabs/styling.php:27
    248 msgid "Medium (8px)"
    249 msgstr ""
    250 
    251 #: admin/tabs/styling.php:28
    252 msgid "Large (12px)"
    253 msgstr ""
    254 
    255 #: admin/tabs/styling.php:30
    256255msgid "Controls the roundness of input fields, buttons, and cards."
    257256msgstr ""
    258257
    259 #: includes/class-ehmc-admin.php:11
    260 msgid "Mortgage"
     258#: includes/class-ehmc-admin.php:14
     259msgid "Mortgage Calculator"
     260msgstr ""
     261
     262#: includes/class-ehmc-admin.php:33
     263msgid "Calculate"
     264msgstr ""
     265
     266#: includes/class-ehmc-admin.php:34
     267msgid "Reset"
    261268msgstr ""
    262269
    263270#: includes/class-ehmc-assets.php:40
    264 #: templates/calculator.php:27
     271#: templates/calculator.php:22
    265272msgid "Principal"
    266273msgstr ""
    267274
    268275#: includes/class-ehmc-assets.php:41
    269 #: templates/calculator.php:28
     276#: templates/calculator.php:23
    270277msgid "Interest"
    271278msgstr ""
    272279
     280#: includes/class-ehmc-assets.php:42
     281msgid "Monthly Payment"
     282msgstr ""
     283
    273284#: includes/class-ehmc-assets.php:43
    274 msgid "Monthly Payment"
     285msgid "Total Interest"
    275286msgstr ""
    276287
    277288#: includes/class-ehmc-assets.php:44
    278 msgid "Total Interest"
    279 msgstr ""
    280 
    281 #: includes/class-ehmc-assets.php:45
    282289msgid "Total Paid"
    283290msgstr ""
     
    287294msgstr ""
    288295
     296#: templates/calculator.php:9
     297msgid "Please enter an amount between 10,000 and 20,000,000"
     298msgstr ""
     299
    289300#: templates/calculator.php:10
    290 msgid "Please enter a loan amount, e.g. \"40,000\", \"50,000.23\""
    291 msgstr ""
    292 
    293 #: templates/calculator.php:12
     301msgid "Please enter a number between 1 and 25, e.g. \"5\", \"5.5\", \"5.75\""
     302msgstr ""
     303
     304#: templates/calculator.php:11
     305msgid "Please enter a number between 1 and 45: no decimals allowed"
     306msgstr ""
     307
     308#: templates/calculator.php:13
    294309msgid "Yearly Interest"
    295310msgstr ""
    296311
    297 #: templates/calculator.php:13
    298 msgid "Please enter a number between 1 and 25, e.g. \"5\", \"5.5\", \"5.75\""
    299 msgstr ""
    300 
    301 #: templates/calculator.php:15
     312#: templates/calculator.php:14
    302313msgid "Number of years"
    303314msgstr ""
    304315
    305 #: templates/calculator.php:16
    306 msgid "Please enter a number between 1 and 45: no decimals allowed"
    307 msgstr ""
    308 
    309 #: templates/calculator.php:22
     316#: templates/calculator.php:17
    310317msgid "Payment Breakdown"
    311318msgstr ""
    312319
    313 #: templates/calculator.php:23
     320#: templates/calculator.php:18
    314321msgid "Summary"
    315322msgstr ""
    316323
    317 #: templates/calculator.php:26
     324#: templates/calculator.php:21
    318325msgid "Payment"
    319326msgstr ""
    320327
    321 #: templates/calculator.php:29
     328#: templates/calculator.php:24
    322329msgid "Balance"
    323330msgstr ""
    324331
    325 #: templates/calculator.php:31
     332#: templates/calculator.php:25
    326333msgid "Amortization results pages"
    327334msgstr ""
    328335
    329 #: assets/js/modules/EHMortgageCalculator.js:226
     336#: assets/js/modules/EHMortgageCalculator.js:236
    330337msgid "Previous"
    331338msgstr ""
    332339
    333 #: assets/js/modules/EHMortgageCalculator.js:256
     340#: assets/js/modules/EHMortgageCalculator.js:266
    334341msgid "Next"
    335342msgstr ""
  • eh-mortgage-calculator/tags/3.1.0/templates/calculator.php

    r3441255 r3441776  
    77
    88// Form
    9 $loan_amount_placeholder = esc_attr__( 'Loan Amount', 'eh-mortgage-calculator' );
    10 $loan_amount_error       = esc_html__( 'Please enter a loan amount, e.g. "40,000", "50,000.23"', 'eh-mortgage-calculator' );
    11 
    12 $interest_placeholder    = esc_attr__( 'Yearly Interest', 'eh-mortgage-calculator' );
    13 $interest_error          = esc_html__( 'Please enter a number between 1 and 25, e.g. "5", "5.5", "5.75"', 'eh-mortgage-calculator' );
    14 
    15 $term_placeholder        = esc_attr__( 'Number of years', 'eh-mortgage-calculator' );
    16 $term_error              = esc_html__( 'Please enter a number between 1 and 45: no decimals allowed', 'eh-mortgage-calculator' );
    17 
    18 $calculate_aria_label    = esc_attr( $calculate );
    19 $reset_aria_label        = esc_attr( $reset );
     9$loan_amount_error       = __( 'Please enter an amount between 10,000 and 20,000,000', 'eh-mortgage-calculator' );
     10$interest_error          = __( 'Please enter a number between 1 and 25, e.g. "5", "5.5", "5.75"', 'eh-mortgage-calculator' );
     11$term_error              = __( 'Please enter a number between 1 and 45: no decimals allowed', 'eh-mortgage-calculator' );
     12$loan_amount_placeholder = __( 'Loan Amount', 'eh-mortgage-calculator' );
     13$interest_placeholder    = __( 'Yearly Interest', 'eh-mortgage-calculator' );
     14$term_placeholder        = __( 'Number of years', 'eh-mortgage-calculator' );
    2015
    2116// Chart Box
    22 $chart_title   = esc_attr__( 'Payment Breakdown', 'eh-mortgage-calculator' );
    23 $summary_title = esc_attr__( 'Summary', 'eh-mortgage-calculator' );
     17$chart_title             = __( 'Payment Breakdown', 'eh-mortgage-calculator' );
     18$summary_title           = __( 'Summary', 'eh-mortgage-calculator' );
    2419
    2520// Table
    26 $payment_label   = esc_html__( 'Payment', 'eh-mortgage-calculator' );
    27 $principal_label = esc_html__( 'Principal', 'eh-mortgage-calculator' );
    28 $interest_label  = esc_html__( 'Interest', 'eh-mortgage-calculator' );
    29 $balance_label   = esc_html__( 'Balance', 'eh-mortgage-calculator' );
     21$payment_label           = __( 'Payment', 'eh-mortgage-calculator' );
     22$principal_label         = __( 'Principal', 'eh-mortgage-calculator' );
     23$interest_label          = __( 'Interest', 'eh-mortgage-calculator' );
     24$balance_label           = __( 'Balance', 'eh-mortgage-calculator' );
     25$results_aria_label      = __( 'Amortization results pages', 'eh-mortgage-calculator' );
    3026
    31 $results_aria_label = esc_attr__( 'Amortization results pages', 'eh-mortgage-calculator' );
    32 
    33 ####################################
    3427// Load saved settings
    35 $default_amount   = get_option('ehmc_default_amount', '300000');
    36 $default_interest = get_option('ehmc_default_interest', '6.5');
    37 $default_years    = get_option('ehmc_default_years', '30');
     28$default_amount         = get_option('ehmc_default_amount', '300000');
     29$default_interest       = get_option('ehmc_default_interest', '6.5');
     30$default_years          = get_option('ehmc_default_years', '30');
    3831
    3932$label_amount           = get_option('ehmc_label_amount', 'Loan Amount');
     
    4336$label_button_reset     = get_option('ehmc_label_button_reset', 'Reset');
    4437
    45 $show_summary     = get_option('ehmc_show_summary', '1');
    46 $show_table       = get_option('ehmc_show_table', '1');
    47 $show_chart       = get_option('ehmc_show_chart', '0');
     38$show_summary           = get_option('ehmc_show_summary', '1');
     39$show_table             = get_option('ehmc_show_table', '1');
     40$show_chart             = get_option('ehmc_show_chart', '0');
    4841
    4942$primary_color          = get_option('ehmc_primary_color', '#2271b1');
     
    5245$table_header_color     = get_option('ehmc_table_header_color', '#f1f1f1');
    5346$border_radius          = get_option('ehmc_border_radius', 'medium');
    54 
    5547?>
    5648
     
    6658        <div class="mb-3" id="principal-group-<?= esc_attr( $instance ); ?>">
    6759            <label class="form-label" for="principal-<?= esc_attr( $instance ); ?>"><?= esc_html( $label_amount ); ?></label>
    68             <input type="number" class="form-control" id="principal-<?= esc_attr( $instance ); ?>"
    69                    min="10000" max="1000000" step="1000" value="<?= esc_attr( $default_amount ); ?>"
    70                    placeholder="<?= $loan_amount_placeholder ?>" autofocus />
    71             <p class="invalid-feedback" id="principal-error-<?= esc_attr( $instance ); ?>"><?= $loan_amount_error ?></p>
     60            <input name="principal" type="number" class="form-control" id="principal-<?= esc_attr( $instance ); ?>"
     61                   min="10000" max="20000000" step="1000" value="<?= esc_attr( $default_amount ); ?>"
     62                   placeholder="<?= esc_attr( $loan_amount_placeholder ) ?>" autofocus />
     63            <p class="invalid-feedback" id="principal-error-<?= esc_attr( $instance ); ?>"><?= esc_html( $loan_amount_error ) ?></p>
    7264        </div>
     65       
    7366        <div class="mb-3" id="interest-group-<?= esc_attr( $instance ); ?>">
    7467            <label class="form-label" for="interest-<?= esc_attr( $instance ); ?>"><?= esc_html( $label_interest ); ?></label>
    75             <input type="number" class="form-control" id="interest-<?= esc_attr( $instance ); ?>"
    76                    min="1" max="25" value="<?= esc_attr( $default_interest ); ?>"
    77                    placeholder="<?= $interest_placeholder ?>" />
    78             <p class="invalid-feedback" id="interest-error-<?= esc_attr( $instance ); ?>"><?= $interest_error ?></p>
     68            <input name="interest" type="number" class="form-control" id="interest-<?= esc_attr( $instance ); ?>"
     69                   min="1" max="25" step="0.01" value="<?= esc_attr( $default_interest ); ?>"
     70                   placeholder="<?= esc_attr( $interest_placeholder ) ?>" />
     71            <p class="invalid-feedback" id="interest-error-<?= esc_attr( $instance ); ?>"><?= esc_html( $interest_error ) ?></p>
    7972        </div>
     73       
    8074        <div class="mb-3" id="term-group-<?= esc_attr( $instance ); ?>">
    8175            <label class="form-label" for="term-<?= esc_attr( $instance ); ?>"><?= esc_html( $label_years ); ?></label>
    82             <input type="number" class="form-control" id="term-<?= esc_attr( $instance ); ?>"
    83                    min="1" max="45" value="<?= esc_attr( $default_years ); ?>"
    84                    placeholder="<?= $term_placeholder ?>" />
    85             <p class="invalid-feedback" id="term-error-<?= esc_attr( $instance ); ?>"><?= $term_error ?></p>
     76            <input name="term" type="number" class="form-control" id="term-<?= esc_attr( $instance ); ?>"
     77                   min="1" max="45" step="5" value="<?= esc_attr( $default_years ); ?>"
     78                   placeholder="<?= esc_attr( $term_placeholder ) ?>" />
     79            <p class="invalid-feedback" id="term-error-<?= esc_attr( $instance ); ?>"><?= esc_html( $term_error ) ?></p>
    8680        </div>
     81       
    8782        <div class="mb-3 text-center">
    88             <button type="submit" class="btn btn-primary" aria-label="<?= $calculate_aria_label ?>" id="ehmc-submit-<?= esc_attr( $instance ); ?>">
     83            <button type="submit" class="btn btn-primary" aria-label="<?= esc_attr( $label_button_calculate ) ?>" id="ehmc-submit-<?= esc_attr( $instance ); ?>">
    8984                  <?= esc_html( $label_button_calculate ); ?>
    9085            </button>
    91             <button type="reset" class="btn btn-secondary" aria-label="<?= $reset_aria_label ?>" id="ehmc-reset-<?= esc_attr( $instance ); ?>">
     86            <button type="reset" class="btn btn-secondary" aria-label="<?= esc_attr( $label_button_reset ) ?>" id="ehmc-reset-<?= esc_attr( $instance ); ?>">
    9287                  <?= esc_html( $label_button_reset ); ?>
    9388            </button>
     
    10095            <div class="ehmc-summary-box card h-100" id="ehmc-summary-<?= esc_attr($instance); ?>" hidden>
    10196                <div class="card-body">
    102                     <h5 class="card-title"><?= $summary_title ?></h5>
    103                     <p class="ehmc-summary-payment mb-1"></p>
    104                     <p class="ehmc-summary-total-interest mb-1"></p>
    105                     <p class="ehmc-summary-total-paid mb-0"></p>
     97                    <h5 class="card-title"><?= esc_html( $summary_title ) ?></h5>
     98                    <p class="ehmc-summary-payment mb-1" aria-live="polite"></p>
     99                    <p class="ehmc-summary-total-interest mb-1" aria-live="polite"></p>
     100                    <p class="ehmc-summary-total-paid mb-0" aria-live="polite"></p>
    106101                </div>
    107102            </div>
     
    113108            <div class="ehmc-chart-card card h-100" id="ehmc-chart-card-<?= esc_attr($instance); ?>" hidden>
    114109                <div class="card-body">
    115                     <h5 class="card-title text-center"><?= $chart_title ?></h5>
     110                    <h5 class="card-title text-center"><?= esc_html( $chart_title ) ?></h5>
    116111                    <div class="chart-wrapper">
    117112                    <canvas id="ehmc-chart-<?= esc_attr($instance); ?>"></canvas>
     
    123118    <?php endif; ?>
    124119    <?php if ( $show_table === '1' ) : ?>
    125     <!<!-- Table area -->
     120    <!-- Table area -->
    126121    <table class="table table-striped ehmc-table" id="table-<?= esc_attr( $instance ); ?>">
    127122      <thead>
    128123          <tr>
    129124              <th class="text-right">#</th>
    130               <th class="text-right"><?= $payment_label ?></th>
    131               <th class="text-right"><?= $principal_label ?></th>
    132               <th class="text-right"><?= $interest_label ?></th>
    133               <th class="text-right"><?= $balance_label ?></th>
     125              <th class="text-right"><?= esc_html( $payment_label ) ?></th>
     126              <th class="text-right"><?= esc_html( $principal_label ) ?></th>
     127              <th class="text-right"><?= esc_html( $interest_label ) ?></th>
     128              <th class="text-right"><?= esc_html( $balance_label ) ?></th>
    134129          </tr>
    135130      </thead>
     
    137132          <tr>
    138133              <td colspan="5">
    139                   <nav aria-label="<?= $results_aria_label ?>">
     134                  <nav aria-label="<?= esc_attr( $results_aria_label ) ?>">
    140135                      <ul class="ehmc-pagination pagination justify-content-center flex-wrap" id="pagination-<?= esc_attr( $instance ); ?>"></ul>
    141136                  </nav>
     
    143138          </tr>
    144139      </tfoot>
    145       <tbody id="amortization-<?= esc_attr( $instance ); ?>"></tbody>
     140      <tbody id="amortization-<?= esc_attr( $instance ); ?>" aria-live="polite"></tbody>
    146141    </table>
    147142    <?php endif; ?>
  • eh-mortgage-calculator/tags/3.1.0/uninstall.php

    r3441255 r3441776  
    88}
    99
     10// Only delete data if the user opted in
    1011if ( get_option('ehmc_delete_data_on_uninstall') !== '1' ) {
    1112    return;
     
    2930    'ehmc_show_table',
    3031    'ehmc_show_chart',
     32    // Delete the uninstall flag itself
     33    'ehmc_delete_data_on_uninstall'
    3134];
    3235
     
    3538    delete_option( $setting );
    3639}
     40
     41// Optional: multisite cleanup
     42if ( is_multisite() ) {
     43    foreach ( $settings as $setting ) {
     44        delete_site_option( $setting );
     45    }
     46}
  • eh-mortgage-calculator/trunk/admin/admin-styles.css

    r3441254 r3441776  
    3232    display: block;
    3333}
     34
     35.fw-bold {
     36    font-weight: 600;
     37}
  • eh-mortgage-calculator/trunk/admin/tabs/display.php

    r3441254 r3441776  
    11<?php
    2 $show_summary = get_option('ehmc_show_summary', '1');
    3 $show_table   = get_option('ehmc_show_table', '1');
    4 $show_chart   = get_option('ehmc_show_chart', '0');
     2// Translations
     3$title              = __( 'Display Options', 'eh-mortgage-calculator' );
     4$description        = __( 'Choose which elements of the calculator should be visible on the frontend.', 'eh-mortgage-calculator' );
     5$summary_scope      = __( 'Show Summary Box', 'eh-mortgage-calculator' );
     6$summary_label      = __( 'Enable summary section (monthly payment, total interest, total cost)', 'eh-mortgage-calculator' );
     7$amortization_scope = __( 'Show Amortization Table', 'eh-mortgage-calculator' );
     8$amortization_label = __( 'Display full amortization schedule', 'eh-mortgage-calculator' );
     9$chart_scope        = __( 'Show Chart', 'eh-mortgage-calculator' );
     10$chart_label        = __( 'Display a visual chart', 'eh-mortgage-calculator' );
     11$chart_description  = __( 'A simple doughnut chart that visualizes the breakdown of principal and interest.', 'eh-mortgage-calculator' );
    512
    6 $title         = esc_html__( 'Display Options', 'eh-mortgage-calculator' );
    7 $description   = esc_html__( 'Choose which elements of the calculator should be visible on the frontend.', 'eh-mortgage-calculator' );
    8 
    9 $summary_scope   = esc_html__( 'Show Summary Box', 'eh-mortgage-calculator' );
    10 $summary_label   = esc_html__( 'Enable summary section (monthly payment, total interest, total cost)', 'eh-mortgage-calculator' );
    11 
    12 $amortization_scope = esc_html__( 'Show Amortization Table', 'eh-mortgage-calculator' );
    13 $amortization_label = esc_html__( 'Display full amortization schedule', 'eh-mortgage-calculator' );
    14 
    15 $chart_scope       = esc_html__( 'Show Chart', 'eh-mortgage-calculator' );
    16 $chart_label       = esc_html__( 'Display a visual chart', 'eh-mortgage-calculator' );
    17 $chart_description = esc_html__( 'A simple doughnut chart that visualizes the breakdown of principal and interest.', 'eh-mortgage-calculator' );
     13// Fetch saved values (with safe defaults)
     14$show_summary = get_option('ehmc_show_summary');
     15$show_table   = get_option('ehmc_show_table');
     16$show_chart   = get_option('ehmc_show_chart');
    1817?>
    1918
    2019<div class="ehmc-card">
    21     <h2><?= $title ?></h2>
    22     <p class="description"><?= $description ?></p>
     20    <h2><?= esc_html( $title ) ?></h2>
     21    <p class="description"><?= esc_html( $description ) ?></p>
    2322    <table class="form-table">
    2423        <!-- Show Summary Box -->
    2524        <tr>
    26             <th scope="row"><?= $summary_scope ?></th>
     25            <th scope="row"><?= esc_html( $summary_scope ) ?></th>
    2726            <td>
    28                 <label>
    29                     <input type="checkbox" name="ehmc_show_summary" value="1"
     27                <label for="ehmc_show_summary">
     28                    <input type="checkbox" name="ehmc_show_summary" id="ehmc_show_summary" value="1"
    3029                        <?php checked($show_summary, '1'); ?> />
    31                     <?= $summary_label ?>
     30                    <?= esc_html( $summary_label ) ?>
    3231                </label>
    3332            </td>
     
    3534        <!-- Show Amortization Table -->
    3635        <tr>
    37             <th scope="row"><?= $amortization_scope ?></th>
     36            <th scope="row"><?= esc_html( $amortization_scope ) ?></th>
    3837            <td>
    39                 <label>
    40                     <input type="checkbox" name="ehmc_show_table" value="1"
     38                <label for="ehmc_show_table">
     39                    <input type="checkbox" name="ehmc_show_table" id="ehmc_show_table" value="1"
    4140                        <?php checked($show_table, '1'); ?> />
    42                     <?= $amortization_label ?>
     41                    <?= esc_html( $amortization_label ) ?>
    4342                </label>
    4443            </td>
     
    4645        <!-- Show Chart -->
    4746        <tr>
    48             <th scope="row"><?= $chart_scope ?></th>
     47            <th scope="row"><?= esc_html( $chart_scope ) ?></th>
    4948            <td>
    50                 <label>
    51                     <input type="checkbox" name="ehmc_show_chart" value="1"
     49                <label for="ehmc_show_chart" aria-describedby="summary-desc">
     50                    <input type="checkbox" name="ehmc_show_chart" id="ehmc_show_chart" value="1"
    5251                        <?php checked($show_chart, '1'); ?> />
    53                     <?= $chart_label ?>
     52                    <?= esc_html( $chart_label ) ?>
    5453                </label>
    55                 <p class="description"><?= $chart_description ?></p>
     54                <p id="summary-desc" class="description"><?= esc_html( $chart_description ) ?></p>
    5655            </td>
    5756        </tr>
  • eh-mortgage-calculator/trunk/admin/tabs/general.php

    r3441254 r3441776  
    11<?php
     2// Translations
     3$title                    = __( 'General Settings', 'eh-mortgage-calculator' );
     4$description              = __( 'Control the default values and labels used in the mortgage calculator.', 'eh-mortgage-calculator' );
     5$default_label            = __( 'Label', 'eh-mortgage-calculator');
     6$button_calculate_label   = __( 'Calculate Button', 'eh-mortgage-calculator');
     7$button_reset_label       = __( 'Reset Button', 'eh-mortgage-calculator');
     8$default_amount_label     = __( 'Loan Amount', 'eh-mortgage-calculator' );
     9$default_interest_label   = __( 'Interest Rate', 'eh-mortgage-calculator' );
     10$default_years_label      = __( 'Years', 'eh-mortgage-calculator' );
     11$amount_label             = __( 'Default Loan Amount', 'eh-mortgage-calculator' );
     12$amount_description       = __( 'The starting loan amount shown in the calculator.', 'eh-mortgage-calculator' );
     13$interest_label           = __( 'Default Interest Rate (%)', 'eh-mortgage-calculator' );
     14$interest_description     = __( 'The default yearly interest rate.', 'eh-mortgage-calculator' );
     15$term_label               = __( 'Default Term (Years)', 'eh-mortgage-calculator' );
     16$term_description         = __( 'The default loan term in years.', 'eh-mortgage-calculator' );
     17$uninstall_scope          = __( 'Cleanup on Uninstall', 'eh-mortgage-calculator' );
     18$uninstall_label          = __( 'Delete all plugin data when uninstalling', 'eh-mortgage-calculator' );
     19$uninstall_description    = __( 'If enabled, all EHMC settings will be permanently removed when the plugin is deleted.', 'eh-mortgage-calculator' );
     20
    221// Fetch saved values (with safe defaults)
    3 $default_amount   = get_option('ehmc_default_amount', '300000');
    4 $default_interest = get_option('ehmc_default_interest', '6.5');
    5 $default_years    = get_option('ehmc_default_years', '30');
    6 
    7 $default_label            = esc_html__( 'Label', 'eh-mortgage-calculator');
    8 
    9 $button_calculate_label = esc_html__( 'Calculate Button', 'eh-mortgage-calculator');
    10 $button_reset_label     = esc_html__( 'Reset Button', 'eh-mortgage-calculator');
    11 
    12 $default_amount_label     = esc_html__( 'Loan Amount', 'eh-mortgage-calculator' );
    13 $default_interest_label   = esc_html__( 'Interest Rate', 'eh-mortgage-calculator' );
    14 $default_years_label      = esc_html__( 'Years', 'eh-mortgage-calculator' );
    15 $default_button_calculate = esc_html__( 'Calculate', 'eh-mortgage-calculator' );
    16 $default_button_reset     = esc_html__( 'Reset', 'eh-mortgage-calculator' );
    17 
    18 $label_amount             = get_option('ehmc_label_amount', $default_amount_label);
    19 $label_interest           = get_option('ehmc_label_interest', $default_interest_label);
    20 $label_years              = get_option('ehmc_label_years', $default_years_label);
    21 $label_button_calculate   = get_option('ehmc_label_button_calculate', $default_button_calculate);
    22 $label_button_reset       = get_option('ehmc_label_button_reset', $default_button_reset);
    23 
    24 $title         = esc_html__( 'General Settings', 'eh-mortgage-calculator' );
    25 $description   = esc_html__( 'Control the default values and labels used in the mortgage calculator.', 'eh-mortgage-calculator' );
    26 
    27 $amount_label         = esc_html__( 'Default Loan Amount', 'eh-mortgage-calculator' );
    28 $amount_description   = esc_html__( 'The starting loan amount shown in the calculator.', 'eh-mortgage-calculator' );
    29 
    30 $interest_label       = esc_html__( 'Default Interest Rate (%)', 'eh-mortgage-calculator' );
    31 $interest_description = esc_html__( 'The default yearly interest rate.', 'eh-mortgage-calculator' );
    32 
    33 $term_label       = esc_html__( 'Default Term (Years)', 'eh-mortgage-calculator' );
    34 $term_description = esc_html__( 'The default loan term in years.', 'eh-mortgage-calculator' );
    35 
    36 $uninstall_scope       = esc_html__( 'Cleanup on Uninstall', 'eh-mortgage-calculator' );
    37 $uninstall_label       = esc_html__( 'Delete all plugin data when uninstalling', 'eh-mortgage-calculator' );
    38 $uninstall_description = esc_html__( 'If enabled, all EHMC settings will be permanently removed when the plugin is deleted.', 'eh-mortgage-calculator' );
     22$default_amount           = get_option('ehmc_default_amount');
     23$default_interest         = get_option('ehmc_default_interest');
     24$default_years            = get_option('ehmc_default_years');
     25$label_amount             = get_option('ehmc_label_amount');
     26$label_interest           = get_option('ehmc_label_interest');
     27$label_years              = get_option('ehmc_label_years');
     28$label_button_calculate   = get_option('ehmc_label_button_calculate');
     29$label_button_reset       = get_option('ehmc_label_button_reset');
    3930?>
    4031
    4132<div class="ehmc-card">
    42     <h2><?= $title ?></h2>
    43     <p class="description"><?= $description ?></p>
     33    <h2><?= esc_html( $title ) ?></h2>
     34    <p class="description"><?= esc_html( $description ) ?></p>
    4435
    4536    <table class="form-table">
     
    4738        <!-- Default Loan Amount -->
    4839        <tr>
    49             <th scope="row"><label for="ehmc_default_amount"><?= $amount_label ?></label></th>
     40            <th scope="row"><label for="ehmc_default_amount"><?= esc_html( $amount_label ) ?></label></th>
    5041            <td>
    51                 <input type="number" name="ehmc_default_amount" id="ehmc_default_amount"
    52                        value="<?php echo esc_attr($default_amount); ?>"
     42                <input type="number" min="10000" max="20000000" step="1000" name="ehmc_default_amount" id="ehmc_default_amount"
     43                       value="<?php echo esc_attr( $default_amount ); ?>"
    5344                       class="regular-text" />
    54                 <p class="description"><?= $amount_description ?></p>
     45                <p class="description"><?= esc_html( $amount_description ) ?></p>
    5546            </td>
    5647        </tr>
     
    5849        <!-- Default Interest Rate -->
    5950        <tr>
    60             <th scope="row"><label for="ehmc_default_interest"><?= $interest_label ?></label></th>
     51            <th scope="row"><label for="ehmc_default_interest"><?= esc_html( $interest_label ) ?></label></th>
    6152            <td>
    62                 <input type="number" step="0.01" name="ehmc_default_interest" id="ehmc_default_interest"
     53                <input type="number" min="1" max="25" step="0.01" name="ehmc_default_interest" id="ehmc_default_interest"
    6354                       value="<?php echo esc_attr($default_interest); ?>"
    6455                       class="regular-text" />
    65                 <p class="description"><?= $interest_description ?></p>
     56                <p class="description"><?= esc_html( $interest_description ) ?></p>
    6657            </td>
    6758        </tr>
     
    6960        <!-- Default Term -->
    7061        <tr>
    71             <th scope="row"><label for="ehmc_default_years"><?= $term_label ?></label></th>
     62            <th scope="row"><label for="ehmc_default_years"><?= esc_html( $term_label ) ?></label></th>
    7263            <td>
    73                 <input type="number" name="ehmc_default_years" id="ehmc_default_years"
    74                        value="<?php echo esc_attr($default_years); ?>"
     64                <input type="number" min="1" max="45" step="1" name="ehmc_default_years" id="ehmc_default_years"
     65                       value="<?= esc_attr( $default_years ); ?>"
    7566                       class="regular-text" />
    76                 <p class="description"><?= $term_description ?></p>
     67                <p class="description"><?= esc_html( $term_description ) ?></p>
    7768            </td>
    7869        </tr>
     
    8273        <!-- Label: Loan Amount -->
    8374        <tr>
    84             <th scope="row"><label for="ehmc_label_amount"><?= $default_label . ': ' . $default_amount_label ?></label></th>
     75            <th scope="row"><label for="ehmc_label_amount"><?= esc_html( $default_label ) ?>: <?= esc_html( $default_amount_label ) ?></label></th>
    8576            <td>
    8677                <input type="text" name="ehmc_label_amount" id="ehmc_label_amount"
     
    9283        <!-- Label: Interest Rate -->
    9384        <tr>
    94             <th scope="row"><label for="ehmc_label_interest"><?= $default_label . ': ' . $default_interest_label ?></label></th>
     85            <th scope="row"><label for="ehmc_label_interest"><?= esc_html( $default_label ) ?>: <?= esc_html( $default_interest_label ) ?></label></th>
    9586            <td>
    9687                <input type="text" name="ehmc_label_interest" id="ehmc_label_interest"
     
    10293        <!-- Label: Years -->
    10394        <tr>
    104             <th scope="row"><label for="ehmc_label_years"><?= $default_label . ': ' . $default_years_label ?></label></th>
     95            <th scope="row"><label for="ehmc_label_years"><?= esc_html( $default_label ) ?>: <?= esc_html( $default_years_label ) ?></label></th>
    10596            <td>
    10697                <input type="text" name="ehmc_label_years" id="ehmc_label_years"
     
    112103        <!-- Label: Buttons -->
    113104        <tr>
    114             <th scope="row"><label for="ehmc_label_button_calculate"><?= $default_label . ': ' . $button_calculate_label ?></label></th>
     105            <th scope="row"><label for="ehmc_label_button_calculate"><?= esc_html( $default_label ) ?>: <?= esc_html( $button_calculate_label ) ?></label></th>
    115106            <td>
    116107                <input type="text" name="ehmc_label_button_calculate" id="ehmc_label_button_calculate"
    117                        value="<?php echo esc_attr($label_button_calculate); ?>"
     108                       value="<?php echo esc_attr( $label_button_calculate ); ?>"
    118109                       class="regular-text" />
    119110            </td>
    120111        </tr>
    121112        <tr>
    122             <th scope="row"><label for="ehmc_label_button_reset"><?= $default_label . ': ' . $button_reset_label ?></label></th>
     113            <th scope="row"><label for="ehmc_label_button_reset"><?= esc_html( $default_label ) ?>: <?= esc_html( $button_reset_label ) ?></label></th>
    123114            <td>
    124115                <input type="text" name="ehmc_label_button_reset" id="ehmc_label_button_reset"
    125                        value="<?php echo esc_attr($label_button_reset); ?>"
     116                       value="<?php echo esc_attr( $label_button_reset ); ?>"
    126117                       class="regular-text" />
    127118            </td>
     
    130121        <!-- Label: Uninstall -->
    131122        <tr>
    132             <th scope="row"><?= $uninstall_scope ?></th>
     123            <th scope="row"><?= esc_html( $uninstall_scope ) ?></th>
    133124            <td>
    134125                <label>
    135126                    <input type="checkbox" name="ehmc_delete_data_on_uninstall" value="1"
    136127                        <?php checked( get_option('ehmc_delete_data_on_uninstall'), '1' ); ?>>
    137                     <?= $uninstall_label ?>
     128                    <?= esc_html( $uninstall_label ) ?>
    138129                </label>
    139                 <p class="description"><?= $uninstall_description ?></p>
     130                <p class="description"><?= esc_html( $uninstall_description ) ?></p>
    140131            </td>
    141132        </tr>
  • eh-mortgage-calculator/trunk/admin/tabs/shortcode.php

    r3441254 r3441776  
    11<?php
    2 $title         = esc_html__( 'Shortcode', 'eh-mortgage-calculator' );
    3 $description   = esc_html__( 'Use this shortcode to display the mortgage calculator anywhere on your site.', 'eh-mortgage-calculator' );
    4 
    5 $shortcode_scope         = esc_html__('Main Shortcode', 'eh-mortgage-calculator' );
    6 $shortcode_label         = esc_html__( 'Copy', 'eh-mortgage-calculator' );
    7 $shortcode_description   = esc_html__( 'Paste this shortcode into any page, post, or widget.', 'eh-mortgage-calculator' );
    8 
    9 $example_scope         = esc_html__('Example Usage', 'eh-mortgage-calculator' );
    10 $example_description   = esc_html__( 'No attributes are required — the calculator uses your saved settings.', 'eh-mortgage-calculator' );
    11 
     2// Translations
     3$title                 = __( 'Shortcode', 'eh-mortgage-calculator' );
     4$description           = __( 'Use this shortcode to display the mortgage calculator anywhere on your site.', 'eh-mortgage-calculator' );
     5$shortcode_scope       = __( 'Main Shortcode', 'eh-mortgage-calculator' );
     6$shortcode_label       = __( 'Copy', 'eh-mortgage-calculator' );
     7$shortcode_description = __( 'Paste this shortcode into any page, post, or widget.', 'eh-mortgage-calculator' );
     8$shortcode_copy        = __( 'Copy shortcode to clipboard', 'eh-mortgage-calculator' );
     9$example_scope         = __( 'Example Usage', 'eh-mortgage-calculator' );
     10$example_description   = __( 'No attributes are required — the calculator uses your saved settings.', 'eh-mortgage-calculator' );
    1211?>
    1312<div class="ehmc-card">
    14     <h2><?= $title ?></h2>
    15     <p class="description"><?= $description ?></p>
     13    <h2><?= esc_html( $title ) ?></h2>
     14    <p class="description"><?= esc_html( $description ) ?></p>
    1615
    1716    <table class="form-table">
    1817        <tr>
    19             <th scope="row"><?= $shortcode_scope ?></th>
     18            <th scope="row"><?= esc_html( $shortcode_scope ) ?></th>
    2019            <td>
    2120                <input type="text"
    2221                       id="ehmc-shortcode-field"
    23                        class="regular-text"
    24                        value="[eh_mortgage_calculator]"
    25                        readonly
    26                        style="width: 300px; font-weight: 600;" />
     22                       class="regular-text fw-bold"
     23                       value="<?= esc_attr( '[eh_mortgage_calculator]' ) ?>"
     24                       aria-label="<?= esc_attr__( $shortcode_copy ); ?>"
     25                       readonly />
    2726
    2827                <button type="button"
    2928                        class="button"
    3029                        id="ehmc-copy-shortcode">
    31                     <?= $shortcode_label ?>
     30                    <?= esc_html( $shortcode_label ) ?>
    3231                </button>
    3332
    34                 <p class="description"><?= $shortcode_description ?></p>
     33                <p class="description"><?= esc_html( $shortcode_description ) ?></p>
    3534            </td>
    3635        </tr>
     
    3938
    4039        <tr>
    41             <th scope="row"><?= $example_scope ?></th>
     40            <th scope="row"><?= esc_html( $example_scope ) ?></th>
    4241            <td>
    43                 <code>[eh_mortgage_calculator]</code>
    44                 <p class="description"><?= $example_description ?></p>
     42                <code><?= esc_html( '[eh_mortgage_calculator]' ) ?></code>
     43                <p class="description"><?= esc_html( $example_description ) ?></p>
    4544            </td>
    4645        </tr>
  • eh-mortgage-calculator/trunk/admin/tabs/styling.php

    r3441254 r3441776  
    11<?php
     2// Translations
     3$title                              = __( 'Styling Options', 'eh-mortgage-calculator' );
     4$description                        = __( 'Customize the appearance of the mortgage calculator on the frontend.', 'eh-mortgage-calculator' );
     5$primary_color_label                = __( 'Primary Color', 'eh-mortgage-calculator' );
     6$primary_color_description          = __( 'Used for highlights and accents.', 'eh-mortgage-calculator' );
     7$button_calculate_color_label       = __( 'Calculate Button Color', 'eh-mortgage-calculator' );
     8$button_calculate_color_description = __( 'Color of the Calculate button.', 'eh-mortgage-calculator' );
     9$button_reset_color_label           = __( 'Reset Button Color', 'eh-mortgage-calculator' );
     10$button_reset_color_description     = __( 'Color of the Reset button.', 'eh-mortgage-calculator' );
     11$table_header_color_label           = __( 'Table Header Color', 'eh-mortgage-calculator' );
     12$table_header_color_description     = __( 'Background color for the amortization table header.', 'eh-mortgage-calculator' );
     13$border_radius_scope                = __( 'Border Radius', 'eh-mortgage-calculator' );
     14$border_radius_labels = [
     15    'none'   => __( 'None', 'eh-mortgage-calculator' ),
     16    'small'  => __( 'Small (4px)', 'eh-mortgage-calculator' ),
     17    'medium' => __( 'Medium (8px)', 'eh-mortgage-calculator' ),
     18    'large'  => __( 'Large (12px)', 'eh-mortgage-calculator' )
     19];
     20$border_radius_description = __( 'Controls the roundness of input fields, buttons, and cards.', 'eh-mortgage-calculator' );
     21
     22// Fetch saved values (with safe defaults)
    223$primary_color           = get_option('ehmc_primary_color', '#2271b1');
    324$button_calculate_color  = get_option('ehmc_button_color_calculate', '#2271b1');
     
    526$table_header_color      = get_option('ehmc_table_header_color', '#f1f1f1');
    627$border_radius           = get_option('ehmc_border_radius', 'medium');
    7 
    8 $title         = esc_html__( 'Styling Options', 'eh-mortgage-calculator' );
    9 $description   = esc_html__( 'Customize the appearance of the mortgage calculator on the frontend.', 'eh-mortgage-calculator' );
    10 
    11 $primary_color_label       = esc_html__( 'Primary Color', 'eh-mortgage-calculator' );
    12 $primary_color_description = esc_html__( 'Used for highlights and accents.', 'eh-mortgage-calculator' );
    13 
    14 $button_calculate_color_label       = esc_html__( 'Calculate Button Color', 'eh-mortgage-calculator' );
    15 $button_calculate_color_description = esc_html__( 'Color of the Calculate button.', 'eh-mortgage-calculator' );
    16 
    17 $button_reset_color_label       = esc_html__( 'Reset Button Color', 'eh-mortgage-calculator' );
    18 $button_reset_color_description = esc_html__( 'Color of the Reset button.', 'eh-mortgage-calculator' );
    19 
    20 $table_header_color_label       = esc_html__( 'Table Header Color', 'eh-mortgage-calculator' );
    21 $table_header_color_description = esc_html__( 'Background color for the amortization table header.', 'eh-mortgage-calculator' );
    22 
    23 $border_radius_scope  = esc_html__( 'Border Radius', 'eh-mortgage-calculator' );
    24 $border_radius_labels = [
    25     'none'   => esc_html__( 'None', 'eh-mortgage-calculator' ),
    26     'small'  => esc_html__( 'Small (4px)', 'eh-mortgage-calculator' ),
    27     'medium' => esc_html__( 'Medium (8px)', 'eh-mortgage-calculator' ),
    28     'large'  => esc_html__( 'Large (12px)', 'eh-mortgage-calculator' )
    29 ];
    30 $border_radius_description = esc_html__( 'Controls the roundness of input fields, buttons, and cards.', 'eh-mortgage-calculator' );
    3128?>
    3229
    3330<div class="ehmc-card">
    34     <h2><?= $title ?></h2>
    35     <p class="description"><?= $description ?></p>
     31    <h2><?= esc_html( $title ) ?></h2>
     32    <p class="description"><?= esc_html( $description ) ?></p>
    3633
    3734    <table class="form-table">
    3835        <!-- Primary Color -->
    3936        <tr>
    40             <th scope="row"><label for="ehmc_primary_color"><?= $primary_color_label ?></label></th>
     37            <th scope="row"><label for="ehmc_primary_color" aria-describedby="primary-desc"><?= esc_html( $primary_color_label ) ?></label></th>
    4138            <td>
    4239                <input type="color" name="ehmc_primary_color" id="ehmc_primary_color"
    4340                       value="<?php echo esc_attr($primary_color); ?>" />
    44                 <p class="description"><?= $primary_color_description ?></p>
     41                <p id="primary-desc" class="description"><?= esc_html( $primary_color_description ) ?></p>
    4542            </td>
    4643        </tr>
     
    4845        <!-- Buttons Color -->
    4946        <tr>
    50             <th scope="row"><label for="ehmc_button_color_calculate"><?= $button_calculate_color_label ?></label></th>
     47            <th scope="row"><label for="ehmc_button_color_calculate" aria-describedby="button-calculate-desc"><?= esc_html( $button_calculate_color_label ) ?></label></th>
    5148            <td>
    5249                <input type="color" name="ehmc_button_color_calculate" id="ehmc_button_color_calculate"
    5350                       value="<?php echo esc_attr($button_calculate_color); ?>" />
    54                 <p class="description"><?= $button_calculate_color_description ?></p>
     51                <p id="button-calculate-desc" class="description"><?= esc_html( $button_calculate_color_description ) ?></p>
    5552            </td>
    5653        </tr>
    5754        <tr>
    58             <th scope="row"><label for="ehmc_button_color_reset"><?= $button_reset_color_label ?></label></th>
     55            <th scope="row"><label for="ehmc_button_color_reset" aria-describedby="button-reset-desc"><?= esc_html( $button_reset_color_label ) ?></label></th>
    5956            <td>
    6057                <input type="color" name="ehmc_button_color_reset" id="ehmc_button_color_reset"
    6158                       value="<?php echo esc_attr($button_reset_color); ?>" />
    62                 <p class="description"><?= $button_reset_color_description ?></p>
     59                <p id="button-reset-desc" class="description"><?= esc_html( $button_reset_color_description ) ?></p>
    6360            </td>
    6461        </tr>
     
    6663        <!-- Table Header Color -->
    6764        <tr>
    68             <th scope="row"><label for="ehmc_table_header_color"><?= $table_header_color_label ?></label></th>
     65            <th scope="row"><label for="ehmc_table_header_color" aria-describedby="table-header-desc"><?= esc_html( $table_header_color_label ) ?></label></th>
    6966            <td>
    7067                <input type="color" name="ehmc_table_header_color" id="ehmc_table_header_color"
    7168                       value="<?php echo esc_attr($table_header_color); ?>" />
    72                 <p class="description"><?= $table_header_color_description ?></p>
     69                <p id="table-header-desc" class="description"><?= esc_html( $table_header_color_description ) ?></p>
    7370            </td>
    7471        </tr>
     
    7875        <!-- Border Radius -->
    7976        <tr>
    80             <th scope="row"><?= $border_radius_scope ?></th>
     77            <th scope="row"><?= esc_html( $border_radius_scope ) ?></th>
    8178            <td>
    82                 <fieldset>
     79                <fieldset aria-labelledby="border-radius-desc">
     80                    <?php $x = 0 ?>
    8381                    <?php foreach( $border_radius_labels as $key => $value ): ?>
    84                     <label>
    85                         <input type="radio" name="ehmc_border_radius" value="<?= $key ?>"
     82                    <label for="ehmc_border_radius-<?= $x ?>" aria-describedby="border-radius-desc">
     83                        <input id="ehmc_border_radius-<?= $x ?>" type="radio" name="ehmc_border_radius" value="<?= $key ?>"
    8684                            <?php checked($border_radius, $key); ?> />
    87                         <?= $value ?>
     85                        <?= esc_html( $value ) ?>
    8886                    </label>
    8987                    <br />
     88                    <?php $x++; ?>
    9089                    <?php endforeach; ?>
    9190                </fieldset>
    92                 <p class="description"><?= $border_radius_description ?></p>
     91                <p id="border-radius-desc" class="description"><?= esc_html( $border_radius_description ) ?></p>
    9392            </td>
    9493        </tr>
  • eh-mortgage-calculator/trunk/assets/js/modules/EHMortgageCalculator.js

    r3441675 r3441776  
    184184        let i = this.interestInput.value;
    185185        let n = this.termInput.value;
    186 
    187         const validation = validateForm(P, i, n);
     186       
     187        let ranges = {
     188            pMin: 10000,
     189            pMax: 20000000,
     190            iMin: 1,
     191            iMax: 25,
     192            nMin: 1,
     193            nMax: 45
     194          }
     195
     196
     197        const validation = validateForm(P, i, n, ranges);
    188198
    189199        if (Object.values(validation).includes(false)) {
  • eh-mortgage-calculator/trunk/assets/js/modules/validation.js

    r3441254 r3441776  
    11/**
    2  * Validate user input.
     2 * Validate user input using numeric ranges.
    33 *
    44 * @param {string} P Principal
    55 * @param {string} i Interest rate
    66 * @param {string} n Term
     7 * @param {object} ranges  { pMin, pMax, iMin, iMax, nMin, nMax }
    78 * @returns {{ principal: boolean, interest: boolean, term: boolean }}
    89 */
    9 export function validateForm(P, i, n) {
    10     // principal: > 0, up to 2 decimals
    11     const principalRegex = /^(?:[1-9]\d*(\.\d{1,2})?)$/;
     10export function validateForm(P, i, n, ranges) {
    1211
    13     // interest: 1–25% with up to 2 decimals
    14     const interestRegex = /^([1-9](\.\d{1,2})?|1\d(\.\d{1,2})?|2[0-4](\.\d{1,2})?|25)$/;
     12    // Remove commas and spaces
     13    const principal = parseFloat(String(P).replace(/,/g, ''));
     14    const interest  = parseFloat(i);
     15    const term      = parseInt(n, 10);
    1516
    16     // term: 1–45 years
    17     const termRegex = /^(?:[1-9]|[1-3][0-9]|4[0-5])$/;
     17    const {
     18        pMin, pMax,
     19        iMin, iMax,
     20        nMin, nMax
     21    } = ranges;
    1822
    1923    return {
    20         principal: principalRegex.test(P),
    21         interest:  interestRegex.test(i),
    22         term:      termRegex.test(n)
     24        principal: !isNaN(principal) && principal >= pMin && principal <= pMax,
     25        interest:  !isNaN(interest)  && interest  >= iMin && interest  <= iMax,
     26        term:      !isNaN(term)      && term      >= nMin && term      <= nMax
    2327    };
    2428}
  • eh-mortgage-calculator/trunk/eh-mortgage-calculator.php

    r3441254 r3441776  
    44 * Description: A modern, modular mortgage calculator with amortization table.
    55 * Version: 3.1.0
     6 * Requires at least: 5.0
     7 * Tested up to: 6.9
    68 * Author: Edgar Hernandez
    79 * Text Domain: eh-mortgage-calculator
     
    1214}
    1315
    14 define( 'EHMORTGAGECALCULATOR__VERSION',     '3.0' );
     16define( 'EHMORTGAGECALCULATOR_VERSION',     '3.1.0' );
    1517define( 'EHMC_PATH', plugin_dir_path( __FILE__ ) );
    1618define( 'EHMC_URL',  plugin_dir_url( __FILE__ ) );
  • eh-mortgage-calculator/trunk/includes/class-ehmc-admin.php

    r3441254 r3441776  
    44     public function __construct() {
    55        add_action('admin_menu', [ $this, 'ehmc_register_settings_page' ]);
    6         add_action('admin_enqueue_scripts', [ $this, 'ehmc_admin_assets' ]);
    76    }
    87   
    98    public function ehmc_register_settings_page() {
     9        if ( ! current_user_can( 'manage_options' ) ) {
     10            return;
     11        }
     12       
    1013        $title = esc_html__( 'Mortgage Calculator Settings', 'eh-mortgage-calculator');
    11         $menu_title = esc_html__( 'Mortgage', 'eh-mortgage-calculator');
     14        $menu_title = esc_html__( 'Mortgage Calculator', 'eh-mortgage-calculator');
    1215       
    1316        add_options_page(
     
    2225    public function ehmc_register_settings() {
    2326        // General
    24         register_setting('ehmc_settings_group', 'ehmc_default_amount');
    25         register_setting('ehmc_settings_group', 'ehmc_default_interest');
    26         register_setting('ehmc_settings_group', 'ehmc_default_years');
    27         register_setting('ehmc_settings_group', 'ehmc_label_amount');
    28         register_setting('ehmc_settings_group', 'ehmc_label_interest');
    29         register_setting('ehmc_settings_group', 'ehmc_label_years');
    30         register_setting('ehmc_settings_group', 'ehmc_label_button_calculate');
    31         register_setting('ehmc_settings_group', 'ehmc_label_button_reset');
    32        
     27        $this->ehmc_register_setting('ehmc_default_amount', 'number', 'absint', 300000);
     28        $this->ehmc_register_setting('ehmc_default_interest', 'string', [ $this, 'sanitize_float' ], '6.5');
     29        $this->ehmc_register_setting('ehmc_default_years', 'number', 'absint', 30);
     30        $this->ehmc_register_setting('ehmc_label_amount', 'string', 'sanitize_text_field', esc_html__( 'Loan Amount', 'eh-mortgage-calculator' ));
     31        $this->ehmc_register_setting('ehmc_label_interest', 'string', 'sanitize_text_field', esc_html__( 'Interest Rate', 'eh-mortgage-calculator' ));
     32        $this->ehmc_register_setting('ehmc_label_years', 'string', 'sanitize_text_field', esc_html__( 'Years', 'eh-mortgage-calculator' ));
     33        $this->ehmc_register_setting('ehmc_label_button_calculate', 'string', 'sanitize_text_field', esc_html__( 'Calculate', 'eh-mortgage-calculator' ));
     34        $this->ehmc_register_setting('ehmc_label_button_reset', 'string', 'sanitize_text_field', esc_html__( 'Reset', 'eh-mortgage-calculator' ));
    3335        // Display
    34         register_setting('ehmc_settings_group', 'ehmc_show_summary');
    35         register_setting('ehmc_settings_group', 'ehmc_show_table');
    36         register_setting('ehmc_settings_group', 'ehmc_show_chart');
     36        $this->ehmc_register_setting('ehmc_show_summary', 'integer', 'absint', 1);
     37        $this->ehmc_register_setting('ehmc_show_table', 'integer', 'absint', 1);
     38        $this->ehmc_register_setting('ehmc_show_chart', 'integer', 'absint', 0);
     39        // Styling
     40        $this->ehmc_register_setting('ehmc_primary_color', 'string', 'sanitize_hex_color', '#2271b1');
     41        $this->ehmc_register_setting('ehmc_button_color_calculate', 'string', 'sanitize_hex_color', '#2271b1');
     42        $this->ehmc_register_setting('ehmc_button_color_reset', 'string', 'sanitize_hex_color', '#6c757d');
     43        $this->ehmc_register_setting('ehmc_table_header_color', 'string', 'sanitize_hex_color', '#f1f1f1');
     44        $this->ehmc_register_setting('ehmc_border_radius', 'string', [ $this, 'sanitize_border_radius' ], 'medium');
     45        // Uninstall
     46        $this->ehmc_register_setting('ehmc_delete_data_on_uninstall', 'integer', 'absint', 0);
     47    }
     48   
     49    /**
     50     *
     51     * @param string $setting
     52     * @param string $type
     53     * @param string|array $sanitize_callback
     54     * @param string|int $default
     55     */
     56    public function ehmc_register_setting(string $setting, string $type, string | array $sanitize_callback, string | int $default) {
     57        register_setting(
     58            'ehmc_settings_group',
     59            $setting,
     60            [
     61                'type'              => $type,
     62                'sanitize_callback' => $sanitize_callback,
     63                'default'           => $default,
     64            ]
     65        );
     66    }
     67   
     68    /**
     69     * Sanitize float values (interest rate)
     70     */
     71    public function sanitize_float( $value ) {
     72        return is_numeric( $value ) ? $value : '';
     73    }
    3774
    38         // Styling
    39         register_setting('ehmc_settings_group', 'ehmc_primary_color');
    40         register_setting('ehmc_settings_group', 'ehmc_button_color_calculate');
    41         register_setting('ehmc_settings_group', 'ehmc_button_color_reset');
    42         register_setting('ehmc_settings_group', 'ehmc_table_header_color');
    43         register_setting('ehmc_settings_group', 'ehmc_border_radius');
    44        
    45         // Uninstall
    46         register_setting('ehmc_settings_group', 'ehmc_delete_data_on_uninstall');
     75    /**
     76     * Sanitize border radius option
     77     */
     78    public function sanitize_border_radius( $value ) {
     79
     80        $allowed = [ 'none', 'small', 'medium', 'large' ];
     81
     82        return in_array( $value, $allowed, true ) ? $value : 'medium';
    4783    }
    4884   
     
    6096        echo $output;
    6197    }
    62    
    63    
    64     public function ehmc_admin_assets($hook) {
    65         if ($hook !== 'settings_page_ehmc-settings') {
    66             return;
    67         }
    68        
    69         wp_enqueue_script(
    70             'ehmc-admin-js',
    71             EHMC_URL . 'admin/admin-scripts.js',
    72             [],
    73             EHMORTGAGECALCULATOR__VERSION,
    74             true
    75         );
    76        
    77         wp_enqueue_style(
    78             'ehmc-admin-css',
    79             EHMC_URL . 'admin/admin-styles.css',
    80             [],
    81             EHMORTGAGECALCULATOR__VERSION
    82         );
    83     }
    8498}
  • eh-mortgage-calculator/trunk/includes/class-ehmc-assets.php

    r3441675 r3441776  
    1010            EHMC_URL . 'assets/css/bootstrap-custom.css',
    1111            [],
    12             EHMORTGAGECALCULATOR__VERSION
     12            EHMORTGAGECALCULATOR_VERSION
    1313        );
    14 
     14       
     15        wp_enqueue_script( 'wp-i18n' );
     16       
    1517        // JS (ES6 module)
    1618        wp_enqueue_script_module(
     
    2527            EHMC_URL . 'assets/js/frontend.js',
    2628            ['chartjs'],
    27             EHMORTGAGECALCULATOR__VERSION
     29            EHMORTGAGECALCULATOR_VERSION
    2830        );
    2931
    3032        wp_set_script_translations( 'ehmc-frontend', 'eh-mortgage-calculator' );
     33       
     34        add_filter( 'script_module_data_ehmc-frontend', [ $this, 'localize_module_data' ] );
    3135
    32         // Important: load as module
    33         wp_enqueue_script( 'wp-i18n' );
    34        
    35         // Provide data specifically for this module
    36         add_filter( "script_module_data_ehmc-frontend", function ( array $data ): array {
    37             $data['labels'] = [
    38                 // Chart
    39                 'principal' => __( 'Principal', 'eh-mortgage-calculator' ),
    40                 'interest'  => __( 'Interest', 'eh-mortgage-calculator' ),
    41                 // Summary
    42                 'monthly_payment' => __('Monthly Payment', 'eh-mortgage-calculator' ),
    43                 'total_interest'  => __('Total Interest', 'eh-mortgage-calculator' ),
    44                 'total_paid'      => __('Total Paid', 'eh-mortgage-calculator' )
    45             ];
    46             return $data;
    47         } );
     36    }
     37   
     38    public function localize_module_data( array $data ): array {
     39        $data['labels'] = [
     40            'principal'       => __( 'Principal', 'eh-mortgage-calculator' ),
     41            'interest'        => __( 'Interest', 'eh-mortgage-calculator' ),
     42            'monthly_payment' => __( 'Monthly Payment', 'eh-mortgage-calculator' ),
     43            'total_interest'  => __( 'Total Interest', 'eh-mortgage-calculator' ),
     44            'total_paid'      => __( 'Total Paid', 'eh-mortgage-calculator' ),
     45        ];
     46        return $data;
    4847    }
    4948}
  • eh-mortgage-calculator/trunk/includes/class-ehmc-blocks.php

    r3441254 r3441776  
    3838            EHMC_URL . 'blocks/ehmc-calculator/editor.css',
    3939            [],
    40             EHMORTGAGECALCULATOR__VERSION
     40            EHMORTGAGECALCULATOR_VERSION
    4141        );
    4242       
     
    4545            EHMC_URL . 'blocks/ehmc-calculator/editor.js',
    4646            [ 'wp-blocks', 'wp-element', 'wp-editor' ],
    47             EHMORTGAGECALCULATOR__VERSION,
     47            EHMORTGAGECALCULATOR_VERSION,
    4848            true
    4949        );
  • eh-mortgage-calculator/trunk/includes/class-ehmc-loader.php

    r3441305 r3441776  
    99        require_once EHMC_PATH . 'includes/class-ehmc-blocks.php';
    1010        require_once EHMC_PATH . 'includes/class-ehmc-admin.php';
     11        require_once EHMC_PATH . 'includes/class-ehmc-admin-assets.php';
    1112    }
    1213
     
    1617        $this->load_assets();
    1718        $this->load_shortcode();
    18         $this->load_admin();
     19        if ( is_admin() ) {
     20            $this->load_admin_assets();
     21            $this->load_admin();
     22        }
    1923    }
    2024
     
    4347        add_action( 'admin_init', [ $admin, 'ehmc_register_settings' ] );
    4448    }
     49   
     50    private function load_admin_assets() {
     51        $admin_assets = new EHMC_Admin_Assets();
     52        add_action( 'admin_enqueue_scripts', [ $admin_assets, 'ehmc_admin_assets' ] );
     53    }
    4554}
  • eh-mortgage-calculator/trunk/includes/class-ehmc-shortcode.php

    r3428826 r3441776  
    77    public function render( $atts = [] ) {
    88        self::$instance_counter++;
    9         $instance = self::$instance_counter;
     9        $instance = absint( self::$instance_counter );
    1010
    1111        // 1. Start fresh buffering
  • eh-mortgage-calculator/trunk/languages/eh-mortgage-calculator-es_ES.po

    r3441254 r3441776  
    44"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/eh-mortgage-"
    55"calculator\n"
    6 "POT-Creation-Date: 2026-01-16T20:00:18+00:00\n"
    7 "PO-Revision-Date: 2026-01-16 12:05-0800\n"
     6"POT-Creation-Date: 2026-01-18T05:30:23+00:00\n"
     7"PO-Revision-Date: 2026-01-17 21:34-0800\n"
    88"Last-Translator: \n"
    99"Language-Team: \n"
     
    3535msgstr "Edgar Hernandez"
    3636
    37 #: admin/settings-page.php:2 includes/class-ehmc-admin.php:10
     37#: admin/settings-page.php:2 includes/class-ehmc-admin.php:13
    3838msgid "Mortgage Calculator Settings"
    3939msgstr "Ajustes de la calculadora hipotecaria"
     
    5151msgstr "Estilo"
    5252
    53 #: admin/settings-page.php:6 admin/tabs/shortcode.php:2
     53#: admin/settings-page.php:6 admin/tabs/shortcode.php:3
    5454msgid "Shortcode"
    5555msgstr "Shortcode"
     
    5959msgstr "Guardar cambios"
    6060
    61 #: admin/tabs/display.php:6
     61#: admin/tabs/display.php:3
    6262msgid "Display Options"
    6363msgstr "Opciones de Visualización"
    6464
    65 #: admin/tabs/display.php:7
     65#: admin/tabs/display.php:4
    6666msgid ""
    6767"Choose which elements of the calculator should be visible on the frontend."
     
    7070"pública."
    7171
    72 #: admin/tabs/display.php:9
     72#: admin/tabs/display.php:5
    7373msgid "Show Summary Box"
    7474msgstr "Mostrar cuadro de resumen"
    7575
    76 #: admin/tabs/display.php:10
     76#: admin/tabs/display.php:6
    7777msgid "Enable summary section (monthly payment, total interest, total cost)"
    7878msgstr ""
    7979"Habilitar sección de resumen (pago mensual, interés total, costo total)"
    8080
    81 #: admin/tabs/display.php:12
     81#: admin/tabs/display.php:7
    8282msgid "Show Amortization Table"
    8383msgstr "Mostrar tabla de amortización"
    8484
    85 #: admin/tabs/display.php:13
     85#: admin/tabs/display.php:8
    8686msgid "Display full amortization schedule"
    8787msgstr "Mostrar calendario de amortización completo"
    8888
    89 #: admin/tabs/display.php:15
     89#: admin/tabs/display.php:9
    9090msgid "Show Chart"
    9191msgstr "Mostrar gráfico"
    9292
    93 #: admin/tabs/display.php:16
     93#: admin/tabs/display.php:10
    9494msgid "Display a visual chart"
    9595msgstr "Mostrar gráfico visual"
    9696
    97 #: admin/tabs/display.php:17
     97#: admin/tabs/display.php:11
    9898msgid ""
    9999"A simple doughnut chart that visualizes the breakdown of principal and "
     
    103103"(principal) y los intereses."
    104104
    105 #: admin/tabs/general.php:7
     105#: admin/tabs/general.php:3
     106msgid "General Settings"
     107msgstr "Ajustes Generales"
     108
     109#: admin/tabs/general.php:4
     110msgid "Control the default values and labels used in the mortgage calculator."
     111msgstr ""
     112"Controla los valores predeterminados y las etiquetas utilizadas en la "
     113"calculadora hipotecaria."
     114
     115#: admin/tabs/general.php:5
    106116msgid "Label"
    107117msgstr "Etiqueta"
    108118
    109 #: admin/tabs/general.php:9
     119#: admin/tabs/general.php:6
    110120msgid "Calculate Button"
    111121msgstr "Botón de calcular"
    112122
    113 #: admin/tabs/general.php:10
     123#: admin/tabs/general.php:7
    114124msgid "Reset Button"
    115125msgstr "Botón de restablecer"
    116126
    117 #: admin/tabs/general.php:12 templates/calculator.php:9
     127#: admin/tabs/general.php:8 includes/class-ehmc-admin.php:30
     128#: templates/calculator.php:12
    118129msgid "Loan Amount"
    119130msgstr "Monto del préstamo"
    120131
    121 #: admin/tabs/general.php:13
     132#: admin/tabs/general.php:9 includes/class-ehmc-admin.php:31
    122133msgid "Interest Rate"
    123134msgstr "Tasa de interés"
    124135
    125 #: admin/tabs/general.php:14
     136#: admin/tabs/general.php:10 includes/class-ehmc-admin.php:32
    126137msgid "Years"
    127138msgstr "Años"
    128139
    129 #: admin/tabs/general.php:15
    130 msgid "Calculate"
    131 msgstr "Calcular"
    132 
    133 #: admin/tabs/general.php:16
    134 msgid "Reset"
    135 msgstr "Restablecer"
    136 
    137 #: admin/tabs/general.php:24
    138 msgid "General Settings"
    139 msgstr "Ajustes Generales"
    140 
    141 #: admin/tabs/general.php:25
    142 msgid "Control the default values and labels used in the mortgage calculator."
    143 msgstr ""
    144 "Controla los valores predeterminados y las etiquetas utilizadas en la "
    145 "calculadora hipotecaria."
    146 
    147 #: admin/tabs/general.php:27
     140#: admin/tabs/general.php:11
    148141msgid "Default Loan Amount"
    149142msgstr "Monto de préstamo predeterminado"
    150143
    151 #: admin/tabs/general.php:28
     144#: admin/tabs/general.php:12
    152145msgid "The starting loan amount shown in the calculator."
    153146msgstr "El monto inicial del préstamo que se muestra en la calculadora."
    154147
    155 #: admin/tabs/general.php:30
     148#: admin/tabs/general.php:13
    156149msgid "Default Interest Rate (%)"
    157150msgstr "Tasa de interés predeterminada (%)"
    158151
    159 #: admin/tabs/general.php:31
     152#: admin/tabs/general.php:14
    160153msgid "The default yearly interest rate."
    161154msgstr "La tasa de interés anual predeterminada."
    162155
    163 #: admin/tabs/general.php:33
     156#: admin/tabs/general.php:15
    164157msgid "Default Term (Years)"
    165158msgstr "Plazo predeterminado (Años)"
    166159
    167 #: admin/tabs/general.php:34
     160#: admin/tabs/general.php:16
    168161msgid "The default loan term in years."
    169162msgstr "El plazo predeterminado del préstamo en años."
    170163
    171 #: admin/tabs/general.php:36
     164#: admin/tabs/general.php:17
    172165msgid "Cleanup on Uninstall"
    173166msgstr "Eliminar datos al desinstalar"
    174167
    175 #: admin/tabs/general.php:37
     168#: admin/tabs/general.php:18
    176169msgid "Delete all plugin data when uninstalling"
    177170msgstr "Eliminar todos los datos del plugin al desinstalar"
    178171
    179 #: admin/tabs/general.php:38
     172#: admin/tabs/general.php:19
    180173msgid ""
    181174"If enabled, all EHMC settings will be permanently removed when the plugin is "
     
    185178"desinstalar el plugin."
    186179
    187 #: admin/tabs/shortcode.php:3
     180#: admin/tabs/shortcode.php:4
    188181msgid ""
    189182"Use this shortcode to display the mortgage calculator anywhere on your site."
     
    204197msgstr "Pega este shortcode en cualquier página, entrada o widget."
    205198
     199#: admin/tabs/shortcode.php:8
     200msgid "Copy shortcode to clipboard"
     201msgstr "Copiar shortcode al portapapeles"
     202
    206203#: admin/tabs/shortcode.php:9
    207204msgid "Example Usage"
     
    213210"No se requiere ningún atributo; la calculadora utiliza los ajustes guardados."
    214211
    215 #: admin/tabs/styling.php:8
     212#: admin/tabs/styling.php:3
    216213msgid "Styling Options"
    217214msgstr "Opciones de Estilo"
    218215
    219 #: admin/tabs/styling.php:9
     216#: admin/tabs/styling.php:4
    220217msgid "Customize the appearance of the mortgage calculator on the frontend."
    221218msgstr ""
    222219"Personaliza la apariencia de la calculadora hipotecaria en la página pública."
    223220
    224 #: admin/tabs/styling.php:11
     221#: admin/tabs/styling.php:5
    225222msgid "Primary Color"
    226223msgstr "Color principal"
    227224
    228 #: admin/tabs/styling.php:12
     225#: admin/tabs/styling.php:6
    229226msgid "Used for highlights and accents."
    230227msgstr "Se utiliza para resaltar y acentuar."
    231228
    232 #: admin/tabs/styling.php:14
     229#: admin/tabs/styling.php:7
    233230msgid "Calculate Button Color"
    234231msgstr "Color del botón Calcular"
    235232
    236 #: admin/tabs/styling.php:15
     233#: admin/tabs/styling.php:8
    237234msgid "Color of the Calculate button."
    238235msgstr "Color para el botón Calcular."
    239236
    240 #: admin/tabs/styling.php:17
     237#: admin/tabs/styling.php:9
    241238msgid "Reset Button Color"
    242239msgstr "Color del botón Restablecer"
    243240
    244 #: admin/tabs/styling.php:18
     241#: admin/tabs/styling.php:10
    245242msgid "Color of the Reset button."
    246243msgstr "Color para el botón Restablecer."
    247244
    248 #: admin/tabs/styling.php:20
     245#: admin/tabs/styling.php:11
    249246msgid "Table Header Color"
    250247msgstr "Color del encabezado de la tabla"
    251248
    252 #: admin/tabs/styling.php:21
     249#: admin/tabs/styling.php:12
    253250msgid "Background color for the amortization table header."
    254251msgstr "Color de fondo para el encabezado de la tabla de amortización."
    255252
    256 #: admin/tabs/styling.php:23
     253#: admin/tabs/styling.php:13
    257254msgid "Border Radius"
    258255msgstr "Radio del borde"
    259256
    260 #: admin/tabs/styling.php:25
     257#: admin/tabs/styling.php:15
    261258msgid "None"
    262259msgstr "Ninguno"
    263260
    264 #: admin/tabs/styling.php:26
     261#: admin/tabs/styling.php:16
    265262msgid "Small (4px)"
    266263msgstr "Pequeño (4px)"
    267264
    268 #: admin/tabs/styling.php:27
     265#: admin/tabs/styling.php:17
    269266msgid "Medium (8px)"
    270267msgstr "Mediano (8px)"
    271268
    272 #: admin/tabs/styling.php:28
     269#: admin/tabs/styling.php:18
    273270msgid "Large (12px)"
    274271msgstr "Grande (12px)"
    275272
    276 #: admin/tabs/styling.php:30
     273#: admin/tabs/styling.php:20
    277274msgid "Controls the roundness of input fields, buttons, and cards."
    278275msgstr "Controla el redondeo de los campos de entrada, botones y tarjetas."
    279276
    280 #: includes/class-ehmc-admin.php:11
    281 msgid "Mortgage"
    282 msgstr "Hipoteca"
    283 
    284 #: includes/class-ehmc-assets.php:40 templates/calculator.php:27
     277#: includes/class-ehmc-admin.php:14
     278msgid "Mortgage Calculator"
     279msgstr "Calculadora de hipoteca"
     280
     281#: includes/class-ehmc-admin.php:33
     282msgid "Calculate"
     283msgstr "Calcular"
     284
     285#: includes/class-ehmc-admin.php:34
     286msgid "Reset"
     287msgstr "Restablecer"
     288
     289#: includes/class-ehmc-assets.php:40 templates/calculator.php:22
    285290msgid "Principal"
    286291msgstr "Principal"
    287292
    288 #: includes/class-ehmc-assets.php:41 templates/calculator.php:28
     293#: includes/class-ehmc-assets.php:41 templates/calculator.php:23
    289294msgid "Interest"
    290295msgstr "Interés"
    291296
    292 #: includes/class-ehmc-assets.php:43
     297#: includes/class-ehmc-assets.php:42
    293298msgid "Monthly Payment"
    294299msgstr "Pago Mensual"
    295300
    296 #: includes/class-ehmc-assets.php:44
     301#: includes/class-ehmc-assets.php:43
    297302msgid "Total Interest"
    298303msgstr "Interés Total"
    299304
    300 #: includes/class-ehmc-assets.php:45
     305#: includes/class-ehmc-assets.php:44
    301306msgid "Total Paid"
    302307msgstr "Total Pagado"
     
    306311msgstr "Este bloque mostrará la calculadora en el sitio web."
    307312
     313#: templates/calculator.php:9
     314msgid "Please enter an amount between 10,000 and 20,000,000"
     315msgstr "Por favor, introduzca una cantidad entre 10.000 y 20.000.000"
     316
    308317#: templates/calculator.php:10
    309 msgid "Please enter a loan amount, e.g. \"40,000\", \"50,000.23\""
    310 msgstr "Por favor, ingresa un monto de préstamo, ej. \"40.000\", \"50.000.23\""
    311 
    312 #: templates/calculator.php:12
     318msgid "Please enter a number between 1 and 25, e.g. \"5\", \"5.5\", \"5.75\""
     319msgstr ""
     320"Por favor, ingresa un número entre 1 y 25, ej. \"5\", \"5,5\", \"5,75\""
     321
     322#: templates/calculator.php:11
     323msgid "Please enter a number between 1 and 45: no decimals allowed"
     324msgstr "Por favor, ingresa un número entre 1 y 45: no se permiten decimales"
     325
     326#: templates/calculator.php:13
    313327msgid "Yearly Interest"
    314328msgstr "Interés Anual"
    315329
    316 #: templates/calculator.php:13
    317 msgid "Please enter a number between 1 and 25, e.g. \"5\", \"5.5\", \"5.75\""
    318 msgstr ""
    319 "Por favor, ingresa un número entre 1 y 25, ej. \"5\", \"5,5\", \"5,75\""
    320 
    321 #: templates/calculator.php:15
     330#: templates/calculator.php:14
    322331msgid "Number of years"
    323332msgstr "Número de años"
    324333
    325 #: templates/calculator.php:16
    326 msgid "Please enter a number between 1 and 45: no decimals allowed"
    327 msgstr "Por favor, ingresa un número entre 1 y 45: no se permiten decimales"
    328 
    329 #: templates/calculator.php:22
     334#: templates/calculator.php:17
    330335msgid "Payment Breakdown"
    331336msgstr "Desglose del Pago"
    332337
    333 #: templates/calculator.php:23
     338#: templates/calculator.php:18
    334339msgid "Summary"
    335340msgstr "Resumen"
    336341
    337 #: templates/calculator.php:26
     342#: templates/calculator.php:21
    338343msgid "Payment"
    339344msgstr "Pago"
    340345
    341 #: templates/calculator.php:29
     346#: templates/calculator.php:24
    342347msgid "Balance"
    343348msgstr "Saldo"
    344349
    345 #: templates/calculator.php:31
     350#: templates/calculator.php:25
    346351msgid "Amortization results pages"
    347352msgstr "Páginas de resultados de amortización"
    348353
    349 #: assets/js/modules/EHMortgageCalculator.js:226
     354#: assets/js/modules/EHMortgageCalculator.js:236
    350355msgid "Previous"
    351356msgstr "Anterior"
    352357
    353 #: assets/js/modules/EHMortgageCalculator.js:256
     358#: assets/js/modules/EHMortgageCalculator.js:266
    354359msgid "Next"
    355360msgstr "Siguiente"
     
    380385msgstr "préstamo"
    381386
     387#~ msgid "Mortgage"
     388#~ msgstr "Hipoteca"
     389
    382390#~ msgid "Loan amount:"
    383391#~ msgstr "Monto del Préstamo:"
  • eh-mortgage-calculator/trunk/languages/eh-mortgage-calculator-es_MX.po

    r3441254 r3441776  
    44"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/eh-mortgage-"
    55"calculator\n"
    6 "POT-Creation-Date: 2026-01-16T20:00:18+00:00\n"
    7 "PO-Revision-Date: 2026-01-16 12:09-0800\n"
     6"POT-Creation-Date: 2026-01-18T05:30:23+00:00\n"
     7"PO-Revision-Date: 2026-01-17 21:36-0800\n"
    88"Last-Translator: \n"
    99"Language-Team: \n"
     
    3535msgstr "Edgar Hernandez"
    3636
    37 #: admin/settings-page.php:2 includes/class-ehmc-admin.php:10
     37#: admin/settings-page.php:2 includes/class-ehmc-admin.php:13
    3838msgid "Mortgage Calculator Settings"
    3939msgstr "Ajustes de la calculadora hipotecaria"
     
    5151msgstr "Estilo"
    5252
    53 #: admin/settings-page.php:6 admin/tabs/shortcode.php:2
     53#: admin/settings-page.php:6 admin/tabs/shortcode.php:3
    5454msgid "Shortcode"
    5555msgstr "Shortcode"
     
    5959msgstr "Guardar cambios"
    6060
    61 #: admin/tabs/display.php:6
     61#: admin/tabs/display.php:3
    6262msgid "Display Options"
    6363msgstr "Opciones de Visualización"
    6464
    65 #: admin/tabs/display.php:7
     65#: admin/tabs/display.php:4
    6666msgid ""
    6767"Choose which elements of the calculator should be visible on the frontend."
     
    7070"pública."
    7171
    72 #: admin/tabs/display.php:9
     72#: admin/tabs/display.php:5
    7373msgid "Show Summary Box"
    7474msgstr "Mostrar cuadro de resumen"
    7575
    76 #: admin/tabs/display.php:10
     76#: admin/tabs/display.php:6
    7777msgid "Enable summary section (monthly payment, total interest, total cost)"
    7878msgstr ""
    7979"Habilitar sección de resumen (pago mensual, interés total, costo total)"
    8080
    81 #: admin/tabs/display.php:12
     81#: admin/tabs/display.php:7
    8282msgid "Show Amortization Table"
    8383msgstr "Mostrar tabla de amortización"
    8484
    85 #: admin/tabs/display.php:13
     85#: admin/tabs/display.php:8
    8686msgid "Display full amortization schedule"
    8787msgstr "Mostrar calendario de amortización completo"
    8888
    89 #: admin/tabs/display.php:15
     89#: admin/tabs/display.php:9
    9090msgid "Show Chart"
    9191msgstr "Mostrar gráfico"
    9292
    93 #: admin/tabs/display.php:16
     93#: admin/tabs/display.php:10
    9494msgid "Display a visual chart"
    9595msgstr "Mostrar gráfico visual"
    9696
    97 #: admin/tabs/display.php:17
     97#: admin/tabs/display.php:11
    9898msgid ""
    9999"A simple doughnut chart that visualizes the breakdown of principal and "
     
    103103"(principal) y los intereses."
    104104
    105 #: admin/tabs/general.php:7
     105#: admin/tabs/general.php:3
     106msgid "General Settings"
     107msgstr "Ajustes Generales"
     108
     109#: admin/tabs/general.php:4
     110msgid "Control the default values and labels used in the mortgage calculator."
     111msgstr ""
     112"Controla los valores predeterminados y las etiquetas utilizadas en la "
     113"calculadora hipotecaria."
     114
     115#: admin/tabs/general.php:5
    106116msgid "Label"
    107117msgstr "Etiqueta"
    108118
    109 #: admin/tabs/general.php:9
     119#: admin/tabs/general.php:6
    110120msgid "Calculate Button"
    111121msgstr "Botón de calcular"
    112122
    113 #: admin/tabs/general.php:10
     123#: admin/tabs/general.php:7
    114124msgid "Reset Button"
    115125msgstr "Botón de restablecer"
    116126
    117 #: admin/tabs/general.php:12 templates/calculator.php:9
     127#: admin/tabs/general.php:8 includes/class-ehmc-admin.php:30
     128#: templates/calculator.php:12
    118129msgid "Loan Amount"
    119130msgstr "Monto del préstamo"
    120131
    121 #: admin/tabs/general.php:13
     132#: admin/tabs/general.php:9 includes/class-ehmc-admin.php:31
    122133msgid "Interest Rate"
    123134msgstr "Tasa de interés"
    124135
    125 #: admin/tabs/general.php:14
     136#: admin/tabs/general.php:10 includes/class-ehmc-admin.php:32
    126137msgid "Years"
    127138msgstr "Años"
    128139
    129 #: admin/tabs/general.php:15
    130 msgid "Calculate"
    131 msgstr "Calcular"
    132 
    133 #: admin/tabs/general.php:16
    134 msgid "Reset"
    135 msgstr "Restablecer"
    136 
    137 #: admin/tabs/general.php:24
    138 msgid "General Settings"
    139 msgstr "Ajustes Generales"
    140 
    141 #: admin/tabs/general.php:25
    142 msgid "Control the default values and labels used in the mortgage calculator."
    143 msgstr ""
    144 "Controla los valores predeterminados y las etiquetas utilizadas en la "
    145 "calculadora hipotecaria."
    146 
    147 #: admin/tabs/general.php:27
     140#: admin/tabs/general.php:11
    148141msgid "Default Loan Amount"
    149142msgstr "Monto de préstamo predeterminado"
    150143
    151 #: admin/tabs/general.php:28
     144#: admin/tabs/general.php:12
    152145msgid "The starting loan amount shown in the calculator."
    153146msgstr "El monto inicial del préstamo que se muestra en la calculadora."
    154147
    155 #: admin/tabs/general.php:30
     148#: admin/tabs/general.php:13
    156149msgid "Default Interest Rate (%)"
    157150msgstr "Tasa de interés predeterminada (%)"
    158151
    159 #: admin/tabs/general.php:31
     152#: admin/tabs/general.php:14
    160153msgid "The default yearly interest rate."
    161154msgstr "La tasa de interés anual predeterminada."
    162155
    163 #: admin/tabs/general.php:33
     156#: admin/tabs/general.php:15
    164157msgid "Default Term (Years)"
    165158msgstr "Plazo predeterminado (Años)"
    166159
    167 #: admin/tabs/general.php:34
     160#: admin/tabs/general.php:16
    168161msgid "The default loan term in years."
    169162msgstr "El plazo predeterminado del préstamo en años."
    170163
    171 #: admin/tabs/general.php:36
     164#: admin/tabs/general.php:17
    172165msgid "Cleanup on Uninstall"
    173166msgstr "Eliminar datos al desinstalar"
    174167
    175 #: admin/tabs/general.php:37
     168#: admin/tabs/general.php:18
    176169msgid "Delete all plugin data when uninstalling"
    177170msgstr "Eliminar todos los datos del plugin al desinstalar"
    178171
    179 #: admin/tabs/general.php:38
     172#: admin/tabs/general.php:19
    180173msgid ""
    181174"If enabled, all EHMC settings will be permanently removed when the plugin is "
     
    185178"desinstalar el plugin."
    186179
    187 #: admin/tabs/shortcode.php:3
     180#: admin/tabs/shortcode.php:4
    188181msgid ""
    189182"Use this shortcode to display the mortgage calculator anywhere on your site."
     
    204197msgstr "Pega este shortcode en cualquier página, entrada o widget."
    205198
     199#: admin/tabs/shortcode.php:8
     200msgid "Copy shortcode to clipboard"
     201msgstr "Copiar shortcode al portapapeles"
     202
    206203#: admin/tabs/shortcode.php:9
    207204msgid "Example Usage"
     
    213210"No se requiere ningún atributo; la calculadora utiliza los ajustes guardados."
    214211
    215 #: admin/tabs/styling.php:8
     212#: admin/tabs/styling.php:3
    216213msgid "Styling Options"
    217214msgstr "Opciones de Estilo"
    218215
    219 #: admin/tabs/styling.php:9
     216#: admin/tabs/styling.php:4
    220217msgid "Customize the appearance of the mortgage calculator on the frontend."
    221218msgstr ""
    222219"Personaliza la apariencia de la calculadora hipotecaria en la página pública."
    223220
    224 #: admin/tabs/styling.php:11
     221#: admin/tabs/styling.php:5
    225222msgid "Primary Color"
    226223msgstr "Color principal"
    227224
    228 #: admin/tabs/styling.php:12
     225#: admin/tabs/styling.php:6
    229226msgid "Used for highlights and accents."
    230227msgstr "Se utiliza para resaltar y acentuar."
    231228
    232 #: admin/tabs/styling.php:14
     229#: admin/tabs/styling.php:7
    233230msgid "Calculate Button Color"
    234231msgstr "Color del botón Calcular"
    235232
    236 #: admin/tabs/styling.php:15
     233#: admin/tabs/styling.php:8
    237234msgid "Color of the Calculate button."
    238235msgstr "Color para el botón Calcular."
    239236
    240 #: admin/tabs/styling.php:17
     237#: admin/tabs/styling.php:9
    241238msgid "Reset Button Color"
    242239msgstr "Color del botón Restablecer"
    243240
    244 #: admin/tabs/styling.php:18
     241#: admin/tabs/styling.php:10
    245242msgid "Color of the Reset button."
    246243msgstr "Color para el botón Restablecer."
    247244
    248 #: admin/tabs/styling.php:20
     245#: admin/tabs/styling.php:11
    249246msgid "Table Header Color"
    250247msgstr "Color del encabezado de la tabla"
    251248
    252 #: admin/tabs/styling.php:21
     249#: admin/tabs/styling.php:12
    253250msgid "Background color for the amortization table header."
    254251msgstr "Color de fondo para el encabezado de la tabla de amortización."
    255252
    256 #: admin/tabs/styling.php:23
     253#: admin/tabs/styling.php:13
    257254msgid "Border Radius"
    258255msgstr "Radio del borde"
    259256
    260 #: admin/tabs/styling.php:25
     257#: admin/tabs/styling.php:15
    261258msgid "None"
    262259msgstr "Ninguno"
    263260
    264 #: admin/tabs/styling.php:26
     261#: admin/tabs/styling.php:16
    265262msgid "Small (4px)"
    266263msgstr "Pequeño (4px)"
    267264
    268 #: admin/tabs/styling.php:27
     265#: admin/tabs/styling.php:17
    269266msgid "Medium (8px)"
    270267msgstr "Mediano (8px)"
    271268
    272 #: admin/tabs/styling.php:28
     269#: admin/tabs/styling.php:18
    273270msgid "Large (12px)"
    274271msgstr "Grande (12px)"
    275272
    276 #: admin/tabs/styling.php:30
     273#: admin/tabs/styling.php:20
    277274msgid "Controls the roundness of input fields, buttons, and cards."
    278275msgstr "Controla el redondeo de los campos de entrada, botones y tarjetas."
    279276
    280 #: includes/class-ehmc-admin.php:11
    281 msgid "Mortgage"
    282 msgstr "Hipoteca"
    283 
    284 #: includes/class-ehmc-assets.php:40 templates/calculator.php:27
     277#: includes/class-ehmc-admin.php:14
     278msgid "Mortgage Calculator"
     279msgstr "Calculadora de hipoteca"
     280
     281#: includes/class-ehmc-admin.php:33
     282msgid "Calculate"
     283msgstr "Calcular"
     284
     285#: includes/class-ehmc-admin.php:34
     286msgid "Reset"
     287msgstr "Restablecer"
     288
     289#: includes/class-ehmc-assets.php:40 templates/calculator.php:22
    285290msgid "Principal"
    286291msgstr "Principal"
    287292
    288 #: includes/class-ehmc-assets.php:41 templates/calculator.php:28
     293#: includes/class-ehmc-assets.php:41 templates/calculator.php:23
    289294msgid "Interest"
    290295msgstr "Interés"
    291296
    292 #: includes/class-ehmc-assets.php:43
     297#: includes/class-ehmc-assets.php:42
    293298msgid "Monthly Payment"
    294299msgstr "Pago Mensual"
    295300
    296 #: includes/class-ehmc-assets.php:44
     301#: includes/class-ehmc-assets.php:43
    297302msgid "Total Interest"
    298303msgstr "Interés Total"
    299304
    300 #: includes/class-ehmc-assets.php:45
     305#: includes/class-ehmc-assets.php:44
    301306msgid "Total Paid"
    302307msgstr "Total Pagado"
     
    306311msgstr "Este bloque mostrará la calculadora en el sitio web."
    307312
     313#: templates/calculator.php:9
     314msgid "Please enter an amount between 10,000 and 20,000,000"
     315msgstr "Por favor, introduzca una cantidad entre 10.000 y 20.000.000"
     316
    308317#: templates/calculator.php:10
    309 msgid "Please enter a loan amount, e.g. \"40,000\", \"50,000.23\""
    310 msgstr "Por favor, ingresa un monto de préstamo, ej. \"40.000\", \"50.000.23\""
    311 
    312 #: templates/calculator.php:12
     318msgid "Please enter a number between 1 and 25, e.g. \"5\", \"5.5\", \"5.75\""
     319msgstr ""
     320"Por favor, ingresa un número entre 1 y 25, ej. \"5\", \"5,5\", \"5,75\""
     321
     322#: templates/calculator.php:11
     323msgid "Please enter a number between 1 and 45: no decimals allowed"
     324msgstr "Por favor, ingresa un número entre 1 y 45: no se permiten decimales"
     325
     326#: templates/calculator.php:13
    313327msgid "Yearly Interest"
    314328msgstr "Interés Anual"
    315329
    316 #: templates/calculator.php:13
    317 msgid "Please enter a number between 1 and 25, e.g. \"5\", \"5.5\", \"5.75\""
    318 msgstr ""
    319 "Por favor, ingresa un número entre 1 y 25, ej. \"5\", \"5,5\", \"5,75\""
    320 
    321 #: templates/calculator.php:15
     330#: templates/calculator.php:14
    322331msgid "Number of years"
    323332msgstr "Número de años"
    324333
    325 #: templates/calculator.php:16
    326 msgid "Please enter a number between 1 and 45: no decimals allowed"
    327 msgstr "Por favor, ingresa un número entre 1 y 45: no se permiten decimales"
    328 
    329 #: templates/calculator.php:22
     334#: templates/calculator.php:17
    330335msgid "Payment Breakdown"
    331336msgstr "Desglose del Pago"
    332337
    333 #: templates/calculator.php:23
     338#: templates/calculator.php:18
    334339msgid "Summary"
    335340msgstr "Resumen"
    336341
    337 #: templates/calculator.php:26
     342#: templates/calculator.php:21
    338343msgid "Payment"
    339344msgstr "Pago"
    340345
    341 #: templates/calculator.php:29
     346#: templates/calculator.php:24
    342347msgid "Balance"
    343348msgstr "Saldo"
    344349
    345 #: templates/calculator.php:31
     350#: templates/calculator.php:25
    346351msgid "Amortization results pages"
    347352msgstr "Páginas de resultados de amortización"
    348353
    349 #: assets/js/modules/EHMortgageCalculator.js:226
     354#: assets/js/modules/EHMortgageCalculator.js:236
    350355msgid "Previous"
    351356msgstr "Anterior"
    352357
    353 #: assets/js/modules/EHMortgageCalculator.js:256
     358#: assets/js/modules/EHMortgageCalculator.js:266
    354359msgid "Next"
    355360msgstr "Siguiente"
     
    380385msgstr "préstamo"
    381386
     387#~ msgid "Mortgage"
     388#~ msgstr "Hipoteca"
     389
    382390#~ msgid "Loan amount:"
    383391#~ msgstr "Monto del Préstamo:"
  • eh-mortgage-calculator/trunk/languages/eh-mortgage-calculator.pot

    r3441254 r3441776  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: EH Mortgage Calculator 3.0.0\n"
     5"Project-Id-Version: EH Mortgage Calculator 3.1.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/eh-mortgage-calculator\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2026-01-16T20:00:18+00:00\n"
     12"POT-Creation-Date: 2026-01-18T05:30:23+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.12.0\n"
     
    3131
    3232#: admin/settings-page.php:2
    33 #: includes/class-ehmc-admin.php:10
     33#: includes/class-ehmc-admin.php:13
    3434msgid "Mortgage Calculator Settings"
    3535msgstr ""
     
    4848
    4949#: admin/settings-page.php:6
    50 #: admin/tabs/shortcode.php:2
     50#: admin/tabs/shortcode.php:3
    5151msgid "Shortcode"
    5252msgstr ""
     
    5656msgstr ""
    5757
     58#: admin/tabs/display.php:3
     59msgid "Display Options"
     60msgstr ""
     61
     62#: admin/tabs/display.php:4
     63msgid "Choose which elements of the calculator should be visible on the frontend."
     64msgstr ""
     65
     66#: admin/tabs/display.php:5
     67msgid "Show Summary Box"
     68msgstr ""
     69
    5870#: admin/tabs/display.php:6
    59 msgid "Display Options"
     71msgid "Enable summary section (monthly payment, total interest, total cost)"
    6072msgstr ""
    6173
    6274#: admin/tabs/display.php:7
    63 msgid "Choose which elements of the calculator should be visible on the frontend."
     75msgid "Show Amortization Table"
     76msgstr ""
     77
     78#: admin/tabs/display.php:8
     79msgid "Display full amortization schedule"
    6480msgstr ""
    6581
    6682#: admin/tabs/display.php:9
    67 msgid "Show Summary Box"
     83msgid "Show Chart"
    6884msgstr ""
    6985
    7086#: admin/tabs/display.php:10
    71 msgid "Enable summary section (monthly payment, total interest, total cost)"
    72 msgstr ""
    73 
    74 #: admin/tabs/display.php:12
    75 msgid "Show Amortization Table"
    76 msgstr ""
    77 
    78 #: admin/tabs/display.php:13
    79 msgid "Display full amortization schedule"
    80 msgstr ""
    81 
    82 #: admin/tabs/display.php:15
    83 msgid "Show Chart"
    84 msgstr ""
    85 
    86 #: admin/tabs/display.php:16
    8787msgid "Display a visual chart"
    8888msgstr ""
    8989
    90 #: admin/tabs/display.php:17
     90#: admin/tabs/display.php:11
    9191msgid "A simple doughnut chart that visualizes the breakdown of principal and interest."
    9292msgstr ""
    9393
     94#: admin/tabs/general.php:3
     95msgid "General Settings"
     96msgstr ""
     97
     98#: admin/tabs/general.php:4
     99msgid "Control the default values and labels used in the mortgage calculator."
     100msgstr ""
     101
     102#: admin/tabs/general.php:5
     103msgid "Label"
     104msgstr ""
     105
     106#: admin/tabs/general.php:6
     107msgid "Calculate Button"
     108msgstr ""
     109
    94110#: admin/tabs/general.php:7
    95 msgid "Label"
     111msgid "Reset Button"
     112msgstr ""
     113
     114#: admin/tabs/general.php:8
     115#: includes/class-ehmc-admin.php:30
     116#: templates/calculator.php:12
     117msgid "Loan Amount"
    96118msgstr ""
    97119
    98120#: admin/tabs/general.php:9
    99 msgid "Calculate Button"
     121#: includes/class-ehmc-admin.php:31
     122msgid "Interest Rate"
    100123msgstr ""
    101124
    102125#: admin/tabs/general.php:10
    103 msgid "Reset Button"
     126#: includes/class-ehmc-admin.php:32
     127msgid "Years"
     128msgstr ""
     129
     130#: admin/tabs/general.php:11
     131msgid "Default Loan Amount"
    104132msgstr ""
    105133
    106134#: admin/tabs/general.php:12
    107 #: templates/calculator.php:9
    108 msgid "Loan Amount"
     135msgid "The starting loan amount shown in the calculator."
    109136msgstr ""
    110137
    111138#: admin/tabs/general.php:13
    112 msgid "Interest Rate"
     139msgid "Default Interest Rate (%)"
    113140msgstr ""
    114141
    115142#: admin/tabs/general.php:14
    116 msgid "Years"
     143msgid "The default yearly interest rate."
    117144msgstr ""
    118145
    119146#: admin/tabs/general.php:15
    120 msgid "Calculate"
     147msgid "Default Term (Years)"
    121148msgstr ""
    122149
    123150#: admin/tabs/general.php:16
    124 msgid "Reset"
    125 msgstr ""
    126 
    127 #: admin/tabs/general.php:24
    128 msgid "General Settings"
    129 msgstr ""
    130 
    131 #: admin/tabs/general.php:25
    132 msgid "Control the default values and labels used in the mortgage calculator."
    133 msgstr ""
    134 
    135 #: admin/tabs/general.php:27
    136 msgid "Default Loan Amount"
    137 msgstr ""
    138 
    139 #: admin/tabs/general.php:28
    140 msgid "The starting loan amount shown in the calculator."
    141 msgstr ""
    142 
    143 #: admin/tabs/general.php:30
    144 msgid "Default Interest Rate (%)"
    145 msgstr ""
    146 
    147 #: admin/tabs/general.php:31
    148 msgid "The default yearly interest rate."
    149 msgstr ""
    150 
    151 #: admin/tabs/general.php:33
    152 msgid "Default Term (Years)"
    153 msgstr ""
    154 
    155 #: admin/tabs/general.php:34
    156151msgid "The default loan term in years."
    157152msgstr ""
    158153
    159 #: admin/tabs/general.php:36
     154#: admin/tabs/general.php:17
    160155msgid "Cleanup on Uninstall"
    161156msgstr ""
    162157
    163 #: admin/tabs/general.php:37
     158#: admin/tabs/general.php:18
    164159msgid "Delete all plugin data when uninstalling"
    165160msgstr ""
    166161
    167 #: admin/tabs/general.php:38
     162#: admin/tabs/general.php:19
    168163msgid "If enabled, all EHMC settings will be permanently removed when the plugin is deleted."
    169164msgstr ""
    170165
    171 #: admin/tabs/shortcode.php:3
     166#: admin/tabs/shortcode.php:4
    172167msgid "Use this shortcode to display the mortgage calculator anywhere on your site."
    173168msgstr ""
     
    185180msgstr ""
    186181
     182#: admin/tabs/shortcode.php:8
     183msgid "Copy shortcode to clipboard"
     184msgstr ""
     185
    187186#: admin/tabs/shortcode.php:9
    188187msgid "Example Usage"
     
    193192msgstr ""
    194193
     194#: admin/tabs/styling.php:3
     195msgid "Styling Options"
     196msgstr ""
     197
     198#: admin/tabs/styling.php:4
     199msgid "Customize the appearance of the mortgage calculator on the frontend."
     200msgstr ""
     201
     202#: admin/tabs/styling.php:5
     203msgid "Primary Color"
     204msgstr ""
     205
     206#: admin/tabs/styling.php:6
     207msgid "Used for highlights and accents."
     208msgstr ""
     209
     210#: admin/tabs/styling.php:7
     211msgid "Calculate Button Color"
     212msgstr ""
     213
    195214#: admin/tabs/styling.php:8
    196 msgid "Styling Options"
     215msgid "Color of the Calculate button."
    197216msgstr ""
    198217
    199218#: admin/tabs/styling.php:9
    200 msgid "Customize the appearance of the mortgage calculator on the frontend."
     219msgid "Reset Button Color"
     220msgstr ""
     221
     222#: admin/tabs/styling.php:10
     223msgid "Color of the Reset button."
    201224msgstr ""
    202225
    203226#: admin/tabs/styling.php:11
    204 msgid "Primary Color"
     227msgid "Table Header Color"
    205228msgstr ""
    206229
    207230#: admin/tabs/styling.php:12
    208 msgid "Used for highlights and accents."
    209 msgstr ""
    210 
    211 #: admin/tabs/styling.php:14
    212 msgid "Calculate Button Color"
     231msgid "Background color for the amortization table header."
     232msgstr ""
     233
     234#: admin/tabs/styling.php:13
     235msgid "Border Radius"
    213236msgstr ""
    214237
    215238#: admin/tabs/styling.php:15
    216 msgid "Color of the Calculate button."
     239msgid "None"
     240msgstr ""
     241
     242#: admin/tabs/styling.php:16
     243msgid "Small (4px)"
    217244msgstr ""
    218245
    219246#: admin/tabs/styling.php:17
    220 msgid "Reset Button Color"
     247msgid "Medium (8px)"
    221248msgstr ""
    222249
    223250#: admin/tabs/styling.php:18
    224 msgid "Color of the Reset button."
     251msgid "Large (12px)"
    225252msgstr ""
    226253
    227254#: admin/tabs/styling.php:20
    228 msgid "Table Header Color"
    229 msgstr ""
    230 
    231 #: admin/tabs/styling.php:21
    232 msgid "Background color for the amortization table header."
    233 msgstr ""
    234 
    235 #: admin/tabs/styling.php:23
    236 msgid "Border Radius"
    237 msgstr ""
    238 
    239 #: admin/tabs/styling.php:25
    240 msgid "None"
    241 msgstr ""
    242 
    243 #: admin/tabs/styling.php:26
    244 msgid "Small (4px)"
    245 msgstr ""
    246 
    247 #: admin/tabs/styling.php:27
    248 msgid "Medium (8px)"
    249 msgstr ""
    250 
    251 #: admin/tabs/styling.php:28
    252 msgid "Large (12px)"
    253 msgstr ""
    254 
    255 #: admin/tabs/styling.php:30
    256255msgid "Controls the roundness of input fields, buttons, and cards."
    257256msgstr ""
    258257
    259 #: includes/class-ehmc-admin.php:11
    260 msgid "Mortgage"
     258#: includes/class-ehmc-admin.php:14
     259msgid "Mortgage Calculator"
     260msgstr ""
     261
     262#: includes/class-ehmc-admin.php:33
     263msgid "Calculate"
     264msgstr ""
     265
     266#: includes/class-ehmc-admin.php:34
     267msgid "Reset"
    261268msgstr ""
    262269
    263270#: includes/class-ehmc-assets.php:40
    264 #: templates/calculator.php:27
     271#: templates/calculator.php:22
    265272msgid "Principal"
    266273msgstr ""
    267274
    268275#: includes/class-ehmc-assets.php:41
    269 #: templates/calculator.php:28
     276#: templates/calculator.php:23
    270277msgid "Interest"
    271278msgstr ""
    272279
     280#: includes/class-ehmc-assets.php:42
     281msgid "Monthly Payment"
     282msgstr ""
     283
    273284#: includes/class-ehmc-assets.php:43
    274 msgid "Monthly Payment"
     285msgid "Total Interest"
    275286msgstr ""
    276287
    277288#: includes/class-ehmc-assets.php:44
    278 msgid "Total Interest"
    279 msgstr ""
    280 
    281 #: includes/class-ehmc-assets.php:45
    282289msgid "Total Paid"
    283290msgstr ""
     
    287294msgstr ""
    288295
     296#: templates/calculator.php:9
     297msgid "Please enter an amount between 10,000 and 20,000,000"
     298msgstr ""
     299
    289300#: templates/calculator.php:10
    290 msgid "Please enter a loan amount, e.g. \"40,000\", \"50,000.23\""
    291 msgstr ""
    292 
    293 #: templates/calculator.php:12
     301msgid "Please enter a number between 1 and 25, e.g. \"5\", \"5.5\", \"5.75\""
     302msgstr ""
     303
     304#: templates/calculator.php:11
     305msgid "Please enter a number between 1 and 45: no decimals allowed"
     306msgstr ""
     307
     308#: templates/calculator.php:13
    294309msgid "Yearly Interest"
    295310msgstr ""
    296311
    297 #: templates/calculator.php:13
    298 msgid "Please enter a number between 1 and 25, e.g. \"5\", \"5.5\", \"5.75\""
    299 msgstr ""
    300 
    301 #: templates/calculator.php:15
     312#: templates/calculator.php:14
    302313msgid "Number of years"
    303314msgstr ""
    304315
    305 #: templates/calculator.php:16
    306 msgid "Please enter a number between 1 and 45: no decimals allowed"
    307 msgstr ""
    308 
    309 #: templates/calculator.php:22
     316#: templates/calculator.php:17
    310317msgid "Payment Breakdown"
    311318msgstr ""
    312319
    313 #: templates/calculator.php:23
     320#: templates/calculator.php:18
    314321msgid "Summary"
    315322msgstr ""
    316323
    317 #: templates/calculator.php:26
     324#: templates/calculator.php:21
    318325msgid "Payment"
    319326msgstr ""
    320327
    321 #: templates/calculator.php:29
     328#: templates/calculator.php:24
    322329msgid "Balance"
    323330msgstr ""
    324331
    325 #: templates/calculator.php:31
     332#: templates/calculator.php:25
    326333msgid "Amortization results pages"
    327334msgstr ""
    328335
    329 #: assets/js/modules/EHMortgageCalculator.js:226
     336#: assets/js/modules/EHMortgageCalculator.js:236
    330337msgid "Previous"
    331338msgstr ""
    332339
    333 #: assets/js/modules/EHMortgageCalculator.js:256
     340#: assets/js/modules/EHMortgageCalculator.js:266
    334341msgid "Next"
    335342msgstr ""
  • eh-mortgage-calculator/trunk/templates/calculator.php

    r3441254 r3441776  
    77
    88// Form
    9 $loan_amount_placeholder = esc_attr__( 'Loan Amount', 'eh-mortgage-calculator' );
    10 $loan_amount_error       = esc_html__( 'Please enter a loan amount, e.g. "40,000", "50,000.23"', 'eh-mortgage-calculator' );
    11 
    12 $interest_placeholder    = esc_attr__( 'Yearly Interest', 'eh-mortgage-calculator' );
    13 $interest_error          = esc_html__( 'Please enter a number between 1 and 25, e.g. "5", "5.5", "5.75"', 'eh-mortgage-calculator' );
    14 
    15 $term_placeholder        = esc_attr__( 'Number of years', 'eh-mortgage-calculator' );
    16 $term_error              = esc_html__( 'Please enter a number between 1 and 45: no decimals allowed', 'eh-mortgage-calculator' );
    17 
    18 $calculate_aria_label    = esc_attr( $calculate );
    19 $reset_aria_label        = esc_attr( $reset );
     9$loan_amount_error       = __( 'Please enter an amount between 10,000 and 20,000,000', 'eh-mortgage-calculator' );
     10$interest_error          = __( 'Please enter a number between 1 and 25, e.g. "5", "5.5", "5.75"', 'eh-mortgage-calculator' );
     11$term_error              = __( 'Please enter a number between 1 and 45: no decimals allowed', 'eh-mortgage-calculator' );
     12$loan_amount_placeholder = __( 'Loan Amount', 'eh-mortgage-calculator' );
     13$interest_placeholder    = __( 'Yearly Interest', 'eh-mortgage-calculator' );
     14$term_placeholder        = __( 'Number of years', 'eh-mortgage-calculator' );
    2015
    2116// Chart Box
    22 $chart_title   = esc_attr__( 'Payment Breakdown', 'eh-mortgage-calculator' );
    23 $summary_title = esc_attr__( 'Summary', 'eh-mortgage-calculator' );
     17$chart_title             = __( 'Payment Breakdown', 'eh-mortgage-calculator' );
     18$summary_title           = __( 'Summary', 'eh-mortgage-calculator' );
    2419
    2520// Table
    26 $payment_label   = esc_html__( 'Payment', 'eh-mortgage-calculator' );
    27 $principal_label = esc_html__( 'Principal', 'eh-mortgage-calculator' );
    28 $interest_label  = esc_html__( 'Interest', 'eh-mortgage-calculator' );
    29 $balance_label   = esc_html__( 'Balance', 'eh-mortgage-calculator' );
     21$payment_label           = __( 'Payment', 'eh-mortgage-calculator' );
     22$principal_label         = __( 'Principal', 'eh-mortgage-calculator' );
     23$interest_label          = __( 'Interest', 'eh-mortgage-calculator' );
     24$balance_label           = __( 'Balance', 'eh-mortgage-calculator' );
     25$results_aria_label      = __( 'Amortization results pages', 'eh-mortgage-calculator' );
    3026
    31 $results_aria_label = esc_attr__( 'Amortization results pages', 'eh-mortgage-calculator' );
    32 
    33 ####################################
    3427// Load saved settings
    35 $default_amount   = get_option('ehmc_default_amount', '300000');
    36 $default_interest = get_option('ehmc_default_interest', '6.5');
    37 $default_years    = get_option('ehmc_default_years', '30');
     28$default_amount         = get_option('ehmc_default_amount', '300000');
     29$default_interest       = get_option('ehmc_default_interest', '6.5');
     30$default_years          = get_option('ehmc_default_years', '30');
    3831
    3932$label_amount           = get_option('ehmc_label_amount', 'Loan Amount');
     
    4336$label_button_reset     = get_option('ehmc_label_button_reset', 'Reset');
    4437
    45 $show_summary     = get_option('ehmc_show_summary', '1');
    46 $show_table       = get_option('ehmc_show_table', '1');
    47 $show_chart       = get_option('ehmc_show_chart', '0');
     38$show_summary           = get_option('ehmc_show_summary', '1');
     39$show_table             = get_option('ehmc_show_table', '1');
     40$show_chart             = get_option('ehmc_show_chart', '0');
    4841
    4942$primary_color          = get_option('ehmc_primary_color', '#2271b1');
     
    5245$table_header_color     = get_option('ehmc_table_header_color', '#f1f1f1');
    5346$border_radius          = get_option('ehmc_border_radius', 'medium');
    54 
    5547?>
    5648
     
    6658        <div class="mb-3" id="principal-group-<?= esc_attr( $instance ); ?>">
    6759            <label class="form-label" for="principal-<?= esc_attr( $instance ); ?>"><?= esc_html( $label_amount ); ?></label>
    68             <input type="number" class="form-control" id="principal-<?= esc_attr( $instance ); ?>"
    69                    min="10000" max="1000000" step="1000" value="<?= esc_attr( $default_amount ); ?>"
    70                    placeholder="<?= $loan_amount_placeholder ?>" autofocus />
    71             <p class="invalid-feedback" id="principal-error-<?= esc_attr( $instance ); ?>"><?= $loan_amount_error ?></p>
     60            <input name="principal" type="number" class="form-control" id="principal-<?= esc_attr( $instance ); ?>"
     61                   min="10000" max="20000000" step="1000" value="<?= esc_attr( $default_amount ); ?>"
     62                   placeholder="<?= esc_attr( $loan_amount_placeholder ) ?>" autofocus />
     63            <p class="invalid-feedback" id="principal-error-<?= esc_attr( $instance ); ?>"><?= esc_html( $loan_amount_error ) ?></p>
    7264        </div>
     65       
    7366        <div class="mb-3" id="interest-group-<?= esc_attr( $instance ); ?>">
    7467            <label class="form-label" for="interest-<?= esc_attr( $instance ); ?>"><?= esc_html( $label_interest ); ?></label>
    75             <input type="number" class="form-control" id="interest-<?= esc_attr( $instance ); ?>"
    76                    min="1" max="25" value="<?= esc_attr( $default_interest ); ?>"
    77                    placeholder="<?= $interest_placeholder ?>" />
    78             <p class="invalid-feedback" id="interest-error-<?= esc_attr( $instance ); ?>"><?= $interest_error ?></p>
     68            <input name="interest" type="number" class="form-control" id="interest-<?= esc_attr( $instance ); ?>"
     69                   min="1" max="25" step="0.01" value="<?= esc_attr( $default_interest ); ?>"
     70                   placeholder="<?= esc_attr( $interest_placeholder ) ?>" />
     71            <p class="invalid-feedback" id="interest-error-<?= esc_attr( $instance ); ?>"><?= esc_html( $interest_error ) ?></p>
    7972        </div>
     73       
    8074        <div class="mb-3" id="term-group-<?= esc_attr( $instance ); ?>">
    8175            <label class="form-label" for="term-<?= esc_attr( $instance ); ?>"><?= esc_html( $label_years ); ?></label>
    82             <input type="number" class="form-control" id="term-<?= esc_attr( $instance ); ?>"
    83                    min="1" max="45" value="<?= esc_attr( $default_years ); ?>"
    84                    placeholder="<?= $term_placeholder ?>" />
    85             <p class="invalid-feedback" id="term-error-<?= esc_attr( $instance ); ?>"><?= $term_error ?></p>
     76            <input name="term" type="number" class="form-control" id="term-<?= esc_attr( $instance ); ?>"
     77                   min="1" max="45" step="5" value="<?= esc_attr( $default_years ); ?>"
     78                   placeholder="<?= esc_attr( $term_placeholder ) ?>" />
     79            <p class="invalid-feedback" id="term-error-<?= esc_attr( $instance ); ?>"><?= esc_html( $term_error ) ?></p>
    8680        </div>
     81       
    8782        <div class="mb-3 text-center">
    88             <button type="submit" class="btn btn-primary" aria-label="<?= $calculate_aria_label ?>" id="ehmc-submit-<?= esc_attr( $instance ); ?>">
     83            <button type="submit" class="btn btn-primary" aria-label="<?= esc_attr( $label_button_calculate ) ?>" id="ehmc-submit-<?= esc_attr( $instance ); ?>">
    8984                  <?= esc_html( $label_button_calculate ); ?>
    9085            </button>
    91             <button type="reset" class="btn btn-secondary" aria-label="<?= $reset_aria_label ?>" id="ehmc-reset-<?= esc_attr( $instance ); ?>">
     86            <button type="reset" class="btn btn-secondary" aria-label="<?= esc_attr( $label_button_reset ) ?>" id="ehmc-reset-<?= esc_attr( $instance ); ?>">
    9287                  <?= esc_html( $label_button_reset ); ?>
    9388            </button>
     
    10095            <div class="ehmc-summary-box card h-100" id="ehmc-summary-<?= esc_attr($instance); ?>" hidden>
    10196                <div class="card-body">
    102                     <h5 class="card-title"><?= $summary_title ?></h5>
    103                     <p class="ehmc-summary-payment mb-1"></p>
    104                     <p class="ehmc-summary-total-interest mb-1"></p>
    105                     <p class="ehmc-summary-total-paid mb-0"></p>
     97                    <h5 class="card-title"><?= esc_html( $summary_title ) ?></h5>
     98                    <p class="ehmc-summary-payment mb-1" aria-live="polite"></p>
     99                    <p class="ehmc-summary-total-interest mb-1" aria-live="polite"></p>
     100                    <p class="ehmc-summary-total-paid mb-0" aria-live="polite"></p>
    106101                </div>
    107102            </div>
     
    113108            <div class="ehmc-chart-card card h-100" id="ehmc-chart-card-<?= esc_attr($instance); ?>" hidden>
    114109                <div class="card-body">
    115                     <h5 class="card-title text-center"><?= $chart_title ?></h5>
     110                    <h5 class="card-title text-center"><?= esc_html( $chart_title ) ?></h5>
    116111                    <div class="chart-wrapper">
    117112                    <canvas id="ehmc-chart-<?= esc_attr($instance); ?>"></canvas>
     
    123118    <?php endif; ?>
    124119    <?php if ( $show_table === '1' ) : ?>
    125     <!<!-- Table area -->
     120    <!-- Table area -->
    126121    <table class="table table-striped ehmc-table" id="table-<?= esc_attr( $instance ); ?>">
    127122      <thead>
    128123          <tr>
    129124              <th class="text-right">#</th>
    130               <th class="text-right"><?= $payment_label ?></th>
    131               <th class="text-right"><?= $principal_label ?></th>
    132               <th class="text-right"><?= $interest_label ?></th>
    133               <th class="text-right"><?= $balance_label ?></th>
     125              <th class="text-right"><?= esc_html( $payment_label ) ?></th>
     126              <th class="text-right"><?= esc_html( $principal_label ) ?></th>
     127              <th class="text-right"><?= esc_html( $interest_label ) ?></th>
     128              <th class="text-right"><?= esc_html( $balance_label ) ?></th>
    134129          </tr>
    135130      </thead>
     
    137132          <tr>
    138133              <td colspan="5">
    139                   <nav aria-label="<?= $results_aria_label ?>">
     134                  <nav aria-label="<?= esc_attr( $results_aria_label ) ?>">
    140135                      <ul class="ehmc-pagination pagination justify-content-center flex-wrap" id="pagination-<?= esc_attr( $instance ); ?>"></ul>
    141136                  </nav>
     
    143138          </tr>
    144139      </tfoot>
    145       <tbody id="amortization-<?= esc_attr( $instance ); ?>"></tbody>
     140      <tbody id="amortization-<?= esc_attr( $instance ); ?>" aria-live="polite"></tbody>
    146141    </table>
    147142    <?php endif; ?>
  • eh-mortgage-calculator/trunk/uninstall.php

    r3441254 r3441776  
    88}
    99
     10// Only delete data if the user opted in
    1011if ( get_option('ehmc_delete_data_on_uninstall') !== '1' ) {
    1112    return;
     
    2930    'ehmc_show_table',
    3031    'ehmc_show_chart',
     32    // Delete the uninstall flag itself
     33    'ehmc_delete_data_on_uninstall'
    3134];
    3235
     
    3538    delete_option( $setting );
    3639}
     40
     41// Optional: multisite cleanup
     42if ( is_multisite() ) {
     43    foreach ( $settings as $setting ) {
     44        delete_site_option( $setting );
     45    }
     46}
Note: See TracChangeset for help on using the changeset viewer.