Skip to content

Commit

Permalink
condition added to taxonomy
Browse files Browse the repository at this point in the history
  • Loading branch information
rezakhan995 committed Jun 18, 2020
1 parent 6c32efc commit 2b47ea0
Showing 1 changed file with 147 additions and 0 deletions.
147 changes: 147 additions & 0 deletions devmonsta/options/taxonomies/post_tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,45 @@ public function register_controls() {
'desc' => 'use this area to input text',
'label' => __( 'First name', '{domain}' ),
] );
$this->add_control( [
'type' => 'text',
'name' => 'text_less',
'desc' => 'use this area to input text',
'label' => __( 'Condition Text Equal', '{domain}' ),
'conditions' => [
[
'control_name' => 'f_name',
'operator' => '==',
'value' => "abc",
],
],
] );
$this->add_control( [
'type' => 'text',
'name' => 'text_less',
'desc' => 'use this area to input text',
'label' => __( 'Condition Text Less', '{domain}' ),
'conditions' => [
[
'control_name' => 'f_name',
'operator' => '<',
'value' => 0,
],
],
] );
$this->add_control( [
'type' => 'text',
'name' => 'text_less',
'desc' => 'use this area to input text',
'label' => __( 'Condition Text Greater', '{domain}' ),
'conditions' => [
[
'control_name' => 'f_name',
'operator' => '>',
'value' => 0,
],
],
] );

/**
* control for url input
Expand All @@ -27,6 +66,48 @@ public function register_controls() {
'label' => __( 'Enter valid URL', '{domain}' ),
'desc' => __( 'Url Description', '{domain}' ),
] );
$this->add_control( [
'type' => 'text',
'name' => 'url_equal',
'desc' => 'use this area to input text',
'label' => __( 'Condition url Equal', '{domain}' ),
'conditions' => [
[
'control_name' => 'user_url',
'operator' => '==',
'value' => "abc",
],
],
] );
$this->add_control( [
'type' => 'text',
'name' => 'url_greater',
'value' => 'default text value',
'desc' => 'use this area to input text',
'label' => __( 'Condition url Greater', '{domain}' ),
'conditions' => [
[
'control_name' => 'user_url',
'operator' => '>',
'value' => 0,
],
],
] );
$this->add_control( [
'type' => 'text',
'name' => 'url_less',
'value' => 'default text value',
'desc' => 'use this area to input text',
'label' => __( 'Condition on Less', '{domain}' ),
'conditions' => [
[
'control_name' => 'user_url',
'operator' => '<',
'value' => 0,
],
],
] );


/**
* control for radio input
Expand All @@ -44,6 +125,26 @@ public function register_controls() {
],
'inline' => false,
] );
$this->add_control( [
'box_id' => 'post_box_2',
'type' => 'text',
'name' => 'oembed_equal',
'value' => 'default text value',
'desc' => 'use this area to input text',
'label' => __( 'Radio Condition on Equal', '{domain}' ),
'conditions' => [
[
'control_name' => 'gender',
'operator' => '==',
'value' => "choice-2",
],
[
'control_name' => 'gender',
'operator' => '==',
'value' => "choice-3",
],
],
] );

/**
* control for textarea
Expand All @@ -56,6 +157,52 @@ public function register_controls() {
'value' => 'default text area value',
'attr' => ['class' => 'custom-class', 'data-foo' => 'bar'],
] );
$this->add_control( [
'type' => 'text',
'name' => 'oembed_equal',
'value' => 'default text value',
'desc' => 'use this area to input text',
'label' => __( 'Condition on Equal', '{domain}' ),
'conditions' => [
[
'control_name' => 'txt_area',
'operator' => '==',
'value' => "abc",
],
],
] );
$this->add_control( [
'type' => 'text',
'name' => 'oembed_greater',
'value' => 'default text value',
'desc' => 'use this area to input text',
'label' => __( 'Condition on Greater', '{domain}' ),
'conditions' => [
[
'control_name' => 'txt_area',
'operator' => '>',
'value' => 0,
],
],
] );
$this->add_control( [
'type' => 'text',
'name' => 'oembed_less',
'desc' => 'use this area to input text',
'label' => __( 'Condition on Less', '{domain}' ),
'conditions' => [
[
'control_name' => 'txt_area',
'operator' => '<',
'value' => 0,
],
[
'control_name' => 'txt_area',
'operator' => '>',
'value' => 300,
],
],
] );

/**
* control for checkbox input
Expand Down

0 comments on commit 2b47ea0

Please sign in to comment.