Forum Replies Created

Viewing 15 replies - 1 through 15 (of 61 total)
  • Thread Starter moein

    (@moeinkd)

    thank you and your welcome
    Is it possible to exclude the two so that they do not interfere with each other?
    for example:
    $classes=explode(‘persian-woocommerce’);

    In one of the plugins I had seen, such a method was used to prevent it from interfering with other plugins

    Thread Starter moein

    (@moeinkd)

    –update–
    Hi, I even put a picture of proof of it
    External link and protect

    In local hosts:
    https://pasteboard.co/JHWjXb0.jpg

    On my own host:
    -before has worked well
    https://pasteboard.co/JHWjN0B.jpg

    Believe that your plugin has such a feature
    I wish I had not updated it so that such a problem would not occur

    Thread Starter moein

    (@moeinkd)

    Thank you
    your plugin has this feature, I have been using it for a few months
    The two most important reasons I used this plugin
    -External link
    -secure source Link and its non-disclosure
    I tested it on localhost now, no problem

    • This reply was modified 1 year, 9 months ago by moein.

    In my experience, There are several modes
    1- Access is obtained from the server and You can’t do anything
    2- The hacker has access from C Panel (change the database password and C Panel)
    2- A hidden user has been created in the database that you can not see in WordPress (check the database wp-users)
    3- Injected in one of the backdoor files (delete all WordPress files except the wp-content folder)
    Check all files and folders in wp-content directory (Attention their update date)
    Check all the photos in the upload directory
    Even a photo can be shell !!!

    4- Do all permissions as follows
    wp-config,wp-load,.htaccess 400 (for edit, change permission to 600)
    permision folder 750 (Except folder upload)

    5- Change the path of the WordPress config file and
    obfuscator wp-config and wp-load.php

    6- at last, use file monitor plugin. Check any files that change (add, del,edit) on the host

    In short, this requires great care.
    wish you luck

    • This reply was modified 1 year, 9 months ago by moein. Reason: more
    Thread Starter moein

    (@moeinkd)

    Hey @hallme
    thank you for your attention
    I found a code that allows (or ban) only the domains entered in it
    I hope it is useful for others and may help to your good plugin feature
    Regards

    /* Gravity Forms Email Domain Validator
    * @link      http://gravitywiz.com/banlimit-email-domains-for-gravity-form-email-fields/
    */
    
    class GW_Email_Domain_Validator {
        private $_args;
    	
        function __construct($args) {
            $this->_args = wp_parse_args( $args, array(
                //'form_id' => false,
                //'field_id' => false,
    			'domains' => false,
    			'validation_message' => __( '<strong>Error</strong>: Please enter a valid email address' ),
                'mode' => 'ban' // also accepts "limit"
            ) );
    
            // convert field ID to an array for consistency, it can be passed as an array or a single ID
            if($this->_args['field_id'] && !is_array($this->_args['field_id']))
                $this->_args['field_id'] = array($this->_args['field_id']);
    
            $form_filter = $this->_args['form_id'] ? "_{$this->_args['form_id']}" : '';
    
            add_filter("gform_validation{$form_filter}", array($this, 'validate'));
    
        }
    
        function validate($validation_result) {
    
            $form = $validation_result['form'];
    
            foreach($form['fields'] as &$field) {
    
                // if this is not an email field, skip
                if(RGFormsModel::get_input_type($field) != 'email')
                    continue;
    
                // if field ID was passed and current field is not in that array, skip
                if($this->_args['field_id'] && !in_array($field['id'], $this->_args['field_id']))
                    continue;
    
                $page_number = GFFormDisplay::get_source_page( $form['id'] );
                if( $page_number > 0 && $field->pageNumber != $page_number ) {
                    continue;
                }
    
                if( GFFormsModel::is_field_hidden( $form, $field, array() ) ) {
                	continue;
                }
    
                $domain = $this->get_email_domain($field);
    
                // if domain is valid OR if the email field is empty, skip
                if($this->is_domain_valid($domain) || empty($domain))
                    continue;
    
                $validation_result['is_valid'] = false;
                $field['failed_validation'] = true;
                $field['validation_message'] = sprintf($this->_args['validation_message'], $domain);
    
            }
    
            $validation_result['form'] = $form;
            return $validation_result;
        }
    
        function get_email_domain( $field ) {
            $email = explode( '@', rgpost( "input_{$field['id']}" ) );
            return trim( rgar( $email, 1 ) );
        }
    
        function is_domain_valid( $domain ) {
    
            $mode   = $this->_args['mode'];
    	    $domain = strtolower( $domain );
    
            foreach( $this->_args['domains'] as $_domain ) {
    
    	        $_domain = strtolower( $_domain );
    
                $full_match   = $domain == $_domain;
                $suffix_match = strpos( $_domain, '.' ) === 0 && $this->str_ends_with( $domain, $_domain );
                $has_match    = $full_match || $suffix_match;
    
                if( $mode == 'ban' && $has_match ) {
                    return false;
                } else if( $mode == 'limit' && $has_match ) {
                    return true;
                }
    
            }
    
            return $mode == 'limit' ? false : true;
        }
    
        function str_ends_with( $string, $text ) {
    
            $length      = strlen( $string );
            $text_length = strlen( $text );
    
            if( $text_length > $length ) {
                return false;
            }
    
            return substr_compare( $string, $text, $length - $text_length, $text_length ) === 0;
        }
    
    }
    
    class GWEmailDomainControl extends GW_Email_Domain_Validator { }
    
    # Configuration
    
    new GW_Email_Domain_Validator( array(
        //'form_id' => 326,
        //'field_id' => 1,
    	'domains' => array( 'gmail.com', 'hotmail.com', 'yahoo.com', 'domain.com' ),
    	'validation_message' => __( '<strong>Error</strong>: Please enter a valid email address' ),
        'mode' => 'limit'
    ) );
    Thread Starter moein

    (@moeinkd)

    Thanks, I tried this too. But it did not work
    It seems to be a back-end problem and can not be solved with css
    Thank you for your time

    Thread Starter moein

    (@moeinkd)

    you’re welcome. I tried this code before
    Does not change

    Thread Starter moein

    (@moeinkd)

    Hello
    Did you get a good result?

    Thread Starter moein

    (@moeinkd)

    I appreciate your kindness
    Best Regards

    Thread Starter moein

    (@moeinkd)

    Thanks for your good advice
    ‌Best Regards

    Thread Starter moein

    (@moeinkd)

    Thank you dear @kellymetal
    your distributions were completely accurate
    The price is in the class-widget-product-details.php file
    line 37

    if ( mf_get_product_demo( $post->ID ) != 'demo2' ) {
    echo '<div class="price">' . $product->get_price_html() . '</div>';
    }

    in fact, I want the price of variable products to replace the default price above
    http://imgurl.ir/uploads/f848665_.png
    //my product page
    https://cutt.ly/6o69HPU

    That’s why I use the following code, but I’m having trouble
    http://txt.do/1gp6x

    Can you guide me further
    Grateful

    • This reply was modified 2 years, 2 months ago by moein.
    Thread Starter moein

    (@moeinkd)

    Hi
    Your explanation was completely accurate and excellent
    Thank you for your kindness
    I wish you success and good health

    Thread Starter moein

    (@moeinkd)

    Thread Starter moein

    (@moeinkd)

    Hi mouli,
    Thank you very much for your unique guidance
    Your guide helped me a lot
    I wish you success and good health

    Thread Starter moein

    (@moeinkd)

    @fevered I look forward to your guidance

Viewing 15 replies - 1 through 15 (of 61 total)