Skip to content

Commit

Permalink
added URL control content placement fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
nk-o committed Oct 7, 2024
1 parent e20c3b1 commit 8f415b9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions assets/components/render-controls/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ export default class RenderControls extends Component {
placementCheck =
controlTypeData.restrictions.placement_settings.indexOf(
placement
) > -1 ||
controlTypeData.restrictions.placement_settings.indexOf(
`${placement}-fallback`
) > -1;
}

Expand Down
2 changes: 1 addition & 1 deletion controls/_base/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class LazyBlocks_Control {
'label_settings' => true,
'default_settings' => true,
'help_settings' => true,
'placement_settings' => array( 'content', 'inspector' ),
'placement_settings' => array( 'content', 'inspector' /* , 'content-fallback', 'inspector-fallback' */ ),
'width_settings' => true,
'required_settings' => true,
'hide_if_not_selected_settings' => true,
Expand Down
2 changes: 1 addition & 1 deletion controls/url/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function __construct() {
$this->type = 'string';
$this->label = __( 'URL', 'lazy-blocks' );
$this->restrictions = array(
'placement_settings' => array( 'inspector' ),
'placement_settings' => array( 'content-fallback', 'inspector' ),
'translate_settings' => true,
);

Expand Down

0 comments on commit 8f415b9

Please sign in to comment.