Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ framework version is tracked separately via the `SLASHED_*_CSS_REF` constants.

## [Unreleased]

### Changed

- Consolidated every Bricks-specific option into one tabbed **Bricks settings**
admin subpage (Element names / Options / Filter hooks), placed after Manual
CSS. Class hints moved off Plugin Settings; the standalone Filter Hooks page
was folded into a tab.
- reBEMer now always names layout containers (section / container / div / block)
after their own Bricks type. The `role` and `generic` container-naming modes,
and the `rebemer_container_mode` setting, were removed.

## [0.3.4] - 2026-06-20
## [0.3.4] - 2026-06-20
## [0.3.3] - 2026-06-20
Expand Down
32 changes: 8 additions & 24 deletions SLASHED-for-WP/includes/class-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,20 +86,16 @@ public function handle_save() {

Slashed_Settings::save( $data );

// Save plugin behavioural settings (html_font_size, show_class_hints).
// phpcs:ignore WordPress.Security.NonceVerification.Missing
// Save general plugin behaviour (html_font_size). Read-merge-write so
// Bricks-owned settings (class hints, reBEMer names) and the Manual CSS
// mode set on their own pages are never clobbered.
$allowed_font_sizes = array( '', '100', '62.5' );
// phpcs:ignore WordPress.Security.NonceVerification.Missing
$raw_font_size = isset( $_POST['html_font_size'] ) ? sanitize_text_field( wp_unslash( $_POST['html_font_size'] ) ) : '';
// phpcs:ignore WordPress.Security.NonceVerification.Missing
$raw_class_hints = isset( $_POST['show_class_hints'] );

Slashed_Token_Store::update_plugin_settings(
array(
'html_font_size' => in_array( $raw_font_size, $allowed_font_sizes, true ) ? $raw_font_size : '',
'show_class_hints' => $raw_class_hints,
)
);
$plugin_settings = Slashed_Token_Store::get_plugin_settings();
$plugin_settings['html_font_size'] = in_array( $raw_font_size, $allowed_font_sizes, true ) ? $raw_font_size : '';
Slashed_Token_Store::update_plugin_settings( $plugin_settings );

wp_safe_redirect(
add_query_arg( 'slashed_saved', '1', admin_url( 'admin.php?page=' . self::PAGE_SLUG ) )
Expand All @@ -122,9 +118,8 @@ public function render_page() {
$local_version = Slashed_Framework_Updater::get_local_version();
$local_file_ok = file_exists( SLASHED_PATH . 'dist/slashed.' . $css_bundle . '.css' );
$update_nonce = wp_create_nonce( 'slashed_framework_update' );
$plugin_settings = Slashed_Token_Store::get_plugin_settings();
$html_font_size = $plugin_settings['html_font_size'] ?? '';
$show_class_hints = ! empty( $plugin_settings['show_class_hints'] );
$plugin_settings = Slashed_Token_Store::get_plugin_settings();
$html_font_size = $plugin_settings['html_font_size'] ?? '';
?>
<style>
.slashed-bundle-grid {
Expand Down Expand Up @@ -415,17 +410,6 @@ public function render_page() {
<p class="description"><?php esc_html_e( 'Syncs SLASHED colors with the block editor palette and bridges the editor dark-mode toggle.', 'slashed' ); ?></p>
</td>
</tr>
<tr>
<th scope="row"><?php esc_html_e( 'Class hints', 'slashed' ); ?></th>
<td>
<label>
<input type="checkbox" name="show_class_hints" <?php checked( $show_class_hints ); ?>>
<?php esc_html_e( 'Show class hints in Bricks editor', 'slashed' ); ?>
<span style="display:inline-block;font-size:10px;font-weight:600;padding:1px 7px;border-radius:10px;text-transform:uppercase;letter-spacing:.04em;background:#f0f4ff;color:#2563eb;border:1px solid #bfdbfe;margin-left:4px;">Bricks</span>
</label>
<p class="description"><?php esc_html_e( 'When enabled, hovering a SLASHED class in the Bricks class manager shows a short description of what it does.', 'slashed' ); ?></p>
</td>
</tr>
</table>

<h2><?php esc_html_e( 'Site behaviour', 'slashed' ); ?></h2>
Expand Down
Loading