Plugin Directory

Changeset 2796736


Ignore:
Timestamp:
10/10/2022 04:38:59 PM (3 years ago)
Author:
pipewebmonetization
Message:

Fix reported issues

Location:
pipe-web-monetization/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • pipe-web-monetization/trunk/README.txt

    r2794160 r2796736  
    55Requires at least: 4.9
    66Tested up to: 6.0.2
    7 Stable tag: 1.0.1
     7Stable tag: 1.0.2
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    2020== Installation ==
    2121
    22 1. Set your Plugin ID in dashboard ()
     221. Set your Plugin ID in dashboard (https://dashboard.pipewebmonetization.com/)
    23232. Add your Plugin ID in plugin settings tab
    24243. Add one or more payment pointers
     
    4343* Fix monetization tag
    4444
     45= 1.0.2 =
     46* Fix small issues
     47
    4548== Upgrade Notice ==
    46 * Fix monetization tag
     49* Fix small issues
    4750
    4851== Arbitrary section ==
  • pipe-web-monetization/trunk/admin/css/pipe-web-monetization-admin.css

    r2794160 r2796736  
    143143}
    144144
     145.pointer-input:focus {
     146    outline: none !important;
     147    border:1px solid #FFC121 !important;;
     148    box-shadow: 0 0 5px #FFC121 !important;;
     149}
     150
    145151.pointer-input:read-only {
    146152    background-color: rgba(25, 25, 25, 0.04);
     
    175181    width: 50%;
    176182    margin-right: 0.5rem;
     183    padding: 0.2rem 1rem 0.2rem 1rem !important;
     184}
     185
     186.probability-input > input:focus {
     187    outline: none !important;
     188    border:1px solid #FFC121;
     189    box-shadow: 0 0 5px #FFC121;
    177190}
    178191
     
    245258}
    246259
     260.rules-div > input:focus {
     261    outline: none !important;
     262    border:1px solid #FFC121;
     263    box-shadow: 0 0 5px #FFC121;
     264}
     265
    247266.feedback-span-success {
    248267    width: 100%;
  • pipe-web-monetization/trunk/admin/index.php

    r2794160 r2796736  
    289289        }
    290290
    291         for ($i = 0; $i < count($pointers) ; $i++) {
    292             if (trim($pointers[$i] == '') || trim($probability[$i] == '')) {
    293                 $is_form_empty = true;
    294             }
    295    
    296             if (trim($probability[$i]) == 0) {
    297                 $has_empty_probability = true;
    298             }
    299    
    300             $total_probability = $total_probability + $probability[$i];
    301    
    302             $indexes = array_keys($pointers, $pointers[$i]);
    303             if(count($indexes) > 1) {
    304                 $is_duplicated_pointer = true;
    305             }
     291        $pointers_size = count($pointers);
     292
     293        for ($i = ($pointers_size-1); $i >= 0; $i--) {
     294            if (trim($pointers[$i]) == '' && trim($probability[$i]) == '') {
     295                array_splice($pointers, $i, 1);
     296            } else {
     297                if ($pointers_size == 1 && trim($probability[$i]) == '') {
     298                    $probability[$i] = 100;
     299                } else if (trim($probability[$i]) == '') {
     300                    $has_empty_probability = true;       
     301                }
     302                $total_probability = $total_probability + $probability[$i];
     303
     304                $indexes = array_keys($pointers, $pointers[$i]);
     305                if(count($indexes) > 1) {
     306                    $is_duplicated_pointer = true;
     307                }
     308            }
    306309        }
    307         if ($is_form_empty || count($pointers) == 0) {
    308             echo "<span class='error-message'>The form is not filled in correctly, please check the data.";
    309         } else if ($is_duplicated_pointer) {
     310
     311        if ($pointers_size == 0) {
     312            $truncate_result = $wpdb->query("TRUNCATE TABLE $table_name");
     313            if ($truncate_result) {
     314                echo "<div id='success-message'>Your payment pointer was deleted.</div>";
     315            } else {
     316                echo "<span class='error-message'>Unable to delete payment pointers, please try again.";
     317            }
     318        } else if ($is_duplicated_pointer) {
    310319            echo "<span class='error-message'>It is not possible to register identical pointers.";
    311320        } else if ($total_probability == 0 || $has_empty_probability) {
  • pipe-web-monetization/trunk/includes/class-pipe-web-monetization.php

    r2787294 r2796736  
    117117       
    118118          ?>
    119           <div class="wrap">
     119          <div class="wrap pipe-div">
    120120           
    121121            <div class="div-main-title"><span><?php echo esc_html( get_admin_page_title() ); ?></span></div>
  • pipe-web-monetization/trunk/pipe-web-monetization.php

    r2794160 r2796736  
    1616 * Plugin URI:        http://plugin.pipewebmonetization.com/
    1717 * Description:       Pipe allows you to control who gets paid for your content and connect your payments to an admin dashboard.
    18  * Version:           1.0.1
     18 * Version:           1.0.2
    1919 * Author:            Pipe
    2020 * Requires at least: 4.9
Note: See TracChangeset for help on using the changeset viewer.