php – wp_dequeue_script for a Plugin

I am trying to remove a line of script in the footer of my page that a plugin is inserting on pages that I am not using the plugin at, homepage for example. I am using the below code for some reason it will still display the script. Any suggestions?

The line I need removed: <script type='text/javascript' src='https://domain.com/wp-content/plugins/jet-reviews/assets/js/lib/vue.min.js?ver=2.6.11' id='jet-vue-js'></script>

The code in my functions.php

function review_enqueue() {
    if (is_front_page()) {
       wp_dequeue_script('jet-vue-js');
    }
}
add_action('wp_dequeue_scripts', 'review_enqueue');

Error in Autoptimize Plugin – WordPress Development Stack Exchange

I am getting this error in our Autoptimize plugin.

Error: Element style not allowed as child of element noscript in this context. (Suppressing further errors from this subtree.)

Does anyone know how to fix it?

Thank you!

Sandy

9 – The “Array” plugin does not exist after saving the order type form in Commerce

After saving any order type, the following error shows:

DrupalComponentPluginExceptionPluginNotFoundException: The "Array" plugin does not exist. Valid plugin IDs for Drupalstate_machineWorkflowManager are: invoice_default, order_default, order_default_validation, order_fulfillment, order_fulfillment_validation, payment_default, payment_manual, shipment_default in DrupalCorePluginDefaultPluginManager->doGetDefinition() (line 53 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).

Any ideas?

plugin development – HTMLCollection not counting right in editor? / for loop not working on elements in DOM

I’m migrating my front-end code for a plugin to React and ESNext, and am still new to all of this, but for some reason, this really simple for loop isn’t executing on the admin edit page, but is fine when viewing the post. The only thing I can see is that there seems to be a weird issue with how HTMLCollections are counted, on the back end. I have this code:

/*
 * external dependencies
 */
import * as React from "react";
import { render } from "react-dom";

export default class App extends React.Component {
        render() {
                return (
                        <div className={"myapp-container"}>
                           // this is a test
                        </div>
                );
        }
}

document.addEventListener("DOMContentLoaded", (event) => {
        let els = document.getElementsByClassName("myapp_wrapper_class");
        console.log("got elements ", els); // this fires fine, everywhere

        for (let el of els) {
                console.log("working with ", el); // this fires on the front-end, but not in the editor
                render(<App />, document.getElementById(el.id));
        }
});

When I look at the console, on the front end, it logs

got elements 
HTMLCollection (1) // note this "1"
0 <div id="myApp1" style="width: 100%; height: 300px;" class="myapp myapp_wrapper_class" data-cwragc-src="https://localhost:8888/wp-content/uploads/2021/01/nakaza.csv" data-cwragc-type="line"></div>

but in the editor, it logs

got elements 
HTMLCollection (0) // note this "0"
0 <div id="myApp1" style="width: 100%; height: 300px;" class="myapp myapp_wrapper_class" data-cwragc-src="https://localhost:8888/wp-content/uploads/2021/01/nakaza.csv" data-cwragc-type="line"></div>

I’m unsure whether that zero is the problem, but like I said, it’s the only thing I can see that’s weird. There are no error messages in the console. I am sure that the for loop isn’t being executed on the back end, even though the element is there (as you can see in the console log), and exists in the rendered DOM.

The elements are created with a server-side render. In the block’s edit function, it looks thusly:

export function MyAppEdit( props ) {
//...
        const MyAppRender = () => {
                return(
                    <Disabled>
                        <ServerSideRender
                            block={ props.name }
                            attributes={{ ...attributes }} />
                    </Disabled>
                );
        }
//...
        return (
                <>
                        { controls }
                        <div { ...blockProps }>
                                { cwragcLocalFile && <MyAppRender /> }
                                { myAppPlaceholder }
                        </div>
                </>
        );
}
export default withNotices( MyAppEdit );

Grasping at straws, I also tried removing the <Disabled> wrapper on the editor side, but no change in effect.

Basically, I have no idea what’s going on here, but I’d like my stuff to render on the back end 🙂

Is it possibly a Babel bug? Is there some difference/timing/race issue with when DOMContentLoaded fires on the back end? Is there some better/more naturally React way for me to add a component to a div when I don’t know how many of them there will be (other than getElementsByClassName after DOMContentLoaded?

For completeness’ sake, my webpack is this:

const defaultConfig = require( '@wordpress/scripts/config/webpack.config' );
const path = require('path');

module.exports = {
    ...defaultConfig,
    entry: {
        myAppAdmin:
            path.resolve( process.cwd(), 'admin/src', 'index.js' ),
        myAppPublic:
            path.resolve( process.cwd(), 'public/src', 'index.js' ),
    },
    output: {
        filename: '(name).js',
        path: path.resolve( process.cwd(), 'assets/js' ),
    },
}

Maybe I’m missing some other require? But, like I said, it’s not generating any errors. admin/src/index.js is the block code; public/src/index.js is front-end code I’m trying to migrate, that adds React stuff after the server-side render.

woocommerce offtopic – I would like to know if there is a plugin or how to do it, so that a site on that multisite network on a specific date

I have a network of sites (multisite), where I rent a site (plans), I would like to know if there is a plugin or how to do it, so that a site on that multisite network on a specific date.

For example:

1 customer rented a website for 2 months.

I want who on the last day of these 2 months, the site goes down with a message (expiration, canceled, contact us to activate).

Can someone help me?

Add SEO meta data with PHP to pages generated by plugin? Pages are not generated as posts in WP

I am using a real estate IDX plugin (Showacse IDX) that generates pages that are not posts in my wordpress database. The poorly developed plugin does not give some of these pages meta descriptions. How can I use PHP to inject meta data into these pages?

I’ve tried getting the current page url slug but it isn’t working…

// Add SEO meta to sidx pages 
function td_add_seo_meta_sidx() {
    global $wp;
    $current_slug = add_query_arg( array(), $wp->request );

    // Page slugs that need SEO meta
    $dashboard = "properties/dashboard";
    $listings = "properties/listings";
    $searches = "properties/searches";
    
    if ($current_slug == $dashboard ){
        echo '<meta name="description" content="Dashboard SEO meta description here" />';
    }
    if ($current_slug == $listings){
        echo '<meta name="description" content="Listings SEO meta description here" />';
    }
    if ($current_slug == $searches){
        echo '<meta name="description" content="Searches SEO meta description here" />';
    }
}
add_action( 'wp_head', 'td_add_seo_meta_sidx' );

Ads Pro Plugin – Multi-Purpose WordPress Advertising Manager

Admin submitted a new resource:

Ads Pro Plugin – Multi-Purpose WordPress Advertising Manager – Ads Pro Plugin – Multi-Purpose WordPress Advertising Manager

View attachment 14983

Core Features

  • 100% Responsive
  • Geographical targeting (countries, states / provinces, cities or zip-codes)…

Read more

.(tagsToTranslate)xenforo(t)xenforo themes(t)xenforo nulled(t)xenforo free(t)xenforo 2.2(t)nulled(t)nulled script(t)whmcs(t)whmcs nulled(t)scripts(t)nulled scripts(t)vbulletin(t)vbulletin nulled(t)vbulletin 5 nulled(t)xenforo resources(t)wordpress download(t)wordpress nulled forum

is there a tab snooze plugin for Safari?

I’ve been looking around on DuckDuckGo and App Store for a Safari plugin that will let me “snooze” (similar to this Chrome plugin). Coming from Chrome, I’ve really come to rely on the ability to just set a timer and kick tabs off to the background for a period of time and then return (this also frees up memory).

So far I’ve found nothing. I’m hoping I’m just bad at searching and am missing something.