artesanu
Forum Replies Created
-
Forum: Plugins
In reply to: [Elementor Website Builder - More Than Just a Page Builder] Fatal ErrorThis is the file conditions.php
“<?php
namespace Elementor;if ( ! defined( ‘ABSPATH’ ) ) {
exit; // Exit if accessed directly.
}/**
- Elementor conditions.
* - Elementor conditions handler class introduce the compare conditions and the
- check conditions methods.
* - @since 1.0.0
*/
class Conditions { /**- Compare conditions.
* - Whether the two values comply the comparison operator.
* - @since 1.0.0
- @access public
- @static
* - @param mixed $left_value First value to compare.
- @param mixed $right_value Second value to compare.
- @param string $operator Comparison operator.
* - @return bool Whether the two values complies the comparison operator.
*/
public static function compare( $left_value, $right_value, $operator ) {
switch ( $operator ) {
case ‘==’:
return $left_value == $right_value;
case ‘!=’:
return $left_value != $right_value;
case ‘!==’:
return $left_value !== $right_value;
case ‘in’:
return in_array( $left_value, $right_value, true );
case ‘!in’:
return ! in_array( $left_value, $right_value, true );
case ‘contains’:
return in_array( $right_value, $left_value, true );
case ‘!contains’:
return ! in_array( $right_value, $left_value, true );
case ‘<‘: return $left_value < $right_value; case ‘<=’: return $left_value <= $right_value; case ‘>’:
return $left_value > $right_value;
case ‘>=’:
return $left_value >= $right_value;
default:
return $left_value === $right_value;
}
}
- Check conditions.
* - Whether the comparison conditions comply.
* - @since 1.0.0
- @access public
- @static
* - @param array $conditions The conditions to check.
- @param array $comparison The comparison parameter.
* - @return bool Whether the comparison conditions comply.
*/
public static function check( array $conditions, array $comparison ) {
$is_or_condition = isset( $conditions[‘relation’] ) && ‘or’ === $conditions[‘relation’]; $condition_succeed = ! $is_or_condition; foreach ( $conditions[‘terms’] as $term ) {
if ( ! empty( $term[‘terms’] ) ) {
$comparison_result = self::check( $term, $comparison );
} else {
preg_match( ‘/(\w+)(?:[(\w+)])?/’, $term[‘name’], $parsed_name );$value = $comparison[ $parsed_name[1] ];if ( ! empty( $parsed_name[2] ) ) { $value = $value[ $parsed_name[2] ]; } $operator = null; if ( ! empty( $term['operator'] ) ) { $operator = $term['operator']; } $comparison_result = self::compare( $value, $term['value'], $operator );} if ( $is_or_condition ) { if ( $comparison_result ) { return true; } } elseif ( ! $comparison_result ) { return false; }
} return $condition_succeed;
}
}
- Compare conditions.
“
Hello
I am having the following situation on a wordpress/elementor/jetengine/litespeed cache/litespeed server site:
After a few hours installed and this did not occur before the free wordfence installation. Well, done the settings, according to a tutorial. Access to the WP panel is redirected to a restricted area page of the site, with this I cannot login to the panel. The site is still online, but access to WP does not work. I have already uninstalled the plugin and installed the other plugins to see possible conflicts, but without success. Yesterday I did the same procedure, everything seemed fine, but, hours later, the same thing. What could it be? I would like to continue using wordfence, but without this inconvenience. I appreciate the possible help from colleagues.Hello @ppsctfl I have the same situation. I′ll do the downgrade to and to see if the problem will be solved.
ThanksForum: Developing with WordPress
In reply to: Highlighted text box within the postDear Wasiur Rahman, thans for your response. But in my dasboard I don′t identiy the buttons that you mencioned. I,m using the WYSiWYG… See print, please.
Forum: Plugins
In reply to: [LiteSpeed Cache] Critical Problem WordPressHi @gmugi
The colleague above (@wp1elias) pointed this out. According to the plugin support this will be fixed with the next plugin update. So let’s wait and see the result.
See you at - Elementor conditions.