Skip to content

Releases: pixelwatt/method

v2.0.0-beta4c

07 Jan 20:30

Choose a tag to compare

Switched block editor back to correct, 24-col bootstrap grid library

v2.0.0-beta4b

07 Jan 20:17

Choose a tag to compare

This release removes Bootstrap files for the upcoming method/navbar block (coming next beta) to prevent conflicts with themes using custom navbar blocks. These styles will be refactored prior to next beta.

v2.0.0-beta4

07 Jan 19:12

Choose a tag to compare

This update contains several bug fixes, enhancements, and new features:

  • Enhancement: Social media icons and the method/social-nav block have been reworked. Social media platforms can now be added from a child theme by using the 'method_available_social_platforms' filter (see example code below). Once added via the filter, new platforms will appear as options under the "Social Media Links" section of the Method Settings admin tab, and will render in the Social Nav block without any additional development needed. For both the frontend and block editor, markup is now rendered via the same set of php functions.
  • Enhancement: Several options have been added to the method/social-nav block to control how social media icons are displayed.
  • Enhancement: The method/theme-button block no longer shows a styles option unless custom style options have been passed via filter. Going forward, custom styles should be set via register_block_style() from a child theme instead of using the filter.
  • Enhancement: The method/theme-button block will now display options to choose an icon for display before and/or after the button label, if custom icons have been passed via the new 'method_block_theme_button_icons' filter from a child theme. If no icons have been passed, these options will simply not appear.
  • Enhancement: Additional data is now globally-injected into the block editor that contains breakpoint data for all Bootstrap breakpoints (to be used in the new Navbar block coming in beta5), prefixes for Method's four responsive ranges (mobile, tablet, base, wide), and internal markup for the method/social-nav block (no longer rendered by the block itself, markup can now be used in other blocks)
  • Enhancement: Column offsets can now be added to method/advanced-grid-col blocks and customized for mobile, tablet, and wide devices.
  • Enhancement: method/advanced-grid-col blocks in the same method/advanced-grid-row block can now be reordered for mobile, tablet, and wide devices via a new setting in the block's Responsive Settings.
  • Enhancement: Column width and offset classes generated for each method/advanced-grid-col block now use the breakpoints specified in METHOD_OPTIONS or METHOD_CHILD_OPTIONS, making it possible to easily change which breakpoint corresponds to each responsive range (for example, changing METHOD_CHILD_OPTIONS['breakpoints']['base'] to 'lg' would change all columns to include col-lg-* and offset-lg-* classes instead of the default 'xl' classes). This change makes it possible to easily change which breakpoints are used for each responsive range quickly, only requiting edits to a few lines of the child theme's config.php file.
  • Fix: In situations where mobile overrides have been set for a method/advanced-grid-col block, but not for tablet, tablets will no longer inherit column widths set for mobile
  • Fix: Removed unused code from lib/theme-setup.php
  • Fix: Block editor styles are now registered via add_editor_style() to prevent styles from impacting block editor UI (this approach limits styles to only impacting the content iframe of the block editor)
  • Fix: A new css file, editorui.css, was added to house styles meant to impact the block editor UI. This file is enqueued via the method_block_assets() function and only targets admin.
  • Fix: Minified assets are now enqueued wherever possible (was previously using unminified versions)
  • Fix: A new gulp task, compile-editorui-styles, was added to compile the new editorui.css file
  • Fix: Editor UI styles have been removed from global styles (moved to editorui styles)
  • Enhancement: global styles updated to contain new styles for the reworked method/social-nav block and upcoming method/navbar block
  • Enhancement: Updated css generation functions/components to support flex-direction (flexDirection), justify-content (justifyContent), order, and equalDimensions (using one dimensions key to set both width and height)
  • Fix: Updated method_get_block_media_query_declarations() to not return empty CSS declarations.
  • Enhancement: Updated the MethodAlignmentControls component to be usable in the MethodResponsiveTabs component, with a checkbox appearing to opt-in if rendering settings for mobile, tablet, or wide.
  • Fix: The php callback function that renders method/container blocks now only generate css for left and right margins if those margins are more than 0
  • Enhancement: Added initial code for method/navbar, but the block will not be included in the block editor until the next beta (though it can be enabled by commenting out line 113 of lib/blocks.php)

Example: Adding GitLab as an available social media platform for social media links and method/social-nav:

function method_child_additional_social_platforms( $platforms ) {
    $platforms['gitlab'] = array(
        'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-gitlab" viewBox="0 0 16 16"><path d="m15.734 6.1-.022-.058L13.534.358a.57.57 0 0 0-.563-.356.6.6 0 0 0-.328.122.6.6 0 0 0-.193.294l-1.47 4.499H5.025l-1.47-4.5A.572.572 0 0 0 2.47.358L.289 6.04l-.022.057A4.044 4.044 0 0 0 1.61 10.77l.007.006.02.014 3.318 2.485 1.64 1.242 1 .755a.67.67 0 0 0 .814 0l1-.755 1.64-1.242 3.338-2.5.009-.007a4.05 4.05 0 0 0 1.34-4.668Z"/></svg>',
        'label' => 'GitLab',
    );
    return $platforms;
}

