• Resolved girl_number_5

    (@trutherone)


    hi,
    Is it possibe to override:
    .../public_html\wp-content\plugins\wp24-domain-check\assets\js\domaincheck.js

    Im using :
    wp_dequeue_script()
    wp_enqueue_script()

    to override with my own version of this file but the text domain that you specify in the functions header is not found, wp_dequeue_script( ‘wp24-domaincheck’ );

    is there any way to override this? im just trying to change the results table background colour based on whether result is ‘Available’ or ‘Registered’. I can achieve this by modifying the original script file but by override version is not happening Since the text domain is non existent.

    thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author WP24

    (@wp24dotorg)

    The text domain is only ‘domaincheck’ and you also need to deregister the script
    wp_deregister_script( 'domaincheck' );

    Since overriding the script could lead to problems when updates are released, i could simply provide an update with css classes. Then you would only need to create some custom css and no overriding is necessary.

    Thread Starter girl_number_5

    (@trutherone)

    Thanks for the reply,
    Tried, wp_dequeue_script() AND wp_deregister_script() and still cant override. Im doing this properly using a child-theme function.php file – Are you sure that the textdomain is ‘domaincheck’

    Ill wait for your update – its easier to achieve with css like the colouring of the ‘available’, ‘taken’ text strings.

    I’ve achieved what i want to do in the parent file by styling the .table element background-color but as we know itll all be overwritten after a plugin update.

    Cheers

    Plugin Author WP24

    (@wp24dotorg)

    I removed the script in the functions.php of the theme like this:

    function remove_scripts() {
    	wp_dequeue_script( 'domaincheck' );
        wp_deregister_script( 'domaincheck' );
    }
    add_action( 'wp_print_scripts', 'remove_scripts' );

    An update of the script is now released, you could style the result table depending on the status.
    For the complete row use:

    .wp24-dc .table-row.registered {
    	background-color: #ff0000;
    }

    For each column use:

    .wp24-dc .table-row.available div:first-child {
    	background-color: #00ff00;
    }
    .wp24-dc .table-row.available div:nth-child(2) {
    	background-color: #00ffff;
    }

    Status could be: error, invalid, limit, whoisserver, registered, available

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘text domain missing’ is closed to new replies.