C:\xampp\htdocs\landing\wp-content\plugins\contact-form-7\includes\block-editor\block-editor.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php

add_action
'init''wpcf7_init_block_editor_assets'10);

function 
wpcf7_init_block_editor_assets() {
    
$assets = array();

    
$asset_file wpcf7_plugin_path(
        
'includes/block-editor/index.asset.php'
    
);

    if ( 
file_exists$asset_file ) ) {
        
$assets = include( $asset_file );
    }

    
$assets wp_parse_args$assets, array(
        
'src' => wpcf7_plugin_url'includes/block-editor/index.js' ),
        
'dependencies' => array(
            
'wp-api-fetch',
            
'wp-components',
            
'wp-compose',
            
'wp-blocks',
            
'wp-element',
            
'wp-i18n',
        ),
        
'version' => WPCF7_VERSION,
    ) );

    
wp_register_script(
        
'contact-form-7-block-editor',
        
$assets['src'],
        
$assets['dependencies'],
        
$assets['version']
    );

    
wp_set_script_translations(
        
'contact-form-7-block-editor',
        
'contact-form-7'
    
);

    
register_block_type(
        
'contact-form-7/contact-form-selector',
        array(
            
'editor_script' => 'contact-form-7-block-editor',
        )
    );
}
x

Windows NT KPTV 6.2 build 9200 (Windows Server 2012 Datacenter Edition) i586