X7ROOT File Manager
Current Path:
/home/gfecatvj/4abetter.us/wp-content/plugins/kubio/lib/filters
home
/
gfecatvj
/
4abetter.us
/
wp-content
/
plugins
/
kubio
/
lib
/
filters
/
📁
..
📄
after-kubio-activation.php
(1.84 KB)
📄
allow-kubio-blog-override.php
(355 B)
📄
cache-plugins.php
(1.05 KB)
📄
default-editor-overlay.php
(4.24 KB)
📄
dismissable-notice.php
(2.73 KB)
📄
gutenerg-plugin-check.php
(936 B)
📄
image-size-auto-fix.php
(399 B)
📄
kubio-fresh-site.php
(785 B)
📄
post-insert.php
(1.21 KB)
📄
register-meta-fields.php
(627 B)
📄
requirements-notices.php
(3.69 KB)
📄
site-urls.php
(2.18 KB)
📄
starter-sites-feature.php
(138 B)
📄
svg-kses.php
(1.18 KB)
📄
wp-import.php
(6.41 KB)
Editing: post-insert.php
<?php use Kubio\Core\Importer; use Kubio\Core\Utils; function kubio_rest_pre_insert_import_assets( $prepared_post ) { //if you make changes to the post that does not include it's content. For example featured image, template, // slug etc... . we need to stop the function or the post content will be removed if ( ! isset( $prepared_post->post_content ) ) { return $prepared_post; } $content = $prepared_post->post_content; $blocks = parse_blocks( $content ); $blocks = Importer::maybeImportBlockAssets( $blocks ); $blocks = apply_filters( 'kubio/rest-pre-save-post/import-assets', $blocks, $prepared_post ); $prepared_post->post_content = kubio_serialize_blocks( $blocks ); return $prepared_post; } function kubio_import_assets_filter() { $post_types = array( 'page', 'post', 'wp_template', 'wp_template_part' ); foreach ( $post_types as $post_type ) { add_filter( "rest_pre_insert_{$post_type}", 'kubio_rest_pre_insert_import_assets' ); } } add_action( 'init', 'kubio_import_assets_filter' ); //when in site editor mode disable import download add_filter( 'kubio/importer/skip-remote-file-import', function ( $result ) { if ( Utils::getIsAISiteEditor() ) { return true; } return $result; }, 9 );
Upload File
Create Folder