add_filter( 'method_available_social_platforms', 'method_child_additional_social_platforms', 10, 1 );

Example: Adding an icon for use with method/theme-button

function method_child_theme_button_icons( $styles ) {
    $theme_icons = array(
        '' => array(
            'svg' => '',
            'label' => 'None',
        ),
        'arrow-right' => array(
            'svg' => '<svg width="9" height="16" viewBox="0 0 9 16" fill="none" xmlns="http://www.w3.org/2000/svg"><g><path d="M1.59262 15.7291L8.72651 8.65609C9.09085 8.29471 9.09123 7.70896 8.72651 7.34757L1.59603 0.271181C1.23169 -0.0902054 0.641156 -0.0905818 0.276814 0.271181C-0.0875274 0.632567 -0.0879069 1.21831 0.276814 1.5797L6.74843 8.00146L0.273399 14.4202C-0.0909431 14.7816 -0.0913226 15.3673 0.273399 15.7287C0.63774 16.0901 1.22828 16.0905 1.59262 15.7287V15.7291Z" fill="currentColor"/></g></svg>',
            'label' => 'Arrow (Right)',
        ),
    );
    return $theme_icons;
}
add_filter( 'method_block_theme_button_icons', 'method_child_theme_button_icons', 10, 1 );

Example: Setting custom button styles for method/theme-button

$btn_styles = array(
    array('name' => 'enclosed', 'label' => 'Enclosed'),
    array('name' => 'icon-only', 'label' => 'Icon Only'),
);

foreach ($btn_styles as $style) {
    register_block_style('method/theme-button', $style);
}

v2.0.0-beta3

28 Dec 05:37

Choose a tag to compare

Changes:

  • Fixed an issue where linked Button, Fitted Image, and Container blocks with a link set and the "Open in new tab" box checked did not open in a new tab.
  • Fixed frontend css generation for Advanced Grid column blocks by correcting the selectors passed to method_get_block_responsive_styles()
  • Removed the mytheme_editor_styles() function, as it was attempting to enqueue an asset (editor-style.css) that was removed in v2.0.0-beta2
  • Modified Bootstrap's _breakpoints.scss file to output additional styles that target the mobile and tablet previews in the block editor. This file will eventually be moved into an isolated directory, alongside the few other Bootstrap files being used, and the full scss library will be removed.

v2.0.0-beta2

22 Dec 03:39

Choose a tag to compare

Updated readme and removed unused files.

v2.0.0-beta1

22 Dec 02:47

Choose a tag to compare

This release adds support for the new method-child theme, removes theme specific files, adds support for overriding the default config options defined in lib/config.php, and implements a new Method Settings page.

v2.0.0-alpha5

15 Dec 19:54

Choose a tag to compare

v2.0.0-alpha5 Pre-release
Pre-release
  • ( lib/class-method-css-collector.php ) Added a new php class, Method_CSS_Collector, to collect all block CSS and output in a single, minified style tag
  • ( lib/blocks.php ) Added an argument to method_get_block_responsive_styles() that, when set to false, does not wrap output in style tags
  • Implemented Method_CSS_Collector (via method_collect_css() function) into Section, Fitted Image, Container, Button, Basic Grid, and Advanced Grid render callbacks.
  • Removed previous, unused grid block implementations from the theme.

v2.0.0-alpha4

15 Dec 12:22

Choose a tag to compare

v2.0.0-alpha4 Pre-release
Pre-release

This is an early release of Method v2. At this stage, several features are still being implemented and the theme is actively being refactored to account for the recent decision to adopt a parent/child theme workflow. If using, thoroughly read through future release notes before updating, as several things will be removed and reorganized over the next few alpha releases.

Full Changelog: v1.4.4-prerelease...v2.0.0-alpha4

v1.4.4-prerelease

14 Feb 21:58
v1.4.4-prerelease
8270153

Choose a tag to compare

v1.4.4-prerelease Pre-release
Pre-release

Changes:

  • Added an early implementation of the new add_script() method to the Method layout class. This method allows for different blocks of js to be built out progressively over a page's buildout.
  • method_get_class() now has an argument for specifying whether output should be echoed or returned (default: $echo = false, meaning output is returned)
  • method_get_post_array() now accepts an array of post types, and a new $label argument was added (default: false). If set to true, the singular post type name for each post is displayed in parentheses after the post title.

v1.4.3

29 Nov 20:26
v1.4.3
7b9c8a4

Choose a tag to compare

v1.4.3 changes

  • Updated Bootstrap Icons to v1.11.2
  • FIX: Added missing str_replace_assoc() method to the Method_Utility class
  • Added ability to pass custom option key for social accounts being pulled (to support multiple groups of social accounts when needed),
  • Added Threads social icon support
  • Added Bluesky social icon support (using square-fill BS icon)
  • Updated Twitter icon to be the new X icon.
  • Added function to theme-setup.php for conditionally enabling the block editor (commented out by default)
  • Added function to theme-setup.php for conditionally enabling or disabling WordPress features (such as the built in editor or featured image) (commented out by default)