Plugin Directory

Changeset 2758870 for anrghg


Ignore:
Timestamp:
07/19/2022 09:49:12 PM (4 years ago)
Author:
anrghg
Message:

1.4.7.0
To be released ahead of changing the delimiter presets,
so that legacy presets are saved to the DB for stability.
In Gutenberg, square brackets are used as a shortcut, for page link insertion.
Thus, these must not be used any longer to delimit inline sources or endnotes.

1.4.7 (2022-07-19)

  • Notes and sources: Centralize delimiter preset configuration.
  • Notes and sources: Get delimiter presets saved to the DB.
Location:
anrghg
Files:
1 deleted
16 edited
1 copied

Legend:

Unmodified
Added
Removed
  • anrghg/tags/1.4.7/admin/anrghg-admin.php

    r2757183 r2758870  
    507507
    508508/**
     509 * Generates a hidden prefill saver.
     510 *
     511 * @since 0.70.0
     512 * The prefill is the input field’s default value, and it is also
     513 * held in a separate, dedicated key, whose value is saved to the
     514 * database so as to become immutable, to be used for reference.
     515 * @param  array  $p_a_post_meta  Data.
     516 * @param  string $p_s_key        Settings key.
     517 * @return string $l_s_output
     518 */
     519function anrghg_metabox_save_prefill(
     520    $p_a_post_meta,
     521    $p_s_key
     522) {
     523    $l_s_output  = '<input type="hidden" name="' . $p_s_key . '" value="';
     524    $l_s_output .= esc_attr( $p_a_post_meta[ $p_s_key ] ) . '" />';
     525    return $l_s_output;
     526}
     527
     528/**
    509529 * Generates a single radio button.
    510530 *
     
    847867    $l_s_output .= $p_s_information ? '<br />' . $p_s_information : '';
    848868    $l_s_output .= $p_s_label ? '</label>' : '';
    849     return $l_s_output;
    850 }
    851 
    852 /**
    853  * Generates a hidden prefill saver.
    854  *
    855  * @since 0.70.0
    856  * The prefill is the input field’s default value, and it is also
    857  * held in a separate, dedicated key, whose value is saved to the
    858  * database so as to become immutable, to be used for reference.
    859  * @param  array  $p_a_post_meta  Data.
    860  * @param  string $p_s_key        Settings key.
    861  * @return string $l_s_output
    862  */
    863 function anrghg_metabox_save_prefill(
    864     $p_a_post_meta,
    865     $p_s_key
    866 ) {
    867     $l_s_output  = '<input type="hidden" name="' . $p_s_key . '" value="';
    868     $l_s_output .= esc_attr( $p_a_post_meta[ $p_s_key ] ) . '" />';
    869869    return $l_s_output;
    870870}
  • anrghg/tags/1.4.7/admin/includes/settings.php

    r2758223 r2758870  
    22832283        $l_s_section,
    22842284        'anrghg_note_delimiter_preset',
     2285        'anrghg_easy_note_start',
     2286        'anrghg_easy_note_end',
     2287        'anrghg_safe_note_start',
     2288        'anrghg_safe_note_end',
    22852289        'anrghg_free_note_start',
    22862290        'anrghg_free_note_end'
     
    22932297        $l_s_section,
    22942298        'anrghg_source_delimiter_preset',
     2299        'anrghg_easy_source_start',
     2300        'anrghg_easy_source_end',
     2301        'anrghg_safe_source_start',
     2302        'anrghg_safe_source_end',
    22952303        'anrghg_free_source_start',
    22962304        'anrghg_free_source_end'
     
    23032311        $l_s_section,
    23042312        'anrghg_name_delimiter_preset',
     2313        'anrghg_easy_name_start',
     2314        'anrghg_easy_name_end',
     2315        'anrghg_safe_name_start',
     2316        'anrghg_safe_name_end',
    23052317        'anrghg_free_name_start',
    23062318        'anrghg_free_name_end'
     
    24512463        $l_s_section,
    24522464        'anrghg_tooltip_delimiter_preset',
     2465        'anrghg_easy_tooltip_end',
     2466        'anrghg_safe_tooltip_end',
    24532467        'anrghg_free_tooltip_end'
    24542468    );
     
    24602474        $l_s_section,
    24612475        'anrghg_list_link_delimiter_preset',
     2476        'anrghg_easy_list_link_start',
     2477        'anrghg_easy_list_link_end',
     2478        'anrghg_safe_list_link_start',
     2479        'anrghg_safe_list_link_end',
    24622480        'anrghg_free_list_link_start',
    24632481        'anrghg_free_list_link_end'
     
    32493267    $l_s_output .= "\"></span></span>\r\n";
    32503268    echo wp_kses( $l_s_output, $p_a_params['ok'] );
     3269}
     3270
     3271/**
     3272 * Generates a hidden preset saver.
     3273 *
     3274 * @since 0.70.0 For Post Meta box.
     3275 * @see anrghg_metabox_save_prefill().
     3276 * @since 1.4.7 Port to settings page.
     3277 * @since 1.4.7 Centralize delimiter preset configuration.
     3278 * @since 1.4.7 Get delimiter presets saved to the DB.
     3279 * The preset is the delimiter’s default value that must be saved
     3280 * to the database so as to become immutable, to avoid disrupting
     3281 * existing installations when the default needs to be changed.
     3282 * In Gutenberg, square brackets are used as a shortcut, for page link insertion.
     3283 * Thus, these must not be used any longer to delimit inline sources or endnotes.
     3284 * @param  array  $p_a_params Settings keys and other parameters.
     3285 * @param  int    $p_i_index  If not first in field.
     3286 * @return string $l_s_output
     3287 */
     3288function anrghg_save_preset(
     3289    $p_a_params,
     3290    $p_i_index = 0
     3291) {
     3292    $l_s_output  = '<input type="hidden" name="anrghg[' . $p_a_params[ 'key_' . $p_i_index ] . ']"';
     3293    $l_s_output .= ' value="' . esc_attr( $p_a_params[ 'val_' . $p_i_index ] ) . '" />';
     3294    return $l_s_output;
    32513295}
    32523296
     
    83948438                '-1',
    83958439                // Translators: %s: Delimiter code.
    8396                 sprintf( __( 'Easy input: %s', 'anrghg' ), '<code>{{{</code> … <code>}}}</code>' ),
     8440                sprintf( __( 'Easy input: %s', 'anrghg' ), '<code>' . esc_attr( $p_a_params['val_1'] ) . '</code> … <code>' . esc_attr( $p_a_params['val_2'] ) . '</code>' ),
    83978441                $p_a_params
    83988442            ),
     8443            anrghg_save_preset( $p_a_params, 1 ),
     8444            anrghg_save_preset( $p_a_params, 2 ),
    83998445            anrghg_discrete_radio_button(
    84008446                1,
    84018447                '1',
    84028448                // Translators: %s: Delimiter code.
    8403                 sprintf( __( 'Unambiguous: %s', 'anrghg' ), '<code>[note]</code> … <code>[/note]</code>' ),
     8449                sprintf( __( 'Unambiguous: %s', 'anrghg' ), '<code>' . esc_attr( $p_a_params['val_3'] ) . '</code> … <code>' . esc_attr( $p_a_params['val_4'] ) . '</code>' ),
    84048450                $p_a_params
    84058451            ),
     8452            anrghg_save_preset( $p_a_params, 3 ),
     8453            anrghg_save_preset( $p_a_params, 4 ),
    84068454            anrghg_discrete_radio_button(
    84078455                2,
     
    84188466                    '',
    84198467                    $p_a_params,
    8420                     1
     8468                    5
    84218469                ),
    84228470                '<span class="field-ellipsis">…</span>',
     
    84288476                    '',
    84298477                    $p_a_params,
    8430                     2
     8478                    6
    84318479                )
    84328480            ),
     
    84608508                '-1',
    84618509                // Translators: %s: Delimiter code.
    8462                 sprintf( __( 'Easy input: %s', 'anrghg' ), '<code>[[[</code> … <code>]]]</code>' ),
     8510                sprintf( __( 'Easy input: %s', 'anrghg' ), '<code>' . esc_attr( $p_a_params['val_1'] ) . '</code> … <code>' . esc_attr( $p_a_params['val_2'] ) . '</code>' ),
    84638511                $p_a_params
    84648512            ),
     8513            anrghg_save_preset( $p_a_params, 1 ),
     8514            anrghg_save_preset( $p_a_params, 2 ),
    84658515            anrghg_discrete_radio_button(
    84668516                1,
    84678517                '1',
    84688518                // Translators: %s: Delimiter code.
    8469                 sprintf( __( 'Unambiguous: %s', 'anrghg' ), '<code>[src]</code> … <code>[/src]</code>' ),
     8519                sprintf( __( 'Unambiguous: %s', 'anrghg' ), '<code>' . esc_attr( $p_a_params['val_3'] ) . '</code> … <code>' . esc_attr( $p_a_params['val_4'] ) . '</code>' ),
    84708520                $p_a_params
    84718521            ),
     8522            anrghg_save_preset( $p_a_params, 3 ),
     8523            anrghg_save_preset( $p_a_params, 4 ),
    84728524            anrghg_discrete_radio_button(
    84738525                2,
     
    84848536                    '',
    84858537                    $p_a_params,
    8486                     1
     8538                    5
    84878539                ),
    84888540                '<span class="field-ellipsis">…</span>',
     
    84948546                    '',
    84958547                    $p_a_params,
    8496                     2
     8548                    6
    84978549                )
    84988550            )
     
    85278579                '-1',
    85288580                // Translators: %s: Delimiter code.
    8529                 sprintf( __( 'Easy input: %s', 'anrghg' ), '<code>[[</code> … <code>]]</code>' ),
     8581                sprintf( __( 'Easy input: %s', 'anrghg' ), '<code>' . esc_attr( $p_a_params['val_1'] ) . '</code> … <code>' . esc_attr( $p_a_params['val_2'] ) . '</code>' ),
    85308582                $p_a_params
    85318583            ),
     8584            anrghg_save_preset( $p_a_params, 1 ),
     8585            anrghg_save_preset( $p_a_params, 2 ),
    85328586            anrghg_discrete_radio_button(
    85338587                1,
    85348588                '1',
    85358589                // Translators: %s: Delimiter code.
    8536                 sprintf( __( 'Unambiguous: %s', 'anrghg' ), '<code>[name]</code> … <code>[/name]</code>' ),
     8590                sprintf( __( 'Unambiguous: %s', 'anrghg' ), '<code>' . esc_attr( $p_a_params['val_3'] ) . '</code> … <code>' . esc_attr( $p_a_params['val_4'] ) . '</code>' ),
    85378591                $p_a_params
    85388592            ),
     8593            anrghg_save_preset( $p_a_params, 3 ),
     8594            anrghg_save_preset( $p_a_params, 4 ),
    85398595            anrghg_discrete_radio_button(
    85408596                2,
     
    85518607                    '',
    85528608                    $p_a_params,
    8553                     1
     8609                    5
    85548610                ),
    85558611                '<span class="field-ellipsis">…</span>',
     
    85618617                    '',
    85628618                    $p_a_params,
    8563                     2
     8619                    6
    85648620                )
    85658621            )
     
    90119067    anrghg_settings_section_link( $p_a_params );
    90129068    anrghg_introduction(
    9013         __( 'These tooltips work without JavaScript and are fully AMP compatible.', 'anrghg' ),
    9014         __( 'On combined complements’ list numbers, the list of anchors is displayed in similar tooltips by default.', 'anrghg' )
     9069        __( 'These tooltips work without JavaScript and are fully AMP compatible.', 'anrghg' )
    90159070    );
    90169071}
     
    90779132                '-1',
    90789133                // Translators: %s: Delimiter code.
    9079                 sprintf( __( 'Easy input: %s', 'anrghg' ), '<code>||</code>' ),
     9134                sprintf( __( 'Easy input: %s', 'anrghg' ), '<code>' . esc_attr( $p_a_params['val_1'] ) . '</code>' ),
    90809135                $p_a_params
    90819136            ),
     9137            anrghg_save_preset( $p_a_params, 1 ),
    90829138            anrghg_discrete_radio_button(
    90839139                1,
    90849140                '1',
    90859141                // Translators: %s: Delimiter code.
    9086                 sprintf( __( 'Unambiguous: %s', 'anrghg' ), '<code>[/view]</code>' ),
     9142                sprintf( __( 'Unambiguous: %s', 'anrghg' ), '<code>' . esc_attr( $p_a_params['val_2'] ) . '</code>' ),
    90879143                $p_a_params
    90889144            ),
     9145            anrghg_save_preset( $p_a_params, 2 ),
    90899146            anrghg_discrete_radio_button(
    90909147                2,
     
    91019158                    '',
    91029159                    $p_a_params,
    9103                     1
     9160                    3
    91049161                )
    91059162            )
     
    91359192                '-1',
    91369193                // Translators: %s: Delimiter code.
    9137                 sprintf( __( 'Easy input: %s', 'anrghg' ), '<code>{{</code> … <code>}}</code>' ),
     9194                sprintf( __( 'Easy input: %s', 'anrghg' ), '<code>' . esc_attr( $p_a_params['val_1'] ) . '</code> … <code>' . esc_attr( $p_a_params['val_2'] ) . '</code>' ),
    91389195                $p_a_params
    91399196            ),
     9197            anrghg_save_preset( $p_a_params, 1 ),
     9198            anrghg_save_preset( $p_a_params, 2 ),
    91409199            anrghg_discrete_radio_button(
    91419200                1,
    91429201                '1',
    91439202                // Translators: %s: Delimiter code.
    9144                 sprintf( __( 'Unambiguous: %s', 'anrghg' ), '<code>[link]</code> … <code>[/link]</code>' ),
     9203                sprintf( __( 'Unambiguous: %s', 'anrghg' ), '<code>' . esc_attr( $p_a_params['val_3'] ) . '</code> … <code>' . esc_attr( $p_a_params['val_4'] ) . '</code>' ),
    91459204                $p_a_params
    91469205            ),
     9206            anrghg_save_preset( $p_a_params, 3 ),
     9207            anrghg_save_preset( $p_a_params, 4 ),
    91479208            anrghg_discrete_radio_button(
    91489209                2,
     
    91599220                    '',
    91609221                    $p_a_params,
    9161                     1
     9222                    5
    91629223                ),
    91639224                '<span class="field-ellipsis">…</span>',
     
    91699230                    '',
    91709231                    $p_a_params,
    9171                     2
     9232                    6
    91729233                )
    91739234            )
  • anrghg/tags/1.4.7/anrghg.php

    r2758223 r2758870  
    1414 * Tested PHP up to: 8.0
    1515 * CAUTION: The following field is parsed in the `stable tag` folder for upgrade configuration:
    16  * Version: 1.4.6
     16 * Version: 1.4.7
    1717 * Author: ANRGHG
    1818 * Author URI: https://anrghg.sunsite.fr
     
    3939 *
    4040 * @todo Security: Display login dialog status in settings, in Admin area header.
     41 * @todo Notes and sources: Replace square bracket based delimiter presets (saved to the DB).
    4142 * @todo Localization: Add option to simplify configured HTML anchors, default to no.
    4243 * @todo Thank You message: Make style names configurable, add settings for each one.
     
    8788 * @var string C_S_ANRGHG_VER  Plugin version constant.
    8889 */
    89 define( 'C_S_ANRGHG_VER', '1.4.6' );
     90define( 'C_S_ANRGHG_VER', '1.4.7' );
    9091
    9192/**
     
    422423 * Keys must not be longer than 44 characters, because of alignment
    423424 * issues reported by PHPCS when these keys are longer than that.
     425 *
     426 * @since 1.4.7 Centralize delimiter preset configuration.
     427 * The preset is the delimiter’s default value that must be saved
     428 * to the database so as to become immutable, to avoid disrupting
     429 * existing installations when the default needs to be changed.
     430 * In Gutenberg, square brackets are used as a shortcut, for page link insertion.
     431 * Thus, these must not be used any longer to delimit inline sources or endnotes.
    424432 *
    425433 * @return void
     
    702710            'anrghg_complements_excluded_posts'            => '', // comma-separated post IDs.
    703711            'anrghg_note_delimiter_preset'                 => '1', // -1 easy, 0 free, 1 safe.
     712            'anrghg_easy_note_start'                       => '{{{',
     713            'anrghg_easy_note_end'                         => '}}}',
     714            'anrghg_safe_note_start'                       => '[note]',
     715            'anrghg_safe_note_end'                         => '[/note]',
    704716            'anrghg_free_note_start'                       => '[σημ]',
    705717            'anrghg_free_note_end'                         => '[/σημ]',
     
    707719            'anrghg_note_end'                              => '', // Determined below.
    708720            'anrghg_source_delimiter_preset'               => '1', // -1 easy, 0 free, 1 safe.
     721            'anrghg_easy_source_start'                     => '[[[',
     722            'anrghg_easy_source_end'                       => ']]]',
     723            'anrghg_safe_source_start'                     => '[src]',
     724            'anrghg_safe_source_end'                       => '[/src]',
    709725            'anrghg_free_source_start'                     => '[упом]',
    710726            'anrghg_free_source_end'                       => '[/упом]',
     
    712728            'anrghg_source_end'                            => '', // Determined below.
    713729            'anrghg_name_delimiter_preset'                 => '1', // -1 easy, 0 free, 1 safe.
     730            'anrghg_easy_name_start'                       => '[[',
     731            'anrghg_easy_name_end'                         => ']]',
     732            'anrghg_safe_name_start'                       => '[name]',
     733            'anrghg_safe_name_end'                         => '[/name]',
    714734            'anrghg_free_name_start'                       => '[이름]',
    715735            'anrghg_free_name_end'                         => '[/이름]',
     
    755775            'anrghg_display_anchor_tooltips_on_tap'        => '0',
    756776            'anrghg_tooltip_delimiter_preset'              => '1', // -1 easy, 0 free, 1 safe.
     777            'anrghg_easy_tooltip_end'                      => '||',
     778            'anrghg_safe_tooltip_end'                      => '[/view]',
    757779            'anrghg_free_tooltip_end'                      => '[/ดู]',
    758780            'anrghg_anchor_tooltip_end'                    => '', // Determined below.
    759781            'anrghg_list_link_delimiter_preset'            => '1', // -1 easy, 0 free, 1 safe.
     782            'anrghg_easy_list_link_start'                  => '{{',
     783            'anrghg_easy_list_link_end'                    => '}}',
     784            'anrghg_safe_list_link_start'                  => '[link]',
     785            'anrghg_safe_list_link_end'                    => '[/link]',
    760786            'anrghg_free_list_link_start'                  => '[リンク]',
    761787            'anrghg_free_list_link_end'                    => '[/リンク]',
     
    925951        switch ( $g_a_anrghg_config['anrghg_note_delimiter_preset'] ) {
    926952            case '-1':
    927                 $g_a_anrghg_config['anrghg_note_start'] = '{{{';
    928                 $g_a_anrghg_config['anrghg_note_end']   = '}}}';
     953                $g_a_anrghg_config['anrghg_note_start'] = $g_a_anrghg_config['anrghg_easy_note_start'];
     954                $g_a_anrghg_config['anrghg_note_end']   = $g_a_anrghg_config['anrghg_easy_note_end'];
    929955                break;
    930956            case '0':
     
    934960            case '1':
    935961            default:
    936                 $g_a_anrghg_config['anrghg_note_start'] = '[note]';
    937                 $g_a_anrghg_config['anrghg_note_end']   = '[/note]';
     962                $g_a_anrghg_config['anrghg_note_start'] = $g_a_anrghg_config['anrghg_safe_note_start'];
     963                $g_a_anrghg_config['anrghg_note_end']   = $g_a_anrghg_config['anrghg_safe_note_end'];
    938964        }
    939965        switch ( $g_a_anrghg_config['anrghg_source_delimiter_preset'] ) {
    940966            case '-1':
    941                 $g_a_anrghg_config['anrghg_source_start'] = '[[[';
    942                 $g_a_anrghg_config['anrghg_source_end']   = ']]]';
     967                $g_a_anrghg_config['anrghg_source_start'] = $g_a_anrghg_config['anrghg_easy_source_start'];
     968                $g_a_anrghg_config['anrghg_source_end']   = $g_a_anrghg_config['anrghg_easy_source_end'];
    943969                break;
    944970            case '0':
     
    948974            case '1':
    949975            default:
    950                 $g_a_anrghg_config['anrghg_source_start'] = '[src]';
    951                 $g_a_anrghg_config['anrghg_source_end']   = '[/src]';
     976                $g_a_anrghg_config['anrghg_source_start'] = $g_a_anrghg_config['anrghg_safe_source_start'];
     977                $g_a_anrghg_config['anrghg_source_end']   = $g_a_anrghg_config['anrghg_safe_source_end'];
    952978        }
    953979        switch ( $g_a_anrghg_config['anrghg_name_delimiter_preset'] ) {
    954980            case '-1':
    955                 $g_a_anrghg_config['anrghg_complement_name_start'] = '[[';
    956                 $g_a_anrghg_config['anrghg_complement_name_end']   = ']]';
     981                $g_a_anrghg_config['anrghg_complement_name_start'] = $g_a_anrghg_config['anrghg_easy_name_start'];
     982                $g_a_anrghg_config['anrghg_complement_name_end']   = $g_a_anrghg_config['anrghg_easy_name_end'];
    957983                break;
    958984            case '0':
     
    962988            case '1':
    963989            default:
    964                 $g_a_anrghg_config['anrghg_complement_name_start'] = '[name]';
    965                 $g_a_anrghg_config['anrghg_complement_name_end']   = '[/name]';
     990                $g_a_anrghg_config['anrghg_complement_name_start'] = $g_a_anrghg_config['anrghg_safe_name_start'];
     991                $g_a_anrghg_config['anrghg_complement_name_end']   = $g_a_anrghg_config['anrghg_safe_name_end'];
    966992        }
    967993        switch ( $g_a_anrghg_config['anrghg_tooltip_delimiter_preset'] ) {
    968994            case '-1':
    969                 $g_a_anrghg_config['anrghg_anchor_tooltip_end'] = '||';
     995                $g_a_anrghg_config['anrghg_anchor_tooltip_end'] = $g_a_anrghg_config['anrghg_easy_tooltip_end'];
    970996                break;
    971997            case '0':
     
    9741000            case '1':
    9751001            default:
    976                 $g_a_anrghg_config['anrghg_anchor_tooltip_end'] = '[/view]';
     1002                $g_a_anrghg_config['anrghg_anchor_tooltip_end'] = $g_a_anrghg_config['anrghg_safe_tooltip_end'];
    9771003        }
    9781004        switch ( $g_a_anrghg_config['anrghg_list_link_delimiter_preset'] ) {
    9791005            case '-1':
    980                 $g_a_anrghg_config['anrghg_anchor_tooltip_list_link_start'] = '{{';
    981                 $g_a_anrghg_config['anrghg_anchor_tooltip_list_link_end']   = '}}';
     1006                $g_a_anrghg_config['anrghg_anchor_tooltip_list_link_start'] = $g_a_anrghg_config['anrghg_easy_list_link_start'];
     1007                $g_a_anrghg_config['anrghg_anchor_tooltip_list_link_end']   = $g_a_anrghg_config['anrghg_easy_list_link_end'];
    9821008                break;
    9831009            case '0':
     
    9871013            case '1':
    9881014            default:
    989                 $g_a_anrghg_config['anrghg_anchor_tooltip_list_link_start'] = '[link]';
    990                 $g_a_anrghg_config['anrghg_anchor_tooltip_list_link_end']   = '[/link]';
     1015                $g_a_anrghg_config['anrghg_anchor_tooltip_list_link_start'] = $g_a_anrghg_config['anrghg_safe_list_link_start'];
     1016                $g_a_anrghg_config['anrghg_anchor_tooltip_list_link_end']   = $g_a_anrghg_config['anrghg_safe_list_link_end'];
    9911017        }
    9921018
  • anrghg/tags/1.4.7/includes/styles.php

    r2758223 r2758870  
    10631063            $l_s_referrer_padding_rule = '';
    10641064        }
    1065         $l_s_referrer_color      = 'inherit'; // Optionally not stand out.
    1066         $l_s_referrer_color      = '#008000'; // Optional contrast with other links.
    1067         $l_s_referrer_color_rule = ''; // For link color, there must be no color rule.
     1065        $l_s_concatenator_spacing = ''; // provisional @todo.
     1066        $l_s_referrer_color       = 'inherit'; // Optionally not stand out.
     1067        $l_s_referrer_color       = '#008000'; // Optional contrast with other links.
     1068        $l_s_referrer_color_rule  = ''; // For link color, there must be no color rule.
    10681069        if ( ! true ) {
    10691070            $l_s_referrer_color_rule = "color: $l_s_referrer_color;";
     
    10861087
    10871088                    .anrghg-referrer-source,
    1088                     .anrghg-referrer-note {
    1089                         $l_s_referrer_color_rule
     1089                    .anrghg-referrer-note,
     1090                    .anrghg-referrer-concatenator {
    10901091                        vertical-align: $l_s_vertical_align;
    10911092                        font-size: $l_s_referrer_font_size !important;
     
    10931094                        letter-spacing: $l_s_referrer_letter_spacing;
    10941095                        line-height: 0;
     1096                    }
     1097
     1098                    .anrghg-referrer-source,
     1099                    .anrghg-referrer-note {
     1100                        $l_s_referrer_color_rule
    10951101                        text-decoration: $l_s_referrer_decoration;
    10961102                        border-bottom: $l_s_referrer_bottom_border;
    10971103                    }
    10981104
    1099                     .anrghg-referrer-concatenator {
    1100                         vertical-align: $l_s_vertical_align;
    1101                         font-size: $l_s_referrer_font_size !important;
    1102                         font-weight: $l_s_referrer_font_weight;
    1103                         line-height: 0;
     1105                    .anrghg-referrer-concatenator:after {
     1106                        padding-inline-end: $l_s_concatenator_spacing;
    11041107                    }
    11051108
  • anrghg/tags/1.4.7/package.json

    r2758223 r2758870  
    11{
    22    "name": "anrghg",
    3     "version": " 1.4.6",
     3    "version": " 1.4.7",
    44    "description": "A.N.R.GHG Publishing Helper",
    55    "main": "index.js",
  • anrghg/tags/1.4.7/readme.txt

    r2758223 r2758870  
    88Requires PHP: 5.6
    99Tested PHP up to: 8.0
    10 Package Version: 1.4.6.0
    11 Version: 1.4.6
     10Package Version: 1.4.7.0
     11Version: 1.4.7
    1212CAUTION: The following field is parsed in `trunk/` for release configuration:
    13 Stable Tag: 1.4.6
     13Stable Tag: 1.4.7
    1414License: GPLv2 or later
    1515License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    534534== Changelog ==
    535535
     536= 1.4.7 (2022-07-19) =
     537
     538* Notes and sources: Centralize delimiter preset configuration.
     539* Notes and sources: Get delimiter presets saved to the DB.
     540
    536541= 1.4.6 (2022-07-18) =
    537542
     
    539544* Backup: Fix uploads directory for multisite installations.
    540545* Template editor: Remove backup preview and bulk upload advice.
    541 * Import: Clarify label of ‘Import and Add’ button.
    542 * Settings: Correct display of backup paths of templates/settings.
    543 * Settings: Add hint about bulk-uploading templates.
     546* Import: Templates: Clarify label of ‘Import and Add’ button.
     547* Settings: Backup: Correct display of backup paths of templates, settings.
     548* Settings: Backup: Add hint about bulk-uploading templates.
    544549
    545550= 1.4.5 (2022-07-17) =
  • anrghg/tags/1.4.7/svn-revs.txt

    r2758223 r2758870  
    1111Previous revisions:
    1212
     131.4.6.0        2758223  2022-07-18 22:48:19 +0000 (Mon, 18 Jul 2022)
    13141.4.5.0        2757477  2022-07-17 02:47:18 +0000 (Sun, 17 Jul 2022)
    14151.4.4.0        2757183  2022-07-15 22:52:35 +0000 (Fri, 15 Jul 2022)
  • anrghg/tags/1.4.7/tpl-filter-config.php

    r2758223 r2758870  
    23382338
    23392339// 'anrghg_note_delimiter_preset'
     2340// 'anrghg_easy_note_start'
     2341// 'anrghg_easy_note_end'
     2342// 'anrghg_safe_note_start'
     2343// 'anrghg_safe_note_end'
    23402344// 'anrghg_free_note_start'
    23412345// 'anrghg_free_note_end'
    23422346// 'anrghg_source_delimiter_preset'
     2347// 'anrghg_easy_source_start'
     2348// 'anrghg_easy_source_end'
     2349// 'anrghg_safe_source_start'
     2350// 'anrghg_safe_source_end'
    23432351// 'anrghg_free_source_start'
    23442352// 'anrghg_free_source_end'
    23452353// 'anrghg_name_delimiter_preset'
     2354// 'anrghg_easy_name_start'
     2355// 'anrghg_easy_name_end'
     2356// 'anrghg_safe_name_start'
     2357// 'anrghg_safe_name_end'
    23462358// 'anrghg_free_name_start'
    23472359// 'anrghg_free_name_end'
    23482360// 'anrghg_tooltip_delimiter_preset'
     2361// 'anrghg_easy_tooltip_end'
     2362// 'anrghg_safe_tooltip_end'
    23492363// 'anrghg_free_tooltip_end'
    23502364// 'anrghg_list_link_delimiter_preset'
     2365// 'anrghg_easy_list_link_start'
     2366// 'anrghg_easy_list_link_end'
     2367// 'anrghg_safe_list_link_start'
     2368// 'anrghg_safe_list_link_end'
    23512369// 'anrghg_free_list_link_start'
    23522370// 'anrghg_free_list_link_end'
  • anrghg/trunk/admin/anrghg-admin.php

    r2757183 r2758870  
    507507
    508508/**
     509 * Generates a hidden prefill saver.
     510 *
     511 * @since 0.70.0
     512 * The prefill is the input field’s default value, and it is also
     513 * held in a separate, dedicated key, whose value is saved to the
     514 * database so as to become immutable, to be used for reference.
     515 * @param  array  $p_a_post_meta  Data.
     516 * @param  string $p_s_key        Settings key.
     517 * @return string $l_s_output
     518 */
     519function anrghg_metabox_save_prefill(
     520    $p_a_post_meta,
     521    $p_s_key
     522) {
     523    $l_s_output  = '<input type="hidden" name="' . $p_s_key . '" value="';
     524    $l_s_output .= esc_attr( $p_a_post_meta[ $p_s_key ] ) . '" />';
     525    return $l_s_output;
     526}
     527
     528/**
    509529 * Generates a single radio button.
    510530 *
     
    847867    $l_s_output .= $p_s_information ? '<br />' . $p_s_information : '';
    848868    $l_s_output .= $p_s_label ? '</label>' : '';
    849     return $l_s_output;
    850 }
    851 
    852 /**
    853  * Generates a hidden prefill saver.
    854  *
    855  * @since 0.70.0
    856  * The prefill is the input field’s default value, and it is also
    857  * held in a separate, dedicated key, whose value is saved to the
    858  * database so as to become immutable, to be used for reference.
    859  * @param  array  $p_a_post_meta  Data.
    860  * @param  string $p_s_key        Settings key.
    861  * @return string $l_s_output
    862  */
    863 function anrghg_metabox_save_prefill(
    864     $p_a_post_meta,
    865     $p_s_key
    866 ) {
    867     $l_s_output  = '<input type="hidden" name="' . $p_s_key . '" value="';
    868     $l_s_output .= esc_attr( $p_a_post_meta[ $p_s_key ] ) . '" />';
    869869    return $l_s_output;
    870870}
  • anrghg/trunk/admin/includes/settings.php

    r2758223 r2758870  
    22832283        $l_s_section,
    22842284        'anrghg_note_delimiter_preset',
     2285        'anrghg_easy_note_start',
     2286        'anrghg_easy_note_end',
     2287        'anrghg_safe_note_start',
     2288        'anrghg_safe_note_end',
    22852289        'anrghg_free_note_start',
    22862290        'anrghg_free_note_end'
     
    22932297        $l_s_section,
    22942298        'anrghg_source_delimiter_preset',
     2299        'anrghg_easy_source_start',
     2300        'anrghg_easy_source_end',
     2301        'anrghg_safe_source_start',
     2302        'anrghg_safe_source_end',
    22952303        'anrghg_free_source_start',
    22962304        'anrghg_free_source_end'
     
    23032311        $l_s_section,
    23042312        'anrghg_name_delimiter_preset',
     2313        'anrghg_easy_name_start',
     2314        'anrghg_easy_name_end',
     2315        'anrghg_safe_name_start',
     2316        'anrghg_safe_name_end',
    23052317        'anrghg_free_name_start',
    23062318        'anrghg_free_name_end'
     
    24512463        $l_s_section,
    24522464        'anrghg_tooltip_delimiter_preset',
     2465        'anrghg_easy_tooltip_end',
     2466        'anrghg_safe_tooltip_end',
    24532467        'anrghg_free_tooltip_end'
    24542468    );
     
    24602474        $l_s_section,
    24612475        'anrghg_list_link_delimiter_preset',
     2476        'anrghg_easy_list_link_start',
     2477        'anrghg_easy_list_link_end',
     2478        'anrghg_safe_list_link_start',
     2479        'anrghg_safe_list_link_end',
    24622480        'anrghg_free_list_link_start',
    24632481        'anrghg_free_list_link_end'
     
    32493267    $l_s_output .= "\"></span></span>\r\n";
    32503268    echo wp_kses( $l_s_output, $p_a_params['ok'] );
     3269}
     3270
     3271/**
     3272 * Generates a hidden preset saver.
     3273 *
     3274 * @since 0.70.0 For Post Meta box.
     3275 * @see anrghg_metabox_save_prefill().
     3276 * @since 1.4.7 Port to settings page.
     3277 * @since 1.4.7 Centralize delimiter preset configuration.
     3278 * @since 1.4.7 Get delimiter presets saved to the DB.
     3279 * The preset is the delimiter’s default value that must be saved
     3280 * to the database so as to become immutable, to avoid disrupting
     3281 * existing installations when the default needs to be changed.
     3282 * In Gutenberg, square brackets are used as a shortcut, for page link insertion.
     3283 * Thus, these must not be used any longer to delimit inline sources or endnotes.
     3284 * @param  array  $p_a_params Settings keys and other parameters.
     3285 * @param  int    $p_i_index  If not first in field.
     3286 * @return string $l_s_output
     3287 */
     3288function anrghg_save_preset(
     3289    $p_a_params,
     3290    $p_i_index = 0
     3291) {
     3292    $l_s_output  = '<input type="hidden" name="anrghg[' . $p_a_params[ 'key_' . $p_i_index ] . ']"';
     3293    $l_s_output .= ' value="' . esc_attr( $p_a_params[ 'val_' . $p_i_index ] ) . '" />';
     3294    return $l_s_output;
    32513295}
    32523296
     
    83948438                '-1',
    83958439                // Translators: %s: Delimiter code.
    8396                 sprintf( __( 'Easy input: %s', 'anrghg' ), '<code>{{{</code> … <code>}}}</code>' ),
     8440                sprintf( __( 'Easy input: %s', 'anrghg' ), '<code>' . esc_attr( $p_a_params['val_1'] ) . '</code> … <code>' . esc_attr( $p_a_params['val_2'] ) . '</code>' ),
    83978441                $p_a_params
    83988442            ),
     8443            anrghg_save_preset( $p_a_params, 1 ),
     8444            anrghg_save_preset( $p_a_params, 2 ),
    83998445            anrghg_discrete_radio_button(
    84008446                1,
    84018447                '1',
    84028448                // Translators: %s: Delimiter code.
    8403                 sprintf( __( 'Unambiguous: %s', 'anrghg' ), '<code>[note]</code> … <code>[/note]</code>' ),
     8449                sprintf( __( 'Unambiguous: %s', 'anrghg' ), '<code>' . esc_attr( $p_a_params['val_3'] ) . '</code> … <code>' . esc_attr( $p_a_params['val_4'] ) . '</code>' ),
    84048450                $p_a_params
    84058451            ),
     8452            anrghg_save_preset( $p_a_params, 3 ),
     8453            anrghg_save_preset( $p_a_params, 4 ),
    84068454            anrghg_discrete_radio_button(
    84078455                2,
     
    84188466                    '',
    84198467                    $p_a_params,
    8420                     1
     8468                    5
    84218469                ),
    84228470                '<span class="field-ellipsis">…</span>',
     
    84288476                    '',
    84298477                    $p_a_params,
    8430                     2
     8478                    6
    84318479                )
    84328480            ),
     
    84608508                '-1',
    84618509                // Translators: %s: Delimiter code.
    8462                 sprintf( __( 'Easy input: %s', 'anrghg' ), '<code>[[[</code> … <code>]]]</code>' ),
     8510                sprintf( __( 'Easy input: %s', 'anrghg' ), '<code>' . esc_attr( $p_a_params['val_1'] ) . '</code> … <code>' . esc_attr( $p_a_params['val_2'] ) . '</code>' ),
    84638511                $p_a_params
    84648512            ),
     8513            anrghg_save_preset( $p_a_params, 1 ),
     8514            anrghg_save_preset( $p_a_params, 2 ),
    84658515            anrghg_discrete_radio_button(
    84668516                1,
    84678517                '1',
    84688518                // Translators: %s: Delimiter code.
    8469                 sprintf( __( 'Unambiguous: %s', 'anrghg' ), '<code>[src]</code> … <code>[/src]</code>' ),
     8519                sprintf( __( 'Unambiguous: %s', 'anrghg' ), '<code>' . esc_attr( $p_a_params['val_3'] ) . '</code> … <code>' . esc_attr( $p_a_params['val_4'] ) . '</code>' ),
    84708520                $p_a_params
    84718521            ),
     8522            anrghg_save_preset( $p_a_params, 3 ),
     8523            anrghg_save_preset( $p_a_params, 4 ),
    84728524            anrghg_discrete_radio_button(
    84738525                2,
     
    84848536                    '',
    84858537                    $p_a_params,
    8486                     1
     8538                    5
    84878539                ),
    84888540                '<span class="field-ellipsis">…</span>',
     
    84948546                    '',
    84958547                    $p_a_params,
    8496                     2
     8548                    6
    84978549                )
    84988550            )
     
    85278579                '-1',
    85288580                // Translators: %s: Delimiter code.
    8529                 sprintf( __( 'Easy input: %s', 'anrghg' ), '<code>[[</code> … <code>]]</code>' ),
     8581                sprintf( __( 'Easy input: %s', 'anrghg' ), '<code>' . esc_attr( $p_a_params['val_1'] ) . '</code> … <code>' . esc_attr( $p_a_params['val_2'] ) . '</code>' ),
    85308582                $p_a_params
    85318583            ),
     8584            anrghg_save_preset( $p_a_params, 1 ),
     8585            anrghg_save_preset( $p_a_params, 2 ),
    85328586            anrghg_discrete_radio_button(
    85338587                1,
    85348588                '1',
    85358589                // Translators: %s: Delimiter code.
    8536                 sprintf( __( 'Unambiguous: %s', 'anrghg' ), '<code>[name]</code> … <code>[/name]</code>' ),
     8590                sprintf( __( 'Unambiguous: %s', 'anrghg' ), '<code>' . esc_attr( $p_a_params['val_3'] ) . '</code> … <code>' . esc_attr( $p_a_params['val_4'] ) . '</code>' ),
    85378591                $p_a_params
    85388592            ),
     8593            anrghg_save_preset( $p_a_params, 3 ),
     8594            anrghg_save_preset( $p_a_params, 4 ),
    85398595            anrghg_discrete_radio_button(
    85408596                2,
     
    85518607                    '',
    85528608                    $p_a_params,
    8553                     1
     8609                    5
    85548610                ),
    85558611                '<span class="field-ellipsis">…</span>',
     
    85618617                    '',
    85628618                    $p_a_params,
    8563                     2
     8619                    6
    85648620                )
    85658621            )
     
    90119067    anrghg_settings_section_link( $p_a_params );
    90129068    anrghg_introduction(
    9013         __( 'These tooltips work without JavaScript and are fully AMP compatible.', 'anrghg' ),
    9014         __( 'On combined complements’ list numbers, the list of anchors is displayed in similar tooltips by default.', 'anrghg' )
     9069        __( 'These tooltips work without JavaScript and are fully AMP compatible.', 'anrghg' )
    90159070    );
    90169071}
     
    90779132                '-1',
    90789133                // Translators: %s: Delimiter code.
    9079                 sprintf( __( 'Easy input: %s', 'anrghg' ), '<code>||</code>' ),
     9134                sprintf( __( 'Easy input: %s', 'anrghg' ), '<code>' . esc_attr( $p_a_params['val_1'] ) . '</code>' ),
    90809135                $p_a_params
    90819136            ),
     9137            anrghg_save_preset( $p_a_params, 1 ),
    90829138            anrghg_discrete_radio_button(
    90839139                1,
    90849140                '1',
    90859141                // Translators: %s: Delimiter code.
    9086                 sprintf( __( 'Unambiguous: %s', 'anrghg' ), '<code>[/view]</code>' ),
     9142                sprintf( __( 'Unambiguous: %s', 'anrghg' ), '<code>' . esc_attr( $p_a_params['val_2'] ) . '</code>' ),
    90879143                $p_a_params
    90889144            ),
     9145            anrghg_save_preset( $p_a_params, 2 ),
    90899146            anrghg_discrete_radio_button(
    90909147                2,
     
    91019158                    '',
    91029159                    $p_a_params,
    9103                     1
     9160                    3
    91049161                )
    91059162            )
     
    91359192                '-1',
    91369193                // Translators: %s: Delimiter code.
    9137                 sprintf( __( 'Easy input: %s', 'anrghg' ), '<code>{{</code> … <code>}}</code>' ),
     9194                sprintf( __( 'Easy input: %s', 'anrghg' ), '<code>' . esc_attr( $p_a_params['val_1'] ) . '</code> … <code>' . esc_attr( $p_a_params['val_2'] ) . '</code>' ),
    91389195                $p_a_params
    91399196            ),
     9197            anrghg_save_preset( $p_a_params, 1 ),
     9198            anrghg_save_preset( $p_a_params, 2 ),
    91409199            anrghg_discrete_radio_button(
    91419200                1,
    91429201                '1',
    91439202                // Translators: %s: Delimiter code.
    9144                 sprintf( __( 'Unambiguous: %s', 'anrghg' ), '<code>[link]</code> … <code>[/link]</code>' ),
     9203                sprintf( __( 'Unambiguous: %s', 'anrghg' ), '<code>' . esc_attr( $p_a_params['val_3'] ) . '</code> … <code>' . esc_attr( $p_a_params['val_4'] ) . '</code>' ),
    91459204                $p_a_params
    91469205            ),
     9206            anrghg_save_preset( $p_a_params, 3 ),
     9207            anrghg_save_preset( $p_a_params, 4 ),
    91479208            anrghg_discrete_radio_button(
    91489209                2,
     
    91599220                    '',
    91609221                    $p_a_params,
    9161                     1
     9222                    5
    91629223                ),
    91639224                '<span class="field-ellipsis">…</span>',
     
    91699230                    '',
    91709231                    $p_a_params,
    9171                     2
     9232                    6
    91729233                )
    91739234            )
  • anrghg/trunk/anrghg.php

    r2758223 r2758870  
    1414 * Tested PHP up to: 8.0
    1515 * CAUTION: The following field is parsed in the `stable tag` folder for upgrade configuration:
    16  * Version: 1.4.6
     16 * Version: 1.4.7
    1717 * Author: ANRGHG
    1818 * Author URI: https://anrghg.sunsite.fr
     
    3939 *
    4040 * @todo Security: Display login dialog status in settings, in Admin area header.
     41 * @todo Notes and sources: Replace square bracket based delimiter presets (saved to the DB).
    4142 * @todo Localization: Add option to simplify configured HTML anchors, default to no.
    4243 * @todo Thank You message: Make style names configurable, add settings for each one.
     
    8788 * @var string C_S_ANRGHG_VER  Plugin version constant.
    8889 */
    89 define( 'C_S_ANRGHG_VER', '1.4.6' );
     90define( 'C_S_ANRGHG_VER', '1.4.7' );
    9091
    9192/**
     
    422423 * Keys must not be longer than 44 characters, because of alignment
    423424 * issues reported by PHPCS when these keys are longer than that.
     425 *
     426 * @since 1.4.7 Centralize delimiter preset configuration.
     427 * The preset is the delimiter’s default value that must be saved
     428 * to the database so as to become immutable, to avoid disrupting
     429 * existing installations when the default needs to be changed.
     430 * In Gutenberg, square brackets are used as a shortcut, for page link insertion.
     431 * Thus, these must not be used any longer to delimit inline sources or endnotes.
    424432 *
    425433 * @return void
     
    702710            'anrghg_complements_excluded_posts'            => '', // comma-separated post IDs.
    703711            'anrghg_note_delimiter_preset'                 => '1', // -1 easy, 0 free, 1 safe.
     712            'anrghg_easy_note_start'                       => '{{{',
     713            'anrghg_easy_note_end'                         => '}}}',
     714            'anrghg_safe_note_start'                       => '[note]',
     715            'anrghg_safe_note_end'                         => '[/note]',
    704716            'anrghg_free_note_start'                       => '[σημ]',
    705717            'anrghg_free_note_end'                         => '[/σημ]',
     
    707719            'anrghg_note_end'                              => '', // Determined below.
    708720            'anrghg_source_delimiter_preset'               => '1', // -1 easy, 0 free, 1 safe.
     721            'anrghg_easy_source_start'                     => '[[[',
     722            'anrghg_easy_source_end'                       => ']]]',
     723            'anrghg_safe_source_start'                     => '[src]',
     724            'anrghg_safe_source_end'                       => '[/src]',
    709725            'anrghg_free_source_start'                     => '[упом]',
    710726            'anrghg_free_source_end'                       => '[/упом]',
     
    712728            'anrghg_source_end'                            => '', // Determined below.
    713729            'anrghg_name_delimiter_preset'                 => '1', // -1 easy, 0 free, 1 safe.
     730            'anrghg_easy_name_start'                       => '[[',
     731            'anrghg_easy_name_end'                         => ']]',
     732            'anrghg_safe_name_start'                       => '[name]',
     733            'anrghg_safe_name_end'                         => '[/name]',
    714734            'anrghg_free_name_start'                       => '[이름]',
    715735            'anrghg_free_name_end'                         => '[/이름]',
     
    755775            'anrghg_display_anchor_tooltips_on_tap'        => '0',
    756776            'anrghg_tooltip_delimiter_preset'              => '1', // -1 easy, 0 free, 1 safe.
     777            'anrghg_easy_tooltip_end'                      => '||',
     778            'anrghg_safe_tooltip_end'                      => '[/view]',
    757779            'anrghg_free_tooltip_end'                      => '[/ดู]',
    758780            'anrghg_anchor_tooltip_end'                    => '', // Determined below.
    759781            'anrghg_list_link_delimiter_preset'            => '1', // -1 easy, 0 free, 1 safe.
     782            'anrghg_easy_list_link_start'                  => '{{',
     783            'anrghg_easy_list_link_end'                    => '}}',
     784            'anrghg_safe_list_link_start'                  => '[link]',
     785            'anrghg_safe_list_link_end'                    => '[/link]',
    760786            'anrghg_free_list_link_start'                  => '[リンク]',
    761787            'anrghg_free_list_link_end'                    => '[/リンク]',
     
    925951        switch ( $g_a_anrghg_config['anrghg_note_delimiter_preset'] ) {
    926952            case '-1':
    927                 $g_a_anrghg_config['anrghg_note_start'] = '{{{';
    928                 $g_a_anrghg_config['anrghg_note_end']   = '}}}';
     953                $g_a_anrghg_config['anrghg_note_start'] = $g_a_anrghg_config['anrghg_easy_note_start'];
     954                $g_a_anrghg_config['anrghg_note_end']   = $g_a_anrghg_config['anrghg_easy_note_end'];
    929955                break;
    930956            case '0':
     
    934960            case '1':
    935961            default:
    936                 $g_a_anrghg_config['anrghg_note_start'] = '[note]';
    937                 $g_a_anrghg_config['anrghg_note_end']   = '[/note]';
     962                $g_a_anrghg_config['anrghg_note_start'] = $g_a_anrghg_config['anrghg_safe_note_start'];
     963                $g_a_anrghg_config['anrghg_note_end']   = $g_a_anrghg_config['anrghg_safe_note_end'];
    938964        }
    939965        switch ( $g_a_anrghg_config['anrghg_source_delimiter_preset'] ) {
    940966            case '-1':
    941                 $g_a_anrghg_config['anrghg_source_start'] = '[[[';
    942                 $g_a_anrghg_config['anrghg_source_end']   = ']]]';
     967                $g_a_anrghg_config['anrghg_source_start'] = $g_a_anrghg_config['anrghg_easy_source_start'];
     968                $g_a_anrghg_config['anrghg_source_end']   = $g_a_anrghg_config['anrghg_easy_source_end'];
    943969                break;
    944970            case '0':
     
    948974            case '1':
    949975            default:
    950                 $g_a_anrghg_config['anrghg_source_start'] = '[src]';
    951                 $g_a_anrghg_config['anrghg_source_end']   = '[/src]';
     976                $g_a_anrghg_config['anrghg_source_start'] = $g_a_anrghg_config['anrghg_safe_source_start'];
     977                $g_a_anrghg_config['anrghg_source_end']   = $g_a_anrghg_config['anrghg_safe_source_end'];
    952978        }
    953979        switch ( $g_a_anrghg_config['anrghg_name_delimiter_preset'] ) {
    954980            case '-1':
    955                 $g_a_anrghg_config['anrghg_complement_name_start'] = '[[';
    956                 $g_a_anrghg_config['anrghg_complement_name_end']   = ']]';
     981                $g_a_anrghg_config['anrghg_complement_name_start'] = $g_a_anrghg_config['anrghg_easy_name_start'];
     982                $g_a_anrghg_config['anrghg_complement_name_end']   = $g_a_anrghg_config['anrghg_easy_name_end'];
    957983                break;
    958984            case '0':
     
    962988            case '1':
    963989            default:
    964                 $g_a_anrghg_config['anrghg_complement_name_start'] = '[name]';
    965                 $g_a_anrghg_config['anrghg_complement_name_end']   = '[/name]';
     990                $g_a_anrghg_config['anrghg_complement_name_start'] = $g_a_anrghg_config['anrghg_safe_name_start'];
     991                $g_a_anrghg_config['anrghg_complement_name_end']   = $g_a_anrghg_config['anrghg_safe_name_end'];
    966992        }
    967993        switch ( $g_a_anrghg_config['anrghg_tooltip_delimiter_preset'] ) {
    968994            case '-1':
    969                 $g_a_anrghg_config['anrghg_anchor_tooltip_end'] = '||';
     995                $g_a_anrghg_config['anrghg_anchor_tooltip_end'] = $g_a_anrghg_config['anrghg_easy_tooltip_end'];
    970996                break;
    971997            case '0':
     
    9741000            case '1':
    9751001            default:
    976                 $g_a_anrghg_config['anrghg_anchor_tooltip_end'] = '[/view]';
     1002                $g_a_anrghg_config['anrghg_anchor_tooltip_end'] = $g_a_anrghg_config['anrghg_safe_tooltip_end'];
    9771003        }
    9781004        switch ( $g_a_anrghg_config['anrghg_list_link_delimiter_preset'] ) {
    9791005            case '-1':
    980                 $g_a_anrghg_config['anrghg_anchor_tooltip_list_link_start'] = '{{';
    981                 $g_a_anrghg_config['anrghg_anchor_tooltip_list_link_end']   = '}}';
     1006                $g_a_anrghg_config['anrghg_anchor_tooltip_list_link_start'] = $g_a_anrghg_config['anrghg_easy_list_link_start'];
     1007                $g_a_anrghg_config['anrghg_anchor_tooltip_list_link_end']   = $g_a_anrghg_config['anrghg_easy_list_link_end'];
    9821008                break;
    9831009            case '0':
     
    9871013            case '1':
    9881014            default:
    989                 $g_a_anrghg_config['anrghg_anchor_tooltip_list_link_start'] = '[link]';
    990                 $g_a_anrghg_config['anrghg_anchor_tooltip_list_link_end']   = '[/link]';
     1015                $g_a_anrghg_config['anrghg_anchor_tooltip_list_link_start'] = $g_a_anrghg_config['anrghg_safe_list_link_start'];
     1016                $g_a_anrghg_config['anrghg_anchor_tooltip_list_link_end']   = $g_a_anrghg_config['anrghg_safe_list_link_end'];
    9911017        }
    9921018
  • anrghg/trunk/includes/styles.php

    r2758223 r2758870  
    10631063            $l_s_referrer_padding_rule = '';
    10641064        }
    1065         $l_s_referrer_color      = 'inherit'; // Optionally not stand out.
    1066         $l_s_referrer_color      = '#008000'; // Optional contrast with other links.
    1067         $l_s_referrer_color_rule = ''; // For link color, there must be no color rule.
     1065        $l_s_concatenator_spacing = ''; // provisional @todo.
     1066        $l_s_referrer_color       = 'inherit'; // Optionally not stand out.
     1067        $l_s_referrer_color       = '#008000'; // Optional contrast with other links.
     1068        $l_s_referrer_color_rule  = ''; // For link color, there must be no color rule.
    10681069        if ( ! true ) {
    10691070            $l_s_referrer_color_rule = "color: $l_s_referrer_color;";
     
    10861087
    10871088                    .anrghg-referrer-source,
    1088                     .anrghg-referrer-note {
    1089                         $l_s_referrer_color_rule
     1089                    .anrghg-referrer-note,
     1090                    .anrghg-referrer-concatenator {
    10901091                        vertical-align: $l_s_vertical_align;
    10911092                        font-size: $l_s_referrer_font_size !important;
     
    10931094                        letter-spacing: $l_s_referrer_letter_spacing;
    10941095                        line-height: 0;
     1096                    }
     1097
     1098                    .anrghg-referrer-source,
     1099                    .anrghg-referrer-note {
     1100                        $l_s_referrer_color_rule
    10951101                        text-decoration: $l_s_referrer_decoration;
    10961102                        border-bottom: $l_s_referrer_bottom_border;
    10971103                    }
    10981104
    1099                     .anrghg-referrer-concatenator {
    1100                         vertical-align: $l_s_vertical_align;
    1101                         font-size: $l_s_referrer_font_size !important;
    1102                         font-weight: $l_s_referrer_font_weight;
    1103                         line-height: 0;
     1105                    .anrghg-referrer-concatenator:after {
     1106                        padding-inline-end: $l_s_concatenator_spacing;
    11041107                    }
    11051108
  • anrghg/trunk/package.json

    r2758223 r2758870  
    11{
    22    "name": "anrghg",
    3     "version": " 1.4.6",
     3    "version": " 1.4.7",
    44    "description": "A.N.R.GHG Publishing Helper",
    55    "main": "index.js",
  • anrghg/trunk/readme.txt

    r2758223 r2758870  
    88Requires PHP: 5.6
    99Tested PHP up to: 8.0
    10 Package Version: 1.4.6.0
    11 Version: 1.4.6
     10Package Version: 1.4.7.0
     11Version: 1.4.7
    1212CAUTION: The following field is parsed in `trunk/` for release configuration:
    13 Stable Tag: 1.4.6
     13Stable Tag: 1.4.7
    1414License: GPLv2 or later
    1515License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    534534== Changelog ==
    535535
     536= 1.4.7 (2022-07-19) =
     537
     538* Notes and sources: Centralize delimiter preset configuration.
     539* Notes and sources: Get delimiter presets saved to the DB.
     540
    536541= 1.4.6 (2022-07-18) =
    537542
     
    539544* Backup: Fix uploads directory for multisite installations.
    540545* Template editor: Remove backup preview and bulk upload advice.
    541 * Import: Clarify label of ‘Import and Add’ button.
    542 * Settings: Correct display of backup paths of templates/settings.
    543 * Settings: Add hint about bulk-uploading templates.
     546* Import: Templates: Clarify label of ‘Import and Add’ button.
     547* Settings: Backup: Correct display of backup paths of templates, settings.
     548* Settings: Backup: Add hint about bulk-uploading templates.
    544549
    545550= 1.4.5 (2022-07-17) =
  • anrghg/trunk/svn-revs.txt

    r2758223 r2758870  
    1111Previous revisions:
    1212
     131.4.6.0        2758223  2022-07-18 22:48:19 +0000 (Mon, 18 Jul 2022)
    13141.4.5.0        2757477  2022-07-17 02:47:18 +0000 (Sun, 17 Jul 2022)
    14151.4.4.0        2757183  2022-07-15 22:52:35 +0000 (Fri, 15 Jul 2022)
  • anrghg/trunk/tpl-filter-config.php

    r2758223 r2758870  
    23382338
    23392339// 'anrghg_note_delimiter_preset'
     2340// 'anrghg_easy_note_start'
     2341// 'anrghg_easy_note_end'
     2342// 'anrghg_safe_note_start'
     2343// 'anrghg_safe_note_end'
    23402344// 'anrghg_free_note_start'
    23412345// 'anrghg_free_note_end'
    23422346// 'anrghg_source_delimiter_preset'
     2347// 'anrghg_easy_source_start'
     2348// 'anrghg_easy_source_end'
     2349// 'anrghg_safe_source_start'
     2350// 'anrghg_safe_source_end'
    23432351// 'anrghg_free_source_start'
    23442352// 'anrghg_free_source_end'
    23452353// 'anrghg_name_delimiter_preset'
     2354// 'anrghg_easy_name_start'
     2355// 'anrghg_easy_name_end'
     2356// 'anrghg_safe_name_start'
     2357// 'anrghg_safe_name_end'
    23462358// 'anrghg_free_name_start'
    23472359// 'anrghg_free_name_end'
    23482360// 'anrghg_tooltip_delimiter_preset'
     2361// 'anrghg_easy_tooltip_end'
     2362// 'anrghg_safe_tooltip_end'
    23492363// 'anrghg_free_tooltip_end'
    23502364// 'anrghg_list_link_delimiter_preset'
     2365// 'anrghg_easy_list_link_start'
     2366// 'anrghg_easy_list_link_end'
     2367// 'anrghg_safe_list_link_start'
     2368// 'anrghg_safe_list_link_end'
    23512369// 'anrghg_free_list_link_start'
    23522370// 'anrghg_free_list_link_end'
Note: See TracChangeset for help on using the changeset viewer.