Plugin Directory

Changeset 3713164


Ignore:
Timestamp:
09/25/2026 02:12:53 PM (4 weeks ago)
Author:
jahidcse
Message:

Compatibility Update

Location:
disabled-source-disabled-right-click-and-content-protection
Files:
352 added
6 edited

Legend:

Unmodified
Added
Removed
  • disabled-source-disabled-right-click-and-content-protection/trunk/disabled-source-and-content-protection.php

    r3690723 r3713164  
    44 * Plugin URI:        https://wordpress.org/plugins/disabled-source-disabled-right-click-and-content-protection/
    55 * Description:       Disabled Source(Ctrl+U), Disabled Right click, Disable F12 functional key, and Disable save the page(Ctrl+S) and Content Protection of your WordPress Website.
    6  * Version:           1.8.1
     6 * Version:           1.8.2
    77 * Requires at least: 4.7
    88 * Tested up to: 7.1
    … …  
    2525define( 'JH_URL', plugin_dir_url( __FILE__ ) );
    2626define( 'JH_PATH', plugin_dir_path( __FILE__ ) );
    27 define( 'JH_VERSION', '1.8.1' );
     27define( 'JH_VERSION', '1.8.2' );
    2828
    2929// Init Hook
  • disabled-source-disabled-right-click-and-content-protection/trunk/includes/admin/assets/css/admin.css

    r3690723 r3713164  
    11.disable-up-badge {
    2   display: inline-block;
    3   color: #fff;
    4   padding: 3px 10px 3px 10px;
    5   border-radius: 3px;
    6   text-align: center;
    7   margin: 5px 0 0 0;
    8   font-size: 12px;
    9   font-weight: 600;
    10   background: #006600;
     2        display: inline-block;
     3        color: #fff;
     4        padding: 3px 10px 3px 10px;
     5        border-radius: 3px;
     6        text-align: center;
     7        margin: 5px 0 0 0;
     8        font-size: 12px;
     9        font-weight: 600;
     10        background: #006600;
    1111}
    1212
    1313.jh-warning-title .csf-subtitle-text {
    14   color: red;
     14        color: red;
    1515}
    1616
    … …  
    1818/* Review admin notice CSS */
    1919.csf-buttons .button {
    20   min-height: auto;
     20        min-height: auto;
    2121}
    2222
    2323.jh_disable_review_notice p {
    24   padding-right: 20px;
     24        padding-right: 20px;
    2525}
    2626
    2727.jh_disable_review_notice ul li {
    28   display: inline-block;
     28        display: inline-block;
    2929}
    3030
    3131.jh_disable_review_notice ul {
    32   margin: 0;
    33   margin-bottom: 5px;
     32        margin: 0;
     33        margin-bottom: 5px;
    3434}
    3535
    3636.jh_disable_review_notice ul li a {
    37   text-decoration: none;
    38   padding: 7px;
    39   color: #00718A;
    40   font-weight: 600;
    41   transition: 0.4s;
     37        text-decoration: none;
     38        padding: 7px;
     39        color: #00718A;
     40        font-weight: 600;
     41        transition: 0.4s;
    4242}
    4343
    4444.jh_disable_review_notice ul li:nth-child(1) a {
    45   padding-left: 0 !important;
     45        padding-left: 0 !important;
    4646}
    4747
    4848.jh_disable_review_notice ul li a span {
    49   padding-right: 3px;
    50   display: inline-block;
     49        padding-right: 3px;
     50        display: inline-block;
    5151}
    5252
    5353.jh_disable_review_notice ul li a:hover {
    54   color: #218ea6;
     54        color: #218ea6;
    5555}
    5656
    5757.jh_disable_review_notice {
    58   position: relative;
     58        position: relative;
    5959}
    6060
    6161.jh_disable_review_notice .review_notice_dismiss {
    62   padding: 2px;
     62        padding: 2px;
    6363}
    6464
    6565/* admin feature notice */
    6666.jh_admin_feature_notice .csf-notice-danger {
    67   background-color: #ffdddd !important;
     67        background-color: #ffdddd !important;
    6868}
    6969
    7070.jh-support-notice-box {
    71   margin-left: 0px;
    72   border-left: 1px solid #c3c4c7;
    73   padding-right: 0px !important;
     71        margin-left: 0px;
     72        border-left: 1px solid #c3c4c7;
     73        padding-right: 0px !important;
    7474}
    7575
    7676.jh-support-notice-box .jh-link-boxs {
    77   display: flex;
    78   gap: 12px;
     77        display: flex;
     78        gap: 12px;
    7979}
    8080
    8181.jh-support-notice-box .jh-link-boxs .jh-link-box {
    82   background-color: #fff;
    83   border-radius: 10px;
    84   margin-bottom: 0;
    85   width: calc(33% - 12px);
     82        background-color: #fff;
     83        border-radius: 10px;
     84        margin-bottom: 0;
     85        width: calc(33% - 12px);
    8686}
    8787
    8888.jh-support-notice-box .jh-link-boxs .jh-link-box a {
    89   display: block;
    90   padding: 8px 8px 12px 8px;
    91   text-decoration: none;
    92   text-align: center;
     89        display: block;
     90        padding: 8px 8px 12px 8px;
     91        text-decoration: none;
     92        text-align: center;
    9393}
    9494
    9595.jh-support-notice-box .jh-link-boxs .jh-link-box a:focus {
    96   outline: none;
    97   box-shadow: none;
     96        outline: none;
     97        box-shadow: none;
    9898}
    9999
    100100.jh-support-notice-box .jh-link-boxs .jh-link-box a img {
    101   margin-bottom: 15px;
     101        margin-bottom: 15px;
    102102}
    103103
    104104.jh-support-notice-box .jh-link-boxs .jh-link-box a h3 {
    105   font-size: 20px;
    106   margin: 0;
    107   color: #000;
    108   display: block;
    109   line-height: 24px;
    110   margin-bottom: 15px;
     105        font-size: 20px;
     106        margin: 0;
     107        color: #000;
     108        display: block;
     109        line-height: 24px;
     110        margin-bottom: 15px;
    111111}
    112112
    113113.jh-support-notice-box .jh-link-boxs .jh-link-box a p {
    114   font-size: 15px;
    115   margin: 0;
    116   color: #000;
    117   display: block;
    118   line-height: 24px;
     114        font-size: 15px;
     115        margin: 0;
     116        color: #000;
     117        display: block;
     118        line-height: 24px;
    119119}
    120120
    121121.jh-support-notice-box .jh-link-boxs .jh-link-box a span {
    122   margin-bottom: 0;
    123   display: inline-block;
    124   border: 2px solid #003c79;
    125   border-radius: 6px;
    126   padding: 9px 16px;
    127   font-size: 15px;
    128   font-weight: 600;
    129   color: #003c79;
    130   margin-top: 15px;
    131   line-height: 1;
    132   transition: .3s all ease;
     122        margin-bottom: 0;
     123        display: inline-block;
     124        border: 2px solid #003c79;
     125        border-radius: 6px;
     126        padding: 9px 16px;
     127        font-size: 15px;
     128        font-weight: 600;
     129        color: #003c79;
     130        margin-top: 15px;
     131        line-height: 1;
     132        transition: .3s all ease;
    133133}
    134134
    135135.jh-support-notice-box .jh-link-boxs .jh-link-box a span:hover {
    136   background-color: #003c79;
    137   color: #fff;
     136        background-color: #003c79;
     137        color: #fff;
    138138}
    139139
    … …  
    141141
    142142@media all and (max-width: 767px) {
    143   .jh-support-notice-box .jh-link-boxs {
    144     flex-wrap: wrap;
    145   }
    146 
    147   .jh-support-notice-box .jh-link-boxs .jh-link-box {
    148     width: 100%;
    149     margin-bottom: 15px;
    150   }
     143        .jh-support-notice-box .jh-link-boxs {
     144                flex-wrap: wrap;
     145        }
     146
     147        .jh-support-notice-box .jh-link-boxs .jh-link-box {
     148                width: 100%;
     149                margin-bottom: 15px;
     150        }
    151151}
    152152
    153153/* PRO Feature Badge */
    154154.jh-pro-feature {
    155   position: relative;
    156   border: 1px solid #e2e8f0 !important;
    157   border-radius: 12px !important;
    158   background: #ffffff !important;
    159   margin-top: 20px !important;
    160   margin-bottom: 25px !important;
    161   box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03) !important;
    162   overflow: hidden;
    163   padding: 10px 0;
     155        position: relative;
     156        border: 1px solid #e2e8f0 !important;
     157        border-radius: 12px !important;
     158        background: #ffffff !important;
     159        margin-top: 20px !important;
     160        margin-bottom: 25px !important;
     161        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03) !important;
     162        overflow: hidden;
     163        padding: 10px 0;
    164164}
    165165
    166166.jh-pro-feature:before {
    167   content: "PRO";
    168   position: absolute;
    169   top: 15px;
    170   right: 20px;
    171   background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    172   color: #fff;
    173   font-size: 10px;
    174   font-weight: 800;
    175   padding: 3px 12px;
    176   border-radius: 30px;
    177   letter-spacing: 1px;
    178   z-index: 99;
    179   box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    180   border: 1px solid rgba(255, 255, 255, 0.2);
    181   pointer-events: none;
    182   text-transform: uppercase;
     167        content: "PRO";
     168        position: absolute;
     169        top: 15px;
     170        right: 20px;
     171        background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
     172        color: #fff;
     173        font-size: 10px;
     174        font-weight: 800;
     175        padding: 3px 12px;
     176        border-radius: 30px;
     177        letter-spacing: 1px;
     178        z-index: 99;
     179        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
     180        border: 1px solid rgba(255, 255, 255, 0.2);
     181        pointer-events: none;
     182        text-transform: uppercase;
    183183}
    184184
    185185.jh-pro-feature:after {
    186   content: "";
    187   position: absolute;
    188   top: 0;
    189   left: 0;
    190   width: 4px;
    191   height: 100%;
    192   background: linear-gradient(to bottom, #6366f1, #a855f7);
    193   border-radius: 4px 0 0 4px;
     186        content: "";
     187        position: absolute;
     188        top: 0;
     189        left: 0;
     190        width: 4px;
     191        height: 100%;
     192        background: linear-gradient(to bottom, #6366f1, #a855f7);
     193        border-radius: 4px 0 0 4px;
    194194}
    195195
    196196.jh-pro-feature .csf-section-title {
    197   padding-right: 70px !important;
     197        padding-right: 70px !important;
    198198}
    199199
    200200/* Upgrade Button Styling */
    201201.jh-pro-buy-btn {
    202   position: absolute;
    203   bottom: 20px;
    204   right: 20px;
    205   background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    206   color: #ffffff !important;
    207   padding: 10px 24px;
    208   border-radius: 8px;
    209   font-size: 13px;
    210   font-weight: 700;
    211   text-decoration: none !important;
    212   box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    213   transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    214   z-index: 100;
    215   border: 1px solid rgba(255, 255, 255, 0.1);
    216   display: inline-flex;
    217   align-items: center;
    218   line-height: 1;
     202        position: absolute;
     203        bottom: 20px;
     204        right: 20px;
     205        background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
     206        color: #ffffff !important;
     207        padding: 10px 24px;
     208        border-radius: 8px;
     209        font-size: 13px;
     210        font-weight: 700;
     211        text-decoration: none !important;
     212        box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
     213        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
     214        z-index: 100;
     215        border: 1px solid rgba(255, 255, 255, 0.1);
     216        display: inline-flex;
     217        align-items: center;
     218        line-height: 1;
    219219}
    220220
    221221.jh-pro-buy-btn:hover {
    222   transform: translateY(-2px);
    223   box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    224   background: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%);
    225   color: #ffffff !important;
     222        transform: translateY(-2px);
     223        box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
     224        background: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%);
     225        color: #ffffff !important;
    226226}
    227227
    228228.jh-pro-buy-btn:after {
    229   content: "→";
    230   margin-left: 8px;
    231   font-size: 16px;
    232   transition: transform 0.3s ease;
     229        content: "→";
     230        margin-left: 8px;
     231        font-size: 16px;
     232        transition: transform 0.3s ease;
    233233}
    234234
    235235.jh-pro-buy-btn:hover:after {
    236   transform: translateX(4px);
     236        transform: translateX(4px);
    237237}
    238238
    239239/* Ensure section has padding for the button */
    240240.jh-pro-feature {
    241   padding-bottom: 70px !important;
    242 }
     241        padding-bottom: 70px !important;
     242}
     243
     244/* ─────────────────────────────────────────────────────────────
     245 * Magic Login / Temp Login Styles
     246 * ─────────────────────────────────────────────────────────── */
     247.jh-magic-wrap {
     248        max-width: 900px;
     249        margin: 10px 0 30px 0;
     250        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
     251}
     252
     253.jh-magic-header {
     254        display: flex;
     255        align-items: flex-start;
     256        gap: 16px;
     257        border: 1px solid #eee;
     258        border-radius: 10px;
     259        padding: 20px;
     260        margin-bottom: 22px;
     261        color: #23282d;
     262}
     263
     264.jh-magic-header-icon {
     265        background: #3b82f6;
     266        color: #fff;
     267        width: 44px;
     268        height: 44px;
     269        border-radius: 8px;
     270        display: flex;
     271        align-items: center;
     272        justify-content: center;
     273        flex-shrink: 0;
     274}
     275
     276.jh-magic-header-text h3 {
     277        margin: 0 0 6px 0;
     278        font-size: 17px;
     279        font-weight: 600;
     280        color: #23282d;
     281}
     282
     283.jh-magic-header-text p {
     284        margin: 0;
     285        font-size: 13.5px;
     286        color: #999;
     287        line-height: 1.5;
     288}
     289
     290.jh-magic-card {
     291        border: 1px solid #eee;
     292        border-radius: 10px;
     293        padding: 24px;
     294        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
     295}
     296
     297.jh-magic-card-header {
     298        display: flex;
     299        align-items: center;
     300        justify-content: space-between;
     301        margin-bottom: 18px;
     302}
     303
     304.jh-magic-card-title {
     305        margin: 0 0 18px 0;
     306        font-size: 15px;
     307        font-weight: 600;
     308        color: #23282d;
     309        display: flex;
     310        align-items: center;
     311        gap: 8px;
     312}
     313
     314.jh-magic-card-header .jh-magic-card-title {
     315        margin-bottom: 0;
     316}
     317
     318.jh-magic-badge {
     319        background: #3b82f6;
     320        color: #fff;
     321        font-size: 12px;
     322        font-weight: 700;
     323        padding: 2px 9px;
     324        border-radius: 12px;
     325}
     326
     327.jh-magic-grid {
     328        display: grid;
     329        grid-template-columns: 1fr 1fr;
     330        gap: 16px;
     331}
     332
     333.jh-magic-grid-full {
     334        grid-column: 1 / -1;
     335}
     336
     337.jh-magic-form-group {
     338        display: flex;
     339        flex-direction: column;
     340}
     341
     342.jh-magic-form-group label {
     343        font-size: 13px;
     344        font-weight: 600;
     345        color: #23282d;
     346        margin-bottom: 6px;
     347}
     348
     349.jh-magic-form-group .jh-required {
     350        color: #ef4444;
     351}
     352
     353.jh-magic-select,
     354.jh-magic-input {
     355        border: 1px solid #949494 !important;
     356        border-radius: 6px !important;
     357        color: #1e1e1e !important;
     358        padding-left: 12px !important;
     359        padding-right: 12px !important;
     360        font-size: 13.5px !important;
     361        height: 40px !important;
     362        width: 100% !important;
     363        max-width: 100% !important;
     364        box-sizing: border-box !important;
     365        outline: none !important;
     366        transition: border-color 0.2s, box-shadow 0.2s;
     367}
     368
     369.jh-magic-select:focus,
     370.jh-magic-input:focus {
     371        border-color: #3b82f6 !important;
     372        box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3) !important;
     373}
     374
     375.jh-magic-actions {
     376        margin-top: 20px;
     377        display: flex;
     378        align-items: center;
     379}
     380
     381.jh-magic-btn {
     382        display: inline-flex;
     383        align-items: center;
     384        justify-content: center;
     385        gap: 6px;
     386        font-size: 13px;
     387        font-weight: 600;
     388        padding: 9px 18px;
     389        border-radius: 6px;
     390        cursor: pointer;
     391        border: none;
     392        transition: all 0.2s;
     393        text-decoration: none;
     394}
     395
     396.jh-magic-btn-primary {
     397        background: #3b82f6;
     398        color: #fff;
     399}
     400
     401.jh-magic-btn-primary:hover {
     402        background: #2563eb;
     403        color: #fff;
     404}
     405
     406.jh-magic-btn-primary:disabled {
     407        opacity: 0.6;
     408        cursor: not-allowed;
     409}
     410
     411.jh-magic-btn-copy {
     412        background: #0f172a;
     413        color: #fff;
     414        border: 1px solid #475569;
     415}
     416
     417.jh-magic-btn-copy:hover {
     418        background: #1e293b;
     419        border-color: #64748b;
     420        color: #fff;
     421}
     422
     423.jh-magic-btn-copy.jh-copied {
     424        background: #065f46 !important;
     425        border-color: #10b981 !important;
     426        color: #ecfdf5 !important;
     427}
     428
     429.jh-magic-btn-sm {
     430        padding: 5px 10px;
     431        font-size: 12px;
     432}
     433
     434.jh-magic-btn-danger {
     435        background: rgba(239, 68, 68, 0.15);
     436        color: #f87171;
     437        border: 1px solid rgba(239, 68, 68, 0.3);
     438}
     439
     440.jh-magic-btn-danger:hover {
     441        background: #ef4444;
     442        color: #fff;
     443        border-color: #ef4444;
     444}
     445
     446.jh-btn-spinner {
     447        display: inline-block;
     448        width: 14px;
     449        height: 14px;
     450        border: 2px solid rgba(255, 255, 255, 0.3);
     451        border-top-color: #fff;
     452        border-radius: 50%;
     453        animation: jh-spin 0.6s linear infinite;
     454}
     455
     456@keyframes jh-spin {
     457        to {
     458                transform: rotate(360deg);
     459        }
     460}
     461
     462/* Result Box */
     463.jh-magic-result-card {
     464        background: rgba(16, 185, 129, 0.08);
     465        border: 1px solid #059669;
     466        border-radius: 8px;
     467        padding: 16px;
     468        margin-top: 20px;
     469}
     470
     471.jh-magic-result-header {
     472        display: flex;
     473        align-items: center;
     474        gap: 8px;
     475        font-size: 14px;
     476        font-weight: 600;
     477        color: #34d399;
     478        margin-bottom: 8px;
     479}
     480
     481.jh-magic-result-meta {
     482        font-size: 12.5px;
     483        color: #999;
     484        margin-bottom: 12px;
     485}
     486
     487.jh-magic-result-url-wrap {
     488        display: flex;
     489        gap: 8px;
     490}
     491
     492.jh-magic-result-input {
     493        flex: 1;
     494        background: #0f172a !important;
     495        border: 1px solid #eee !important;
     496        border-radius: 6px !important;
     497        color: #6ee7b7 !important;
     498        font-family: monospace !important;
     499        font-size: 13px !important;
     500        padding: 8px 12px !important;
     501}
     502
     503/* Table */
     504.jh-magic-table-wrap {
     505        overflow-x: auto;
     506}
     507
     508.jh-magic-table {
     509        width: 100%;
     510        border-collapse: collapse;
     511        color: #e2e8f0;
     512        font-size: 13px;
     513}
     514
     515.jh-magic-table th {
     516        text-align: left;
     517        padding: 10px 12px;
     518        background: #0f172a;
     519        color: #999;
     520        font-weight: 600;
     521        font-size: 12px;
     522        text-transform: uppercase;
     523        letter-spacing: 0.5px;
     524        border-bottom: 1px solid #eee;
     525}
     526
     527.jh-magic-table td {
     528        padding: 12px;
     529        border-bottom: 1px solid #eee;
     530        vertical-align: middle;
     531}
     532
     533.jh-magic-table tr:hover td {
     534        background: rgba(255, 255, 255, 0.02);
     535}
     536
     537.jh-ml-num {
     538        color: #64748b;
     539        font-weight: 600;
     540        width: 30px;
     541}
     542
     543.jh-ml-user-name {
     544        color: #23282d;
     545        display: block;
     546}
     547
     548.jh-ml-user-meta {
     549        display: flex;
     550        align-items: center;
     551        gap: 6px;
     552        margin-top: 4px;
     553}
     554
     555.jh-ml-role-chip {
     556        background: #0f172a;
     557        color: #fff;
     558        font-size: 11px;
     559        padding: 2px 7px;
     560        border-radius: 4px;
     561        font-weight: 600;
     562}
     563
     564.jh-ml-label-text {
     565        font-size: 12px;
     566        color: #999;
     567        font-style: italic;
     568}
     569
     570.jh-ml-date {
     571        color: #999;
     572}
     573
     574.jh-ml-soon {
     575        color: #fbbf24;
     576}
     577
     578.jh-ml-soon-tag {
     579        display: inline-block;
     580        background: rgba(245, 158, 11, 0.15);
     581        color: #fbbf24;
     582        border: 1px solid rgba(245, 158, 11, 0.3);
     583        font-size: 11px;
     584        padding: 1px 6px;
     585        border-radius: 4px;
     586        margin-left: 6px;
     587}
     588
     589.jh-ml-usage {
     590        font-size: 12.5px;
     591        color: #999;
     592}
     593
     594.jh-magic-empty-state {
     595        text-align: center;
     596        padding: 36px 20px;
     597        color: #999;
     598}
     599
     600.jh-magic-empty-state svg {
     601        margin-bottom: 10px;
     602}
     603
     604.jh-magic-empty-state p {
     605        font-size: 14.5px;
     606        font-weight: 600;
     607        color: #999;
     608        margin: 0 0 4px 0;
     609}
     610
     611.jh-magic-empty-state span {
     612        font-size: 12.5px;
     613        color: #64748b;
     614}
  • disabled-source-disabled-right-click-and-content-protection/trunk/includes/admin/assets/js/admin.js

    r3531101 r3713164  
    1010        $(this).append($btn);
    1111    });
     12
     13    /* ─────────────────────────────────────────────────────────────
     14     * Magic Login / Temp Login Handlers
     15     * ─────────────────────────────────────────────────────────── */
     16
     17    function copyToClipboard(text, $btn) {
     18        if (!text) return;
     19        if (navigator.clipboard && navigator.clipboard.writeText) {
     20            navigator.clipboard.writeText(text).then(function() {
     21                showCopied($btn);
     22            }).catch(function() {
     23                fallbackCopy(text, $btn);
     24            });
     25        } else {
     26            fallbackCopy(text, $btn);
     27        }
     28    }
     29
     30    function fallbackCopy(text, $btn) {
     31        var $temp = $('<input>');
     32        $('body').append($temp);
     33        $temp.val(text).select();
     34        document.execCommand('copy');
     35        $temp.remove();
     36        showCopied($btn);
     37    }
     38
     39    function showCopied($btn) {
     40        var $text = $btn.find('.jh-copy-text');
     41        var origText = $text.text();
     42        $btn.addClass('jh-copied');
     43        $text.text('Copied!');
     44        setTimeout(function() {
     45            $btn.removeClass('jh-copied');
     46            $text.text(origText);
     47        }, 2000);
     48    }
     49
     50    // Generate Magic Link Button Click (AJAX Save)
     51    $(document).on('click', '#jh-magic-generate-btn', function(e) {
     52        e.preventDefault();
     53
     54        var $btn       = $(this);
     55        var $container = $('#jh-magic-login-form');
     56        var userId     = $('#jh-ml-user').val();
     57        var nonce      = $('#jh_magic_login_nonce').val() || $container.find('[name="_nonce"]').val();
     58
     59        if (!userId) {
     60            alert('Please select a valid user.');
     61            $('#jh-ml-user').focus();
     62            return;
     63        }
     64
     65        $btn.prop('disabled', true);
     66        $btn.find('.jh-btn-text').hide();
     67        $btn.find('.jh-btn-icon').hide();
     68        $btn.find('.jh-btn-spinner').show();
     69
     70        $.ajax({
     71            url: ajaxurl,
     72            type: 'POST',
     73            dataType: 'json',
     74            data: {
     75                action:      'jh_create_magic_link',
     76                _nonce:      nonce,
     77                user_id:     userId,
     78                duration:    $('#jh-ml-duration').val(),
     79                max_uses:    $('#jh-ml-max-uses').val(),
     80                label:       $('#jh-ml-label').val(),
     81                redirect_to: $('#jh-ml-redirect').val()
     82            },
     83            success: function(res) {
     84                $btn.prop('disabled', false);
     85                $btn.find('.jh-btn-spinner').hide();
     86                $btn.find('.jh-btn-text').show();
     87                $btn.find('.jh-btn-icon').show();
     88
     89                if (!res.success) {
     90                    alert(res.data && res.data.message ? res.data.message : 'Failed to generate link.');
     91                    return;
     92                }
     93
     94                var d = res.data;
     95
     96                // Show result box
     97                $('#jh-magic-result-url').val(d.login_url);
     98                $('#jh-magic-result-meta').html(
     99                    '<strong>' + d.display_name + '</strong> (' + d.user_role + ') &nbsp;|&nbsp; ' +
     100                    '⏱ Expires: ' + d.expires_label + ' (' + d.duration_label + ') &nbsp;|&nbsp; ' +
     101                    'Max uses: ' + (d.max_uses > 0 ? d.max_uses : 'Unlimited')
     102                );
     103                $('#jh-magic-result-card').slideDown(300);
     104
     105                // Append or create row in table
     106                var $tbody = $('#jh-magic-tbody');
     107                var usesLabel = (d.max_uses > 0) ? ('0 / ' + d.max_uses) : '0 / ∞';
     108                var labelHtml = d.label ? ('<span class="jh-ml-label-text">"' + $('<div>').text(d.label).html() + '"</span>') : '';
     109
     110                var rowHtml = '<tr id="jh-ml-row-' + d.token + '" data-token="' + d.token + '">' +
     111                    '<td class="jh-ml-num">' + ($tbody.length ? ($tbody.find('tr').length + 1) : 1) + '</td>' +
     112                    '<td>' +
     113                        '<strong class="jh-ml-user-name">' + $('<div>').text(d.display_name).html() + '</strong>' +
     114                        '<div class="jh-ml-user-meta">' +
     115                            '<span class="jh-ml-role-chip">' + $('<div>').text(d.user_role).html() + '</span>' +
     116                            labelHtml +
     117                        '</div>' +
     118                    '</td>' +
     119                    '<td><span class="jh-ml-date">' + d.expires_label + '</span></td>' +
     120                    '<td><span class="jh-ml-usage">' + usesLabel + '</span></td>' +
     121                    '<td>' +
     122                        '<button type="button" class="jh-magic-btn jh-magic-btn-sm jh-magic-row-copy-btn" data-url="' + d.login_url + '">' +
     123                            '<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg> ' +
     124                            '<span class="jh-copy-text">Copy Link</span>' +
     125                        '</button>' +
     126                    '</td>' +
     127                    '<td>' +
     128                        '<button type="button" class="jh-magic-btn jh-magic-btn-sm jh-magic-btn-danger jh-magic-revoke-btn" data-token="' + d.token + '">' +
     129                            '<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg> ' +
     130                            '<span>Revoke</span>' +
     131                        '</button>' +
     132                    '</td>' +
     133                '</tr>';
     134
     135                if ($tbody.length) {
     136                    $tbody.append(rowHtml);
     137                } else {
     138                    $('#jh-magic-table-wrap').html(
     139                        '<table class="jh-magic-table" id="jh-magic-table">' +
     140                        '<thead><tr>' +
     141                        '<th>#</th><th>User / Label</th><th>Expires In</th>' +
     142                        '<th>Usage</th><th>Magic Link</th><th>Actions</th>' +
     143                        '</tr></thead>' +
     144                        '<tbody id="jh-magic-tbody">' + rowHtml + '</tbody>' +
     145                        '</table>'
     146                    );
     147                }
     148
     149                // Update count badge
     150                var count = parseInt($('#jh-magic-count-badge').text(), 10) || 0;
     151                $('#jh-magic-count-badge').text(count + 1);
     152
     153                // Clear label field
     154                $container.find('[name="label"]').val('');
     155            },
     156            error: function() {
     157                $btn.prop('disabled', false);
     158                $btn.find('.jh-btn-spinner').hide();
     159                $btn.find('.jh-btn-text').show();
     160                $btn.find('.jh-btn-icon').show();
     161                alert('An error occurred. Please try again.');
     162            }
     163        });
     164    });
     165
     166    // Copy link from result box
     167    $(document).on('click', '#jh-magic-copy-main-btn', function() {
     168        var url = $('#jh-magic-result-url').val();
     169        copyToClipboard(url, $(this));
     170    });
     171
     172    // Copy link from table row
     173    $(document).on('click', '.jh-magic-row-copy-btn', function() {
     174        var url = $(this).data('url');
     175        copyToClipboard(url, $(this));
     176    });
     177
     178    // Revoke link
     179    $(document).on('click', '.jh-magic-revoke-btn', function() {
     180        if (!confirm('Are you sure you want to revoke this magic login link? It will immediately stop working.')) {
     181            return;
     182        }
     183
     184        var $btn  = $(this);
     185        var token = $btn.data('token');
     186        var $row  = $('#jh-ml-row-' + token);
     187        var nonce = $('#jh_magic_login_nonce').val();
     188
     189        $btn.prop('disabled', true);
     190
     191        $.ajax({
     192            url: ajaxurl,
     193            type: 'POST',
     194            dataType: 'json',
     195            data: {
     196                action: 'jh_delete_magic_link',
     197                _nonce: nonce,
     198                token:  token
     199            },
     200            success: function(res) {
     201                if (res.success) {
     202                    $row.fadeOut(300, function() {
     203                        $row.remove();
     204                        var count = parseInt($('#jh-magic-count-badge').text(), 10) || 1;
     205                        $('#jh-magic-count-badge').text(Math.max(0, count - 1));
     206
     207                        if ($('#jh-magic-tbody tr').length === 0) {
     208                            $('#jh-magic-table-wrap').html(
     209                                '<div id="jh-magic-empty-state" class="jh-magic-empty-state">' +
     210                                '<svg width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="#6b7280" stroke-width="1.5"><circle cx="12" cy="12" r="10"></circle><path d="m4.93 4.93 14.14 14.14"></path></svg>' +
     211                                '<p>No active temporary login links.</p>' +
     212                                '<span>Use the form above to generate a passwordless magic login link.</span>' +
     213                                '</div>'
     214                            );
     215                        }
     216                    });
     217                } else {
     218                    $btn.prop('disabled', false);
     219                    alert(res.data && res.data.message ? res.data.message : 'Failed to revoke link.');
     220                }
     221            },
     222            error: function() {
     223                $btn.prop('disabled', false);
     224                alert('An error occurred while revoking the link.');
     225            }
     226        });
     227    });
    12228});
     229
  • disabled-source-disabled-right-click-and-content-protection/trunk/includes/admin/options/global.php

    r3531101 r3713164  
    626626  ) );
    627627
     628   // Magic Login
     629  CSF::createSection( $prefix, array(
     630    'title'  => esc_html__( 'Magic Login', 'disabled-source-disabled-right-click-and-content-protection' ),
     631    'class' => 'jh-pro-feature',
     632    'fields' => array(
     633      array(
     634        'type'    => 'callback',
     635        'function' => 'magic_login_callback',
     636      ),
     637    )
     638  ) );
     639
    628640}
  • disabled-source-disabled-right-click-and-content-protection/trunk/includes/functions/functions.php

    r3690723 r3713164  
    393393}
    394394
    395 ?>
     395if ( ! function_exists( 'magic_login_callback' ) ) {
     396        function magic_login_callback() {
     397                $users = get_users( [
     398                        'orderby' => 'display_name',
     399                        'order'   => 'ASC',
     400                        'fields'  => [ 'ID', 'display_name', 'user_login' ],
     401                ] );
     402
     403                $is_pro = class_exists( 'CTBlock_Magic_Login' );
     404                $links  = $is_pro ? CTBlock_Magic_Login::get_active_links() : [];
     405                $nonce  = wp_create_nonce( 'jh_magic_login_nonce' );
     406                ?>
     407                <div class="jh-magic-wrap <?php echo ! $is_pro ? 'jh-magic-wrap-disabled' : ''; ?>">
     408
     409                        <!-- Header -->
     410                        <div class="jh-magic-header">
     411                                <div class="jh-magic-header-icon">
     412                                        <svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
     413                                                <path d="M15 4V2"></path>
     414                                                <path d="M15 16v-2"></path>
     415                                                <path d="M8 9h2"></path>
     416                                                <path d="M20 9h2"></path>
     417                                                <path d="M17.8 11.8 19 13"></path>
     418                                                <path d="M15 9h0"></path>
     419                                                <path d="M17.8 6.2 19 5"></path>
     420                                                <path d="m3 21 9-9"></path>
     421                                                <path d="M12.2 6.2 11 5"></path>
     422                                        </svg>
     423                                </div>
     424                                <div class="jh-magic-header-text">
     425                                        <h3><?php esc_html_e( 'Magic Login (Temporary Passwordless Access)', 'disabled-source-disabled-right-click-and-content-protection' ); ?></h3>
     426                                        <p><?php esc_html_e( 'Generate password-free, time-limited login links for any user role. Perfect for granting instant, temporary access to developers, clients, or support teams without sharing passwords.', 'disabled-source-disabled-right-click-and-content-protection' ); ?></p>
     427                                </div>
     428                        </div>
     429
     430                        <!-- Form Card -->
     431                        <div class="jh-magic-card">
     432                                <h4 class="jh-magic-card-title">
     433                                        <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line></svg>
     434                                        <?php esc_html_e( 'Generate New Magic Login Link', 'disabled-source-disabled-right-click-and-content-protection' ); ?>
     435                                </h4>
     436
     437                                <div id="jh-magic-login-form">
     438                                        <input type="hidden" id="jh_magic_login_nonce" name="_nonce" value="<?php echo esc_attr( $nonce ); ?>">
     439                                        <div class="jh-magic-grid">
     440
     441                                                <!-- User Select -->
     442                                                <div class="jh-magic-form-group">
     443                                                        <label for="jh-ml-user"><?php esc_html_e( 'Select User', 'disabled-source-disabled-right-click-and-content-protection' ); ?> <span class="jh-required">*</span></label>
     444                                                        <select name="user_id" id="jh-ml-user" class="jh-magic-select" <?php disabled( ! $is_pro ); ?> required>
     445                                                                <option value=""><?php esc_html_e( '— Choose a user —', 'disabled-source-disabled-right-click-and-content-protection' ); ?></option>
     446                                                                <?php foreach ( $users as $u ) :
     447                                                                        $user_obj  = get_userdata( $u->ID );
     448                                                                        $user_role = ( $user_obj && ! empty( $user_obj->roles ) ) ? ucfirst( reset( $user_obj->roles ) ) : 'User';
     449                                                                ?>
     450                                                                        <option value="<?php echo esc_attr( $u->ID ); ?>">
     451                                                                                <?php echo esc_html( $u->display_name . ' (' . $u->user_login . ') — ' . $user_role ); ?>
     452                                                                        </option>
     453                                                                <?php endforeach; ?>
     454                                                        </select>
     455                                                </div>
     456
     457                                                <!-- Expiration -->
     458                                                <div class="jh-magic-form-group">
     459                                                        <label for="jh-ml-duration"><?php esc_html_e( 'Link Expires In', 'disabled-source-disabled-right-click-and-content-protection' ); ?></label>
     460                                                        <select name="duration" id="jh-ml-duration" class="jh-magic-select" <?php disabled( ! $is_pro ); ?>>
     461                                                                <option value="1h"><?php esc_html_e( '1 Hour', 'disabled-source-disabled-right-click-and-content-protection' ); ?></option>
     462                                                                <option value="24h" selected><?php esc_html_e( '24 Hours (1 Day)', 'disabled-source-disabled-right-click-and-content-protection' ); ?></option>
     463                                                                <option value="7d"><?php esc_html_e( '7 Days (1 Week)', 'disabled-source-disabled-right-click-and-content-protection' ); ?></option>
     464                                                                <option value="30d"><?php esc_html_e( '30 Days (1 Month)', 'disabled-source-disabled-right-click-and-content-protection' ); ?></option>
     465                                                        </select>
     466                                                </div>
     467
     468                                                <!-- Max Uses -->
     469                                                <div class="jh-magic-form-group">
     470                                                        <label for="jh-ml-max-uses"><?php esc_html_e( 'Max Allowed Uses', 'disabled-source-disabled-right-click-and-content-protection' ); ?></label>
     471                                                        <select name="max_uses" id="jh-ml-max-uses" class="jh-magic-select" <?php disabled( ! $is_pro ); ?>>
     472                                                                <option value="1" selected><?php esc_html_e( '1 — Single use (Recommended)', 'disabled-source-disabled-right-click-and-content-protection' ); ?></option>
     473                                                                <option value="0"><?php esc_html_e( '0 — Unlimited uses until expired', 'disabled-source-disabled-right-click-and-content-protection' ); ?></option>
     474                                                                <option value="5"><?php esc_html_e( '5 uses', 'disabled-source-disabled-right-click-and-content-protection' ); ?></option>
     475                                                                <option value="10"><?php esc_html_e( '10 uses', 'disabled-source-disabled-right-click-and-content-protection' ); ?></option>
     476                                                        </select>
     477                                                </div>
     478
     479                                                <!-- Label / Note -->
     480                                                <div class="jh-magic-form-group">
     481                                                        <label for="jh-ml-label"><?php esc_html_e( 'Label / Purpose (Optional)', 'disabled-source-disabled-right-click-and-content-protection' ); ?></label>
     482                                                        <input type="text" name="label" id="jh-ml-label" class="jh-magic-input" placeholder="<?php esc_attr_e( 'e.g. Developer Access, Client Preview', 'disabled-source-disabled-right-click-and-content-protection' ); ?>" <?php disabled( ! $is_pro ); ?>>
     483                                                </div>
     484
     485                                                <!-- Redirect Target -->
     486                                                <div class="jh-magic-form-group jh-magic-grid-full">
     487                                                        <label for="jh-ml-redirect"><?php esc_html_e( 'Redirect After Login', 'disabled-source-disabled-right-click-and-content-protection' ); ?></label>
     488                                                        <select name="redirect_to" id="jh-ml-redirect" class="jh-magic-select" <?php disabled( ! $is_pro ); ?>>
     489                                                                <option value="<?php echo esc_attr( admin_url() ); ?>"><?php esc_html_e( 'WP Admin Dashboard (Default)', 'disabled-source-disabled-right-click-and-content-protection' ); ?></option>
     490                                                                <option value="<?php echo esc_attr( home_url( '/' ) ); ?>"><?php esc_html_e( 'Website Homepage', 'disabled-source-disabled-right-click-and-content-protection' ); ?></option>
     491                                                        </select>
     492                                                </div>
     493
     494                                        </div>
     495
     496                                        <?php if ( $is_pro ) : ?>
     497                                        <div class="jh-magic-actions">
     498                                                <button type="button" id="jh-magic-generate-btn" class="jh-magic-btn jh-magic-btn-primary">
     499                                                        <svg class="jh-btn-icon" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M15 4V2"></path><path d="M15 16v-2"></path><path d="M8 9h2"></path><path d="M20 9h2"></path><path d="M17.8 11.8 19 13"></path><path d="M15 9h0"></path><path d="M17.8 6.2 19 5"></path><path d="m3 21 9-9"></path></svg>
     500                                                        <span class="jh-btn-text"><?php esc_html_e( 'Generate Magic Login Link', 'disabled-source-disabled-right-click-and-content-protection' ); ?></span>
     501                                                        <span class="jh-btn-spinner" style="display:none;"></span>
     502                                                </button>
     503                                        </div>
     504                                        <?php endif; ?>
     505
     506                                </div>
     507
     508                                <!-- Success Result Box -->
     509                                <div id="jh-magic-result-card" class="jh-magic-result-card" style="display:none;">
     510                                        <div class="jh-magic-result-header">
     511                                                <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#10b981" stroke-width="2"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>
     512                                                <span id="jh-magic-result-message"><?php esc_html_e( 'Magic login link created successfully!', 'disabled-source-disabled-right-click-and-content-protection' ); ?></span>
     513                                        </div>
     514                                        <div id="jh-magic-result-meta" class="jh-magic-result-meta"></div>
     515                                        <div class="jh-magic-result-url-wrap">
     516                                                <input type="text" id="jh-magic-result-url" class="jh-magic-result-input" readonly>
     517                                                <button type="button" id="jh-magic-copy-main-btn" class="jh-magic-btn jh-magic-btn-copy">
     518                                                        <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>
     519                                                        <span class="jh-copy-text"><?php esc_html_e( 'Copy Link', 'disabled-source-disabled-right-click-and-content-protection' ); ?></span>
     520                                                </button>
     521                                        </div>
     522                                </div>
     523                        </div>
     524
     525                        <!-- Active Links Card -->
     526                        <div class="jh-magic-card" style="margin-top: 24px;">
     527                                <div class="jh-magic-card-header">
     528                                        <h4 class="jh-magic-card-title">
     529                                                <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
     530                                                <?php esc_html_e( 'Active Temporary Login Links', 'disabled-source-disabled-right-click-and-content-protection' ); ?>
     531                                        </h4>
     532                                        <span id="jh-magic-count-badge" class="jh-magic-badge"><?php echo count( $links ); ?></span>
     533                                </div>
     534
     535                                <div id="jh-magic-table-wrap" class="jh-magic-table-wrap">
     536                                        <?php if ( empty( $links ) ) : ?>
     537                                                <div id="jh-magic-empty-state" class="jh-magic-empty-state">
     538                                                        <svg width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="#6b7280" stroke-width="1.5"><circle cx="12" cy="12" r="10"></circle><path d="m4.93 4.93 14.14 14.14"></path></svg>
     539                                                        <p><?php esc_html_e( 'No active temporary login links.', 'disabled-source-disabled-right-click-and-content-protection' ); ?></p>
     540                                                        <span><?php esc_html_e( 'Use the form above to generate a passwordless magic login link.', 'disabled-source-disabled-right-click-and-content-protection' ); ?></span>
     541                                                </div>
     542                                        <?php else : ?>
     543                                                <table class="jh-magic-table" id="jh-magic-table">
     544                                                        <thead>
     545                                                                <tr>
     546                                                                        <th>#</th>
     547                                                                        <th><?php esc_html_e( 'User / Label', 'disabled-source-disabled-right-click-and-content-protection' ); ?></th>
     548                                                                        <th><?php esc_html_e( 'Expires In', 'disabled-source-disabled-right-click-and-content-protection' ); ?></th>
     549                                                                        <th><?php esc_html_e( 'Usage', 'disabled-source-disabled-right-click-and-content-protection' ); ?></th>
     550                                                                        <th><?php esc_html_e( 'Magic Link', 'disabled-source-disabled-right-click-and-content-protection' ); ?></th>
     551                                                                        <th><?php esc_html_e( 'Actions', 'disabled-source-disabled-right-click-and-content-protection' ); ?></th>
     552                                                                </tr>
     553                                                        </thead>
     554                                                        <tbody id="jh-magic-tbody">
     555                                                                <?php foreach ( $links as $i => $link ) :
     556                                                                        $link_user  = get_userdata( $link['user_id'] );
     557                                                                        $login_url  = class_exists( 'CTBlock_Magic_Login' ) ? CTBlock_Magic_Login::get_login_url( $link['token'] ) : add_query_arg( 'jh_magic_login', rawurlencode( $link['token'] ), home_url( '/' ) );
     558                                                                        $user_role  = ( $link_user && ! empty( $link_user->roles ) ) ? ucfirst( reset( $link_user->roles ) ) : 'User';
     559                                                                        $uses_text  = ( isset( $link['max_uses'] ) && $link['max_uses'] > 0 ) ? ( $link['use_count'] . ' / ' . $link['max_uses'] ) : ( $link['use_count'] . ' / ∞' );
     560                                                                        $is_soon    = ( $link['expires'] - time() ) < 3600;
     561                                                                ?>
     562                                                                        <tr id="jh-ml-row-<?php echo esc_attr( $link['token'] ); ?>" data-token="<?php echo esc_attr( $link['token'] ); ?>">
     563                                                                                <td class="jh-ml-num"><?php echo absint( $i + 1 ); ?></td>
     564                                                                                <td>
     565                                                                                        <strong class="jh-ml-user-name">
     566                                                                                                <?php echo $link_user ? esc_html( $link_user->display_name ) : esc_html__( '(Deleted User)', 'disabled-source-disabled-right-click-and-content-protection' ); ?>
     567                                                                                        </strong>
     568                                                                                        <div class="jh-ml-user-meta">
     569                                                                                                <span class="jh-ml-role-chip"><?php echo esc_html( $user_role ); ?></span>
     570                                                                                                <?php if ( ! empty( $link['label'] ) ) : ?>
     571                                                                                                        <span class="jh-ml-label-text">"<?php echo esc_html( $link['label'] ); ?>"</span>
     572                                                                                                <?php endif; ?>
     573                                                                                        </div>
     574                                                                                </td>
     575                                                                                <td>
     576                                                                                        <span class="jh-ml-date <?php echo $is_soon ? 'jh-ml-soon' : ''; ?>">
     577                                                                                                <?php echo esc_html( date_i18n( 'M j, Y g:i a', $link['expires'] ) ); ?>
     578                                                                                        </span>
     579                                                                                        <?php if ( $is_soon ) : ?>
     580                                                                                                <span class="jh-ml-soon-tag"><?php esc_html_e( 'Expiring Soon', 'disabled-source-disabled-right-click-and-content-protection' ); ?></span>
     581                                                                                        <?php endif; ?>
     582                                                                                </td>
     583                                                                                <td>
     584                                                                                        <span class="jh-ml-usage"><?php echo esc_html( $uses_text ); ?></span>
     585                                                                                </td>
     586                                                                                <td>
     587                                                                                        <button type="button" class="jh-magic-btn jh-magic-btn-sm jh-magic-row-copy-btn" data-url="<?php echo esc_attr( $login_url ); ?>">
     588                                                                                                <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>
     589                                                                                                <span class="jh-copy-text"><?php esc_html_e( 'Copy Link', 'disabled-source-disabled-right-click-and-content-protection' ); ?></span>
     590                                                                                        </button>
     591                                                                                </td>
     592                                                                                <td>
     593                                                                                        <button type="button" class="jh-magic-btn jh-magic-btn-sm jh-magic-btn-danger jh-magic-revoke-btn" data-token="<?php echo esc_attr( $link['token'] ); ?>">
     594                                                                                                <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg>
     595                                                                                                <span><?php esc_html_e( 'Revoke', 'disabled-source-disabled-right-click-and-content-protection' ); ?></span>
     596                                                                                        </button>
     597                                                                                </td>
     598                                                                        </tr>
     599                                                                <?php endforeach; ?>
     600                                                        </tbody>
     601                                                </table>
     602                                        <?php endif; ?>
     603                                </div>
     604                        </div>
     605
     606                </div>
     607                <?php
     608        }
     609}
  • disabled-source-disabled-right-click-and-content-protection/trunk/readme.txt

    r3690723 r3713164  
    44Requires at least: 4.7
    55Tested up to: 7.1
    6 Stable tag: 1.8.1
     6Stable tag: 1.8.2
    77Requires PHP: 5.3
    88License: GPLv2 or later
    … …  
    3131* Page Block by Password (Pro)
    3232* Change Login Slug (Pro)
     33* Magic Login Link (Pro)
    3334* Disable F12
    3435* Disable Ctrl+I
    … …  
    157158== Changelog ==
    158159
     160= 1.8.2 =
     161
     162* Added: Compatibility with WooCommerce 11.1.1
     163* Added: Compatibility with Elementor 4.2.4
     164* Added: Magic Login Link feature
     165
    159166= 1.8.1 =
    160167
Note: See TracChangeset for help on using the changeset viewer.