PHP Function & Class Reference
Complete reference for all custom PHP functions and classes defined in the Method parent theme.
Classes
Method_Utility
Post meta and theme options access with content filtering and formatting.
Method_CSS_Collector
Singleton that consolidates block CSS into a single style tag.
MethodBSAccordion
Programmatic Bootstrap 5 accordion generator.
Helper Functions
General‑purpose utilities used across the theme and available to child themes.
method_check_array_key()
Check if an array key exists and has a non‑empty value.
method_check_array()
Check if an array’s first element has a non‑empty value at a given key.
method_filter_content()
Run a string through WordPress’s the_content filter.
method_str_replace_assoc()
Associative string replacement.
method_get_post_array()
Get an associative array of post IDs and titles.
method_get_term_array()
Get an associative array of term IDs and names.
method_get_menus_array()
Get an associative array of navigation menu IDs and names.
method_get_hierarchical_page_options()
Get a flat array of pages with hierarchy depth indicators.
method_get_available_archives_options()
Get archive options for all public post types.
method_get_tags_badge()
Return an HTML badge indicating “Tags Supported”.
Configuration Functions
Functions that read and resolve the METHOD_OPTIONS / METHOD_CHILD_OPTIONS configuration.
method_get_block_breakpoints()
Get computed breakpoint values with units for media queries.
method_get_breakpoint_class_prefixes()
Get Bootstrap CSS class prefixes for each responsive range.
method_get_breakpoint_colors()
Get the editor UI accent colors for responsive tabs.
method_get_font_size_presets()
Get the font size presets for the FontSizePicker.
method_get_all_bs_breakpoint_options()
Get all Bootstrap breakpoints as option objects.
Social Navigation Functions
Functions for handling social media account links and generating output for the Social Nav block.
method_get_social_platforms()
Get the array of supported social media platforms with icons.
method_build_social_nav_items()
Generate HTML list items for configured social links.
method_get_options_page_social_options()
Format social platforms for CMB2 radio fields.
Block Style System
The server‑side CSS generation engine that powers Method’s responsive design system.
method_get_responsive_setting()
Safely retrieve a value from nested responsive settings.
method_get_block_responsive_styles()
Generate complete responsive CSS for a block.
method_get_block_css_declarations()
Convert block attributes to CSS declarations for a single breakpoint.
method_get_block_media_query_declarations()
Wrap CSS declarations in a selector block.
method_collect_css()
Add CSS to the consolidated style collector.
method_sanitize_theme_color()
Convert theme color slugs to hex values.
method_sanitize_flex_align()
Convert WP layout alignment values to CSS flex equivalents.
method_get_block_inline_styles()
(Deprecated) Generate an inline style attribute from WP block style attributes.