Skip to content

Commit

Permalink
allow extra options in form builder items
Browse files Browse the repository at this point in the history
  • Loading branch information
moldcraft committed Aug 8, 2016
1 parent 7ec70d5 commit 6ac5e4d
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,18 @@ public function visual_only() {
public function get_value_from_item( $value ) {
return $value;
}

/**
* Search in '/extensions/forms/{builder_type}/items/{item_type}/options/options.php'
* @return array
* @since 2.0.23
*/
final protected function get_extra_options() {
if ($extra_options = $this->locate_path( '/options/options.php', false )) {
$extra_options = fw_get_variables_from_file($extra_options, array('options' => array()));
return $extra_options['options'];
} else {
return array();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ private function get_options() {
'desc' => __( 'The users will see these instructions in the tooltip near the field', 'fw' ),
)
),
$this->get_extra_options()
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ private function get_options() {
)
)
),
$this->get_extra_options()
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ private function get_options() {
)
)
),
$this->get_extra_options()
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ private function get_options() {
'desc' => __( 'The users will see these instructions in the tooltip near the field', 'fw' ),
)
),
$this->get_extra_options()
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ private function get_options() {
'desc' => __( 'The users will see these instructions in the tooltip near the field', 'fw' ),
)
),
$this->get_extra_options()
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ private function get_options() {
)
)
),
$this->get_extra_options()
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ private function get_options() {
)
)
),
$this->get_extra_options()
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ private function get_options() {
)
)
),
$this->get_extra_options()
);
}

Expand Down

0 comments on commit 6ac5e4d

Please sign in to comment.