function __construct() { $eol = "\n"; $link = wp_login_url() . '?TB_iframe=true&width=800&height=600&sandbox=""'; parent::__construct('admin', 'js', false, 'toplevel_page_clp-settings', true); parent::$admin_scripts .= $eol . 'jQuery(document).ready(function(){jQuery(\'#prev\').attr(\'href\', \'' . $link . '\');});' . $eol; }
function __construct($place = 'wp', $type = 'css', $media = false, $hooks = false, $inline = false, $priority = false, $args = false) { self::$media = $media ? $media : 'all'; self::$type = $type; if (false === $hooks) { $hooks = array(); } if (!is_array($hooks)) { $hooks = (array) $hooks; } self::$hooks = array_merge(self::$hooks, $hooks); if (true === $inline) { add_action($place . '_head', array($this, 'print_' . $place . '_inline_' . $type), $priority); } else { add_action('init', array($this, 'add_rewrite')); add_action('template_redirect', array($this, 'file_template')); add_action($place . '_enqueue_scripts', array($this, $place . '_enqueue_' . $type), $priority); } }