A
A
Alexander Sobolev2018-09-12 13:00:28
WordPress
Alexander Sobolev, 2018-09-12 13:00:28

How to get to the plugin's root directory?

There is a file myplugin/php_functions/function.php
From it you need to run the file myplugin/js_functions/function.js

$current_taxonomy = get_current_screen()->taxonomy;
$current_parent_file = get_current_screen()->parent_file;
if($current_taxonomy = 'estate_proprietor' and $current_parent_file = 'edit.php?post_type=estate'){
wp_register_script('estate_proprietor_fiels',  /*правильный путь*/ );
wp_enqueue_script('estate_proprietor_fiels');
    }

Confused by too much information..

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel, 2018-09-12
@san_jorich

It's easy to google. https://codex.wordpress.org/Function_Reference/plu... - first example

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question