Skip to content
Snippets Groups Projects
Commit 5e011feb authored by Piotr Potrebka's avatar Piotr Potrebka
Browse files

fix: script version, docs

parent 0ce715a4
No related branches found
No related tags found
1 merge request!33feat: plugin path, lang, scripts version
Pipeline #138983 passed
## [2.1.0] - 2022-11-07
## [2.1.0] - 2022-12-15
### Added
- plugin path
- plugin lang
......
......@@ -171,9 +171,11 @@ abstract class AbstractPlugin extends SlimPlugin {
/**
* Append JS scripts in the WordPress admin panel. This is a hook function. Do not execute directly.
*
* @param string $hook_suffix The current admin page passed from WordPress filter.
*
* @return void
*/
public function admin_enqueue_scripts( $hook = '' ) {
public function admin_enqueue_scripts( $hook_suffix = '' ) {
}
/**
......@@ -186,16 +188,18 @@ abstract class AbstractPlugin extends SlimPlugin {
/**
* @param string $prefix
* @param bool $random
*
* @return int|string
* @return string
*/
public function get_scripts_version( $prefix = '', $random = false ) {
if ( $random ) {
return time();
public function get_scripts_version( $prefix = '' ) {
return $prefix . $this->plugin_info->get_version();
}
return $prefix . $this->plugin_info->get_version();
/**
* @return int
*/
public function get_random_script_version() {
return time();
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment