/
AdminPageFramework_Factory___Script_Base.php
37 lines (36 loc) · 1.56 KB
/
AdminPageFramework_Factory___Script_Base.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/**
Admin Page Framework v3.8.30b02 by Michael Uno
Generated by PHP Class Files Script Generator <https://github.com/michaeluno/PHP-Class-Files-Script-Generator>
<http://en.michaeluno.jp/admin-page-framework>
Copyright (c) 2013-2021, Michael Uno; Licensed under MIT <http://opensource.org/licenses/MIT> */
abstract class AdminPageFramework_Factory___Script_Base extends AdminPageFramework_FrameworkUtility {
public $oMsg;
public function __construct($oMsg = null) {
if ($this->hasBeenCalled(get_class($this))) {
return;
}
$this->oMsg = $oMsg ? $oMsg : AdminPageFramework_Message::getInstance();
$this->registerAction('customize_controls_print_footer_scripts', array($this, '_replyToPrintScript'));
$this->registerAction('admin_print_footer_scripts', array($this, '_replyToPrintScript'));
$this->registerAction('wp_print_footer_scripts', array($this, '_replyToPrintScript'));
$this->construct();
add_action('wp_enqueue_scripts', array($this, 'load'));
}
public function construct() {
}
public function load() {
}
public function _replyToPrintScript() {
$_sScript = $this->getScript($this->oMsg);
if (!$_sScript) {
return;
}
echo "<script type='text/javascript' class='" . strtolower(get_class($this)) . "'>" . '/* <![CDATA[ */' . $_sScript . '/* ]]> */' . "</script>";
}
static public function getScript() {
$_aParams = func_get_args() + array(null);
$_oMsg = $_aParams[0];
return "";
}
}