onSplit not create my custom block

In my case, the block split now but it will create a new “core/paragraph” instead of my “studio-wai/paragraph” <RichText identifier=”content” tagName={BlockTag} {…blockProps} value={content} onChange={(newContent) => setAttributes({ content: newContent })} onMerge={mergeBlocks} onReplace={onReplace} onRemove={onRemove} placeholder={placeholder || __(‘Type / to choose a block’)} data-custom-placeholder={placeholder ? true : undefined} /> I created some console.log in the use-enter.js /** * … Read more

Re-use date format on different template

Apologies for the off-topic question. I found the answer on StackOverflow, it’s a PHP question not specific to WordPress. The following code changes the format as required. From https://stackoverflow.com/questions/2487921/convert-a-date-format-in-php <?php $new_checkin = date(‘jS F Y’, strtotime($checkin)); ?> <?php echo esc_html( $new_checkin ); ?>

Error 503 Service Unavailable and wp-json/tdw/save_css

It appears to be an attempt to use a known vulnerability in the tagDiv Composer plugin (used in a couple of tagDiv themes. Read the linked article for more details. Note: If you think your WordPress site has been hacked, start here: https://wordpress.org/documentation/article/faq-my-site-was-hacked/ If you’re using the tagDiv plugin or theme, make sure it’s all … Read more

Elementor wp_register_script showing file when i not use ‘wp_enqueue_script’

When using wp_register_script(), the script is only registered but not enqueued, meaning it should not be loaded on the frontend unless explicitly enqueued with wp_enqueue_script(). public function frontend_scripts(): void { wp_register_script( ‘swiper-slider-script’, plugin_dir_url(__FILE__) . ‘assets/lib/js/swiper/swiper-bundle.min.js’, [], ‘1.0.0’, true ); // Enqueue script only when necessary if (is_page(‘your-page-slug’)) { wp_enqueue_script(‘swiper-slider-script’); } } add_action(‘elementor/frontend/after_register_scripts’, [$this, ‘frontend_scripts’]);

refresh media library item

I just solve this using this: // Ensure wp.media.frame exists before modifying if (wp.media && wp.media.frame) { var library = wp.media.frame.state().get(‘library’); // Set custom filter (your_key) and refresh media items library.props.set({ your_key: selectedValue }); } And create custom WordPress pre_get_posts like this: public function pre_get_posts_filter( $query ) { $request_data = isset( $_REQUEST[ ‘query’ ] ) … Read more

Is SSL connection of plugins default?

No, this is not something that can be guaranteed, setting up an SSL certificate on your own site and using https: for everything does not guarantee that code that calls to other sites will use https or TLS/SSL. Assuming those remote services even support HTTPS or speak HTTP. Your SSL certificate is for securing inbound … Read more