Plugin Directory

Changeset 3224633


Ignore:
Timestamp:
01/17/2025 08:49:15 PM (15 months ago)
Author:
Goback2
Message:

New ver 3.1

Location:
pardakht-delkhah
Files:
50 added
6 edited

Legend:

Unmodified
Added
Removed
  • pardakht-delkhah/trunk/assets/user.css

    r3126621 r3224633  
    1515}
    1616
     17.cupri_available_gateways {
     18    max-width: 215px !important;
     19    height: 30px !important;
     20    border: 1px solid #bbb;
     21    font-size: 0.9em;
     22    cursor: pointer;
     23    margin: 2px;
     24}
     25
     26.cupri_available_gateways input {
     27    /*visibility: hidden;*/
     28}
     29
    1730
    1831@media only screen and (max-width: 600px) {
     
    2134        text-align: center;
    2235    }
     36
    2337    #cupri_submit {
    2438        width: 100% !important;
  • pardakht-delkhah/trunk/cupri.php

    r3191496 r3224633  
    55Author: استاد وردپرس
    66Author URI: https://wp-master.ir
    7 Version: 3.0.0
     7Version: 3.1
    88Description: با این پلاگین میتونید سیستم پرداخت خودتون رو راه اندازی کنید.
    99Text Domain: cupri
     
    434434                return;
    435435        }
     436
     437        /**
     438         * add multi gateways field
     439         */
     440        $selected_gateway = $cupri_gateways_settings['default'];;
     441        if (isset($_REQUEST['gateway']) && !empty($_REQUEST['gateway'])) {
     442            $selected_gateway = sanitize_text_field($_REQUEST['gateway']);
     443            $valid_gateways = apply_filters('cupri_gateways', array());
     444            if (!in_array($selected_gateway, array_keys($valid_gateways))) {
     445                _e('Invalid gateway', 'cupri');
     446                return;
     447            }
     448        }
     449
    436450        //custom fields check
    437         $gateway = $cupri_gateways_settings['default'];
     451
     452        $gateway = $selected_gateway;
    438453        $_cupri = get_option('_cupri', cupri_get_defaults_fields());
    439454        $errors = array();
  • pardakht-delkhah/trunk/gateways.php

    r3045267 r3224633  
    7777        <?php
    7878        wp_nonce_field('cupri_gateways_form');
     79        do_action('cupri_in_admin_gateways_form_start', $cupri_gateways_settings, $gateways, $currencies);
    7980        ?>
    8081        <h2> :: <?php _e('Default Gateway', 'cupri'); ?> </h2>
  • pardakht-delkhah/trunk/gateways/initial.php

    r2829835 r3224633  
    11<?php
    2 defined( 'ABSPATH' ) or die(  'No script kiddies please!' );
    3 if(!class_exists('nusoap_client'))
    4 {
    5     require_once 'nusoap.php';
     2defined('ABSPATH') or die('No script kiddies please!');
     3if (!class_exists('nusoap_client')) {
     4    require_once 'nusoap.php';
    65}
    76require_once 'class-cupri-abstract-gateway.php';
     
    1211require_once 'class-cupri-melli-gateway.php';
    1312require_once 'class-cupri-mabnanew-gateway.php';
     13/**
     14 * درگاه تست فقط برای مدیریت
     15 */
     16if ( !function_exists('wp_get_current_user') ) {
     17    include(ABSPATH . "wp-includes/pluggable.php");
     18}
     19
     20if (current_user_can('manage_options')) {
     21    require_once 'class-cupri-test-gateway.php';
     22}
    1423
    1524// cupri_start_payment
  • pardakht-delkhah/trunk/readme.txt

    r3191496 r3224633  
    44Tags: custom price payment,donate,pardakhte delkhah ,پرداخت دلخواه,فرم پرداخت,دونیت,پرداخت,دریافت وجه
    55Requires at least: 4.6
    6 Tested up to: 6.7.0
     6Tested up to: 6.7.1
    77Stable tag: 3.0.0
    88License: GPLv2 or later
     
    5757
    5858== Changelog ==
     59= 3.1 =
     60* اضافه کردن درگاه تست
     61* آماده سازی برای افزودنی چنددرگاهی
    5962= 3.0.0 =
    6063* حل مشکل خطا در برگشت با فعال بودن پلاگین wp-sms
  • pardakht-delkhah/trunk/shortcode.php

    r3126621 r3224633  
    304304}
    305305
     306/**
     307 * multi gateways
     308 */
     309$available_gateways = [];
     310$_all_gateways = apply_filters('cupri_gateways', array());
     311$multi_gateways_enabled = $cupri_gateways_settings['multi_gateways_enabled'] ?? [];
     312
     313foreach ($_all_gateways as $_gateway_id => $_gateway_name) {
     314    if (in_array($_gateway_id, $multi_gateways_enabled)) {
     315        $available_gateways[$_gateway_id] = $_gateway_name;
     316    }
     317}
     318
     319
     320if (count($available_gateways) > 0 && function_exists('padrakht_delkhah_multigateway')) {
     321    echo '<p class="cupri_submit_label">';
     322    foreach ($available_gateways as $available_gateway_id => $available_gateway_title) {
     323        echo '<label for="cupri_gateway_' . $available_gateway_id . '" class="cupri_available_gateways">' . $available_gateway_title . '
     324            <input type="radio" id="cupri_gateway_' . $available_gateway_id . '" name="gateway" value="' . $available_gateway_id . '">
     325           </label>';
     326    }
     327}
     328
     329
     330echo '<p class="cupri_response_placeholder alert"></p>';
     331echo '</p>';
     332
     333
    306334$submit_button_text = '<span class="heart">&hearts; </span> پرداخت ';
    307335if (isset($cupri_general['submit_button_text']) && !empty($cupri_general['submit_button_text'])) {
Note: See TracChangeset for help on using the changeset viewer.