M
M
Mikhail Lebedev2021-08-23 19:31:01
JavaScript
Mikhail Lebedev, 2021-08-23 19:31:01

Replace text in WordPress admin?

How to replace the text that the plugin adds to the WordPress admin panel when creating a product on Wookomers? (multisite)

trying with mu-plugin

add_action( 'wp_footer',
    function() {
        ?>
<script ENGINE="text/javascript">
document.body.innerHTML = document.body.innerHTML.replace('Текст который нужно заменить', 'Новый текст');
</script>
        <?php
    }
);


the text on the site changes like this, but there is silence in the admin panel ((
6123cd2a41f95122510504.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladik Bubin, 2021-08-23
@ikoit

Create a hook in functions that will change the given text before generating the content. To find the element you selected in the screenshot, use the search or plugin documentation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question