array(), 'br' => array(), 'strong' => array(), ) ); } } Pattern_Library::ensure_editable_library(); $family_groups = Wrap_Capability_Registry::family_groups(); $request_url = 'https://4wp.dev/plugin/4wp-drive/'; $rules_by_slug = array(); foreach ( Pattern_Library::get_for_rest()['rules'] as $rule ) { if ( ! is_array( $rule ) ) { continue; } $slug = sanitize_key( (string) ( $rule['preset_slug'] ?? '' ) ); if ( '' === $slug ) { $slug = sanitize_key( (string) ( $rule['template'] ?? '' ) ); } if ( '' !== $slug ) { $rules_by_slug[ $slug ] = $rule; } } $core_map = array( array( 'in' => __( 'Heading', '4wp-drive' ), 'doc' => __( 'Heading 1–6 styles', '4wp-drive' ), 'md' => '# … ######', 'out' => __( 'Heading', '4wp-drive' ), ), array( 'in' => __( 'Paragraph', '4wp-drive' ), 'same' => __( 'Normal text', '4wp-drive' ), 'out' => __( 'Paragraph', '4wp-drive' ), ), array( 'in' => __( 'List', '4wp-drive' ), 'doc' => __( 'Bulleted or numbered list', '4wp-drive' ), 'md' => '- / 1.', 'out' => __( 'List', '4wp-drive' ), ), array( 'in' => __( 'Table', '4wp-drive' ), 'doc' => __( 'Insert table', '4wp-drive' ), 'md' => __( 'Pipe table', '4wp-drive' ) . ' | Col | Col |', 'out' => __( 'Table', '4wp-drive' ), ), array( 'in' => __( 'Quote', '4wp-drive' ), 'doc' => __( 'Quote style', '4wp-drive' ), 'md' => '>', 'out' => __( 'Quote', '4wp-drive' ), ), array( 'in' => __( 'Insert image', '4wp-drive' ), 'doc' => '[image:hero.png left|right|center]', 'md' => '![alt](hero.png)
[image:hero.png left]', 'out' => __( 'Image', '4wp-drive' ), 'more' => 'images', ), array( 'in' => __( 'Code block', '4wp-drive' ), 'doc' => __( 'Courier New or Consolas, consecutive lines', '4wp-drive' ), 'md' => '```php … ```', 'out' => __( 'Code', '4wp-drive' ), 'more' => 'code', ), array( 'in' => __( 'Inline code', '4wp-drive' ), 'doc' => __( 'Courier New on the word', '4wp-drive' ), 'md' => '`save_post`', 'out' => __( 'Code', '4wp-drive' ), ), array( 'in' => __( 'Bold, italic, underline', '4wp-drive' ), 'same' => __( 'The same formatting', '4wp-drive' ), 'out' => __( 'The same formatting', '4wp-drive' ), ), array( 'in' => __( 'Horizontal line', '4wp-drive' ), 'doc' => __( 'Insert → Horizontal line', '4wp-drive' ), 'md' => '---', 'out' => __( 'Separator', '4wp-drive' ), ), ); $family_wrap_count = 0; $family_enabled_count = 0; $family_active_count = 0; foreach ( $family_groups as $group ) { if ( ! empty( $group['active'] ) ) { ++$family_active_count; } foreach ( $group['items'] as $item ) { ++$family_wrap_count; $cap_id = sanitize_key( (string) ( $item['id'] ?? '' ) ); $rule = $rules_by_slug[ $cap_id ] ?? array(); if ( ! empty( $rule['enabled'] ) ) { ++$family_enabled_count; } } } $current_tab = isset( $_GET['tab'] ) ? sanitize_key( wp_unslash( (string) $_GET['tab'] ) ) : 'overview'; if ( ! in_array( $current_tab, array( 'overview', 'core', 'integrations', 'custom' ), true ) ) { $current_tab = 'overview'; } $patterns_base = admin_url( 'admin.php?page=forwp-drive-patterns' ); $tab_url = static function ( string $tab ) use ( $patterns_base ): string { return add_query_arg( 'tab', $tab, $patterns_base ); }; $front_matter_sample = ( new Template_Config() )->build_sample_document(); $front_matter_url = admin_url( 'admin.php?page=forwp-drive-settings&tab=documentation#forwp-drive-document-template' ); ?>

__( 'Overview', '4wp-drive' ), 'core' => __( 'Core Block', '4wp-drive' ), 'integrations' => __( 'Integrations Plugins', '4wp-drive' ), 'custom' => __( 'Custom Blocks', '4wp-drive' ), ); foreach ( $tabs as $tab_id => $tab_label ) : $active = $current_tab === $tab_id; ?> >
>

  • — —

>

—

[image:hero.png]
[image:diagram.jpg left]

—

![Hero](hero.png)
[image:diagram.jpg left]

—

—

```php
add_filter( 'cron_schedules', function( $schedules ) {
	return $schedules;
} );
```

>

>

>