Plugin Directory

Changeset 2906849


Ignore:
Timestamp:
05/02/2023 07:15:59 AM (3 years ago)
Author:
ethereumicoio
Message:

Dark and Light theme modes for the web3 login dialog

Location:
ethpress/trunk
Files:
1 added
1 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • ethpress/trunk/app/Admin/Options.php

    r2894721 r2906849  
    227227            self::section_projectId();
    228228            self::projectId_setting( $options );
     229            self::section_login_form();
     230            self::theme_mode_setting( $options );
    229231            self::section_login();
    230232            self::woocommerce_login_form_setting( $options );
     
    381383        ?>
    382384                        </p>
     385                    </label>
     386                </fieldset>
     387            </td>
     388        </tr>
     389    <?php
     390    }
     391   
     392    /**
     393     * Outputs login section title.
     394     *
     395     * @since 1.2.0
     396     */
     397    public static function section_login_form()
     398    {
     399        ?>
     400        <tr valign="top">
     401            <th scope="row" colspan="2">
     402                <h2>
     403                    <?php
     404        _e( "Web3 Login Form", 'ethpress' );
     405        ?>
     406                </h2>
     407            </th>
     408            <td>
     409            </td>
     410        </tr>
     411    <?php
     412    }
     413   
     414    /**
     415     * Outputs input for login form theme mode.
     416     *
     417     * @since 1.5.12
     418     */
     419    public static function theme_mode_setting( $options = null )
     420    {
     421        $ethpress_theme_mode = ( isset( $options['theme_mode'] ) ? $options['theme_mode'] : "light" );
     422        ?>
     423        <tr valign="top">
     424            <th scope="row"><?php
     425        _e( "Theme Mode", 'ethpress' );
     426        ?></th>
     427            <td>
     428                <fieldset>
     429                    <label>
     430                        <input class="regular-text" id="ethpress_theme_mode_dark" name="ethpress[theme_mode]" type="radio" value="dark" <?php
     431        echo  ( $ethpress_theme_mode == "dark" ? 'checked' : '' ) ;
     432        ?>>
     433                        <label for="ethpress_theme_mode_dark"><?php
     434        _e( "Dark Mode", 'ethpress' );
     435        ?></label>
     436                        <input class="regular-text" id="ethpress_theme_mode_lite" name="ethpress[theme_mode]" type="radio" value="light" <?php
     437        echo  ( $ethpress_theme_mode == "light" ? 'checked' : '' ) ;
     438        ?>>
     439                        <label for="ethpress_theme_mode_lite"><?php
     440        _e( "Light Mode", 'ethpress' );
     441        ?></label>
    383442                    </label>
    384443                </fieldset>
     
    11811240        $redirect_url = '';
    11821241        $wallet_connect_project_id = sanitize_text_field( trim( $input['wallet_connect_project_id'] ) );
     1242        $theme_mode = sanitize_text_field( trim( $input['theme_mode'] ) );
    11831243        if ( empty($input['recursive']) && is_multisite() ) {
    11841244            // Mark next call as recursed.
     
    11971257        $options['link_message'] = $link_message;
    11981258        $options['wallet_connect_project_id'] = $wallet_connect_project_id;
     1259        $options['theme_mode'] = $theme_mode;
    11991260        if ( isset( $input['have_db_users'] ) ) {
    12001261            $options['have_db_users'] = $input['have_db_users'];
  • ethpress/trunk/app/Plugin.php

    r2884218 r2906849  
    214214        $options = get_site_option( 'ethpress' );
    215215        $wallet_connect_project_id = ( empty($options['wallet_connect_project_id']) ? self::WALLET_CONNECT_DEFAULT_PROJECT_ID : esc_attr( $options['wallet_connect_project_id'] ) );
     216        $theme_mode = esc_attr( $options['theme_mode'] );
    216217        $inline_script = [
    217218            'wallet_connect_project_id' => $wallet_connect_project_id,
     219            'theme_mode'                => $theme_mode,
    218220            'ajaxUrl'                   => $ajax_url,
    219221            'loginNonce'                => $login_nonce,
  • ethpress/trunk/ethpress.php

    r2905428 r2906849  
    66 * Description: Ethereum Web3 login. Enable crypto wallet logins to WordPress.
    77 * Author: Lynn (lynn.mvp at tutanota dot com), ethereumicoio
    8  * Version: 2.0.2
     8 * Version: 2.1.0
    99 * Author URI: https://ethereumico.io
    1010 * Text Domain: ethpress
  • ethpress/trunk/languages/ethpress.pot

    r2905428 r2906849  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: EthPress 2.0.2\n"
     5"Project-Id-Version: EthPress 2.1.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ethpress\n"
    7 "POT-Creation-Date: 2023-04-28 02:20:25+00:00\n"
     7"POT-Creation-Date: 2023-05-02 07:09:46+00:00\n"
    88"MIME-Version: 1.0\n"
    99"Content-Type: text/plain; charset=utf-8\n"
     
    8989msgstr ""
    9090
    91 #: app/Admin/Options.php:147 app/Admin/Options.php:238
     91#: app/Admin/Options.php:147 app/Admin/Options.php:241
    9292msgid ""
    9393"If you like <strong>EthPress</strong> please leave us a %1$s rating. A huge "
     
    107107msgstr ""
    108108
    109 #: app/Admin/Options.php:229
     109#: app/Admin/Options.php:232
    110110msgid "Save Changes"
    111111msgstr ""
    112112
    113 #: app/Admin/Options.php:230
     113#: app/Admin/Options.php:233
    114114msgid "Are you sure you want to delete all EthPress options?"
    115115msgstr ""
    116116
    117 #: app/Admin/Options.php:230
     117#: app/Admin/Options.php:233
    118118msgid "Reset"
    119119msgstr ""
    120120
    121 #: app/Admin/Options.php:265
     121#: app/Admin/Options.php:268
    122122msgid "Main Settings"
    123123msgstr ""
    124124
    125 #: app/Admin/Options.php:285
     125#: app/Admin/Options.php:288
    126126msgid "WooCommerce Settings"
    127127msgstr ""
    128128
    129 #: app/Admin/Options.php:306
     129#: app/Admin/Options.php:309
    130130msgid "WalletConnect Settings"
    131131msgstr ""
    132132
    133 #: app/Admin/Options.php:324 app/Admin/Options.php:328
    134 #: app/Admin/Options.php:332 app/Plugin.php:143
     133#: app/Admin/Options.php:327 app/Admin/Options.php:331
     134#: app/Admin/Options.php:335 app/Plugin.php:143
    135135msgid "WalletConnect Project ID"
    136136msgstr ""
    137137
    138 #: app/Admin/Options.php:331
     138#: app/Admin/Options.php:334
    139139msgid ""
    140140"The %1$s should be set there. You can get it from "
     
    142142msgstr ""
    143143
    144 #: app/Admin/Options.php:358
     144#: app/Admin/Options.php:359
     145msgid "Web3 Login Form"
     146msgstr ""
     147
     148#: app/Admin/Options.php:378
     149msgid "Theme Mode"
     150msgstr ""
     151
     152#: app/Admin/Options.php:383
     153msgid "Dark Mode"
     154msgstr ""
     155
     156#: app/Admin/Options.php:385
     157msgid "Light Mode"
     158msgstr ""
     159
     160#: app/Admin/Options.php:404
    145161msgid "Strings Settings"
    146162msgstr ""
    147163
    148 #: app/Admin/Options.php:374 app/Front.php:79 app/Plugin.php:397
     164#: app/Admin/Options.php:420 app/Front.php:79 app/Plugin.php:399
    149165msgid "Log In With a Crypto Wallet"
    150166msgstr ""
    151167
    152 #: app/Admin/Options.php:381
     168#: app/Admin/Options.php:427
    153169msgid "Login button label"
    154170msgstr ""
    155171
    156 #: app/Admin/Options.php:387
     172#: app/Admin/Options.php:433
    157173msgid "The Login button text can be set there."
    158174msgstr ""
    159175
    160 #: app/Admin/Options.php:391 app/Admin/Options.php:430
    161 #: app/Admin/Options.php:469 app/Admin/Options.php:503
    162 #: app/Admin/Options.php:623 app/Admin/Options.php:682
    163 #: app/Admin/Options.php:743 app/Admin/Options.php:806
    164 #: app/Admin/Options.php:875 app/Admin/Options.php:943
     176#: app/Admin/Options.php:437 app/Admin/Options.php:476
     177#: app/Admin/Options.php:515 app/Admin/Options.php:549
     178#: app/Admin/Options.php:669 app/Admin/Options.php:728
     179#: app/Admin/Options.php:789 app/Admin/Options.php:852
     180#: app/Admin/Options.php:921 app/Admin/Options.php:989
    165181msgid "Upgrade to keep using this feature!"
    166182msgstr ""
    167183
    168 #: app/Admin/Options.php:395 app/Admin/Options.php:434
    169 #: app/Admin/Options.php:473 app/Admin/Options.php:507
    170 #: app/Admin/Options.php:627 app/Admin/Options.php:686
    171 #: app/Admin/Options.php:747 app/Admin/Options.php:810
    172 #: app/Admin/Options.php:879 app/Admin/Options.php:947
     184#: app/Admin/Options.php:441 app/Admin/Options.php:480
     185#: app/Admin/Options.php:519 app/Admin/Options.php:553
     186#: app/Admin/Options.php:673 app/Admin/Options.php:732
     187#: app/Admin/Options.php:793 app/Admin/Options.php:856
     188#: app/Admin/Options.php:925 app/Admin/Options.php:993
    173189msgid "Upgrade to use this feature!"
    174190msgstr ""
    175191
    176 #: app/Admin/Options.php:413 app/Front.php:133 app/Plugin.php:398
     192#: app/Admin/Options.php:459 app/Front.php:133 app/Plugin.php:400
    177193msgid "Link Your Crypto Wallets"
    178194msgstr ""
    179195
    180 #: app/Admin/Options.php:420
     196#: app/Admin/Options.php:466
    181197msgid "Link button label"
    182198msgstr ""
    183199
    184 #: app/Admin/Options.php:426
     200#: app/Admin/Options.php:472
    185201msgid "The Link button text can be set there."
    186202msgstr ""
    187203
    188 #: app/Admin/Options.php:452 app/Front.php:207 app/Plugin.php:399
     204#: app/Admin/Options.php:498 app/Front.php:207 app/Plugin.php:401
    189205msgid "Register With a Crypto Wallet"
    190206msgstr ""
    191207
    192 #: app/Admin/Options.php:459
     208#: app/Admin/Options.php:505
    193209msgid "Register button label"
    194210msgstr ""
    195211
    196 #: app/Admin/Options.php:465
     212#: app/Admin/Options.php:511
    197213msgid "The Register button text can be set there."
    198214msgstr ""
    199215
    200 #: app/Admin/Options.php:486 app/Linker.php:94
     216#: app/Admin/Options.php:532 app/Linker.php:94
    201217#. translators: wallet address
    202218msgid "Success! Address %s is now linked to your account."
    203219msgstr ""
    204220
    205 #: app/Admin/Options.php:493
     221#: app/Admin/Options.php:539
    206222msgid "The account link success message"
    207223msgstr ""
    208224
    209 #: app/Admin/Options.php:499
     225#: app/Admin/Options.php:545
    210226msgid ""
    211227"The successful account link message. The %s can be used to insert the "
     
    213229msgstr ""
    214230
    215 #: app/Admin/Options.php:533
     231#: app/Admin/Options.php:579
    216232msgid "Verification Service API URL"
    217233msgstr ""
    218234
    219 #: app/Admin/Options.php:539 app/Admin/Options.php:664
     235#: app/Admin/Options.php:585 app/Admin/Options.php:710
    220236msgid ""
    221237"Your PHP installation has the necessary PHP extension to do verifications "
     
    223239msgstr ""
    224240
    225 #: app/Admin/Options.php:550
     241#: app/Admin/Options.php:596
    226242msgid ""
    227243"Use an API or install %1$sPHP-GMP%2$s or %3$sPHP-BCMath%2$s to verify "
     
    229245msgstr ""
    230246
    231 #: app/Admin/Options.php:570
     247#: app/Admin/Options.php:616
    232248#. translators: a link.
    233249msgid "To deploy your own verification service, see %1$s."
    234250msgstr ""
    235251
    236 #: app/Admin/Options.php:610
     252#: app/Admin/Options.php:656
    237253msgid "Redirect URL"
    238254msgstr ""
    239255
    240 #: app/Admin/Options.php:616
     256#: app/Admin/Options.php:662
    241257msgid "The page to redirect after a successful login"
    242258msgstr ""
    243259
    244 #: app/Admin/Options.php:658
     260#: app/Admin/Options.php:704
    245261msgid "Managed Verification Service"
    246262msgstr ""
    247263
    248 #: app/Admin/Options.php:672
     264#: app/Admin/Options.php:718
    249265msgid "Use Managed Verification Service"
    250266msgstr ""
    251267
    252 #: app/Admin/Options.php:675
     268#: app/Admin/Options.php:721
    253269msgid "Check to use the Managed Verification Service."
    254270msgstr ""
    255271
    256 #: app/Admin/Options.php:728
     272#: app/Admin/Options.php:774
    257273msgid "WooCommerce Login Form"
    258274msgstr ""
    259275
    260 #: app/Admin/Options.php:733
     276#: app/Admin/Options.php:779
    261277msgid "Show on WooCommerce Login Form?"
    262278msgstr ""
    263279
    264 #: app/Admin/Options.php:736
     280#: app/Admin/Options.php:782
    265281msgid "Check to show EthPress login button on the WooCommerce Login Form."
    266282msgstr ""
    267283
    268 #: app/Admin/Options.php:752 app/Admin/Options.php:816
    269 #: app/Admin/Options.php:884 app/Admin/Options.php:952
     284#: app/Admin/Options.php:798 app/Admin/Options.php:862
     285#: app/Admin/Options.php:930 app/Admin/Options.php:998
    270286msgid "Install WooCommerce to use this feature!"
    271287msgstr ""
    272288
    273 #: app/Admin/Options.php:752 app/Admin/Options.php:816
    274 #: app/Admin/Options.php:884 app/Admin/Options.php:952
     289#: app/Admin/Options.php:798 app/Admin/Options.php:862
     290#: app/Admin/Options.php:930 app/Admin/Options.php:998
    275291msgid ""
    276292"WooCommerce is a customizable, open-source eCommerce platform built on "
     
    278294msgstr ""
    279295
    280 #: app/Admin/Options.php:791
     296#: app/Admin/Options.php:837
    281297msgid "WooCommerce Register Form"
    282298msgstr ""
    283299
    284 #: app/Admin/Options.php:796
     300#: app/Admin/Options.php:842
    285301msgid "Show on WooCommerce Register Form?"
    286302msgstr ""
    287303
    288 #: app/Admin/Options.php:799
     304#: app/Admin/Options.php:845
    289305msgid "Check to show EthPress register button on the WooCommerce Register Form."
    290306msgstr ""
    291307
    292 #: app/Admin/Options.php:821 app/Admin/Options.php:889
     308#: app/Admin/Options.php:867 app/Admin/Options.php:935
    293309msgid ""
    294310"Check the Administration > Settings > General > Membership: Anyone can "
     
    296312msgstr ""
    297313
    298 #: app/Admin/Options.php:860
     314#: app/Admin/Options.php:906
    299315msgid "WooCommerce Checkout Page Register Form"
    300316msgstr ""
    301317
    302 #: app/Admin/Options.php:865
     318#: app/Admin/Options.php:911
    303319msgid "Show on the WooCommerce Checkout page?"
    304320msgstr ""
    305321
    306 #: app/Admin/Options.php:868
     322#: app/Admin/Options.php:914
    307323msgid "Check to show EthPress register button on the WooCommerce Checkout page."
    308324msgstr ""
    309325
    310 #: app/Admin/Options.php:928
     326#: app/Admin/Options.php:974
    311327msgid "WooCommerce Account Details Link Wallet Form"
    312328msgstr ""
    313329
    314 #: app/Admin/Options.php:933
     330#: app/Admin/Options.php:979
    315331msgid "Show the Link Wallet button on the WooCommerce Account Details page?"
    316332msgstr ""
    317333
    318 #: app/Admin/Options.php:936
     334#: app/Admin/Options.php:982
    319335msgid "Check to the Link Wallet button on the WooCommerce Account Details page."
    320336msgstr ""
    321337
    322 #: app/Admin/Options.php:1033
     338#: app/Admin/Options.php:1081
    323339msgid "Settings"
    324340msgstr ""
     
    371387msgstr ""
    372388
    373 #: app/Login.php:91 app/Plugin.php:286
     389#: app/Login.php:91 app/Plugin.php:288
    374390msgid "Logged in"
    375391msgstr ""
     
    398414msgstr ""
    399415
    400 #: app/Plugin.php:280
     416#: app/Plugin.php:282
    401417msgid "Choose your login method"
    402418msgstr ""
    403419
    404 #: app/Plugin.php:281
     420#: app/Plugin.php:283
    405421msgid "Error: cannot detect crypto wallet"
    406422msgstr ""
    407423
    408 #: app/Plugin.php:282
     424#: app/Plugin.php:284
    409425msgid "Waiting for your permission"
    410426msgstr ""
    411427
    412 #: app/Plugin.php:283
     428#: app/Plugin.php:285
    413429msgid "Fetching login phrase..."
    414430msgstr ""
    415431
    416 #: app/Plugin.php:284
     432#: app/Plugin.php:286
    417433msgid "Waiting for your signature"
    418434msgstr ""
    419435
    420 #: app/Plugin.php:285
     436#: app/Plugin.php:287
    421437msgid "Verifying signature..."
    422438msgstr ""
    423439
    424 #: app/Plugin.php:287
     440#: app/Plugin.php:289
    425441msgid "Login aborted"
    426442msgstr ""
    427443
    428 #: app/Plugin.php:288
     444#: app/Plugin.php:290
    429445msgid "Log In"
    430446msgstr ""
    431447
    432 #: app/Plugin.php:289
     448#: app/Plugin.php:291
    433449msgid "Scan a QR code with your wallet, https://walletconnect.org"
    434450msgstr ""
    435451
    436 #: app/Plugin.php:290
     452#: app/Plugin.php:292
    437453msgid "Browser add-on and mobile app, https://metamask.io"
    438454msgstr ""
    439455
    440 #: app/Plugin.php:343
     456#: app/Plugin.php:345
    441457msgid "Log out first"
    442458msgstr ""
  • ethpress/trunk/readme.txt

    r2905428 r2906849  
    55Requires at least: 4.6
    66Tested up to: 6.2.0
    7 Stable tag: 2.0.2
     7Stable tag: 2.1.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    252252
    253253
     254= 2.1.0 =
     255
     256* Dark and Light theme modes for the web3 login dialog
     257
    254258= 2.0.2 =
    255259
  • ethpress/trunk/vendor/autoload.php

    r2905428 r2906849  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInitb8de0c1218346259d2b11b1af1918ba1::getLoader();
     7return ComposerAutoloaderInit660fc5fd6099617dca2d3e90a69ab7dc::getLoader();
  • ethpress/trunk/vendor/composer/autoload_real.php

    r2905428 r2906849  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInitb8de0c1218346259d2b11b1af1918ba1
     5class ComposerAutoloaderInit660fc5fd6099617dca2d3e90a69ab7dc
    66{
    77    private static $loader;
     
    2323        }
    2424
    25         spl_autoload_register(array('ComposerAutoloaderInitb8de0c1218346259d2b11b1af1918ba1', 'loadClassLoader'), true, true);
     25        spl_autoload_register(array('ComposerAutoloaderInit660fc5fd6099617dca2d3e90a69ab7dc', 'loadClassLoader'), true, true);
    2626        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
    27         spl_autoload_unregister(array('ComposerAutoloaderInitb8de0c1218346259d2b11b1af1918ba1', 'loadClassLoader'));
     27        spl_autoload_unregister(array('ComposerAutoloaderInit660fc5fd6099617dca2d3e90a69ab7dc', 'loadClassLoader'));
    2828
    2929        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
     
    3131            require __DIR__ . '/autoload_static.php';
    3232
    33             call_user_func(\Composer\Autoload\ComposerStaticInitb8de0c1218346259d2b11b1af1918ba1::getInitializer($loader));
     33            call_user_func(\Composer\Autoload\ComposerStaticInit660fc5fd6099617dca2d3e90a69ab7dc::getInitializer($loader));
    3434        } else {
    3535            $map = require __DIR__ . '/autoload_namespaces.php';
  • ethpress/trunk/vendor/composer/autoload_static.php

    r2905428 r2906849  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInitb8de0c1218346259d2b11b1af1918ba1
     7class ComposerStaticInit660fc5fd6099617dca2d3e90a69ab7dc
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    6767    {
    6868        return \Closure::bind(function () use ($loader) {
    69             $loader->prefixLengthsPsr4 = ComposerStaticInitb8de0c1218346259d2b11b1af1918ba1::$prefixLengthsPsr4;
    70             $loader->prefixDirsPsr4 = ComposerStaticInitb8de0c1218346259d2b11b1af1918ba1::$prefixDirsPsr4;
    71             $loader->classMap = ComposerStaticInitb8de0c1218346259d2b11b1af1918ba1::$classMap;
     69            $loader->prefixLengthsPsr4 = ComposerStaticInit660fc5fd6099617dca2d3e90a69ab7dc::$prefixLengthsPsr4;
     70            $loader->prefixDirsPsr4 = ComposerStaticInit660fc5fd6099617dca2d3e90a69ab7dc::$prefixDirsPsr4;
     71            $loader->classMap = ComposerStaticInit660fc5fd6099617dca2d3e90a69ab7dc::$classMap;
    7272
    7373        }, null, ClassLoader::class);
Note: See TracChangeset for help on using the changeset viewer.