function register_scripts() { global $wp_scripts; wp_register_script('jquery-frm-rating', FRMPRO_URL . '/js/jquery.rating.min.js', array('jquery'), '3.13', true); wp_register_script('jquery-star-metadata', FRMPRO_URL . '/js/jquery.MetaData.js', array('jquery'), '', true); wp_register_script('jquery-maskedinput', FRMPRO_URL . '/js/jquery.maskedinput.min.js', array('jquery'), '1.3', true); wp_register_script('nicedit', FRMPRO_URL . '/js/nicedit.js', array(), '', true); wp_register_script('jquery-frmtimepicker', FRMPRO_URL . '/js/jquery.timePicker.min.js', array('jquery'), '0.3', true); //jquery-ui-datepicker registered in WP 3.3 if (!isset($wp_scripts->registered) or !isset($wp_scripts->registered['jquery-ui-datepicker'])) { $date_ver = FrmProAppHelper::datepicker_version(); wp_register_script('jquery-ui-datepicker', FRMPRO_URL . '/js/jquery.ui.datepicker' . $date_ver . '.js', array('jquery', 'jquery-ui-core'), empty($date_ver) ? '1.8.16' : trim($date_ver, '.'), true); } }
public static function register_scripts() { global $wp_scripts, $frmpro_settings, $frm_settings; wp_register_script('jquery-frm-rating', FrmAppHelper::plugin_url() . '/pro/js/jquery.rating.min.js', array('jquery'), '4.11', true); wp_register_script('jquery-maskedinput', FrmAppHelper::plugin_url() . '/pro/js/jquery.maskedinput.min.js', array('jquery'), '1.3', true); wp_register_script('nicedit', FrmAppHelper::plugin_url() . '/pro/js/nicedit.js', array(), '1', true); if ($frmpro_settings->theme_css != -1) { wp_register_style('jquery-theme', FrmProAppHelper::jquery_css_url($frmpro_settings->theme_css), array(), FrmAppHelper::plugin_version()); } wp_register_script('jquery-chosen', FrmAppHelper::plugin_url() . '/pro/js/chosen.jquery.min.js', array('jquery'), '1.1.0', true); //jquery-ui-datepicker registered in WP 3.3 if (!isset($wp_scripts->registered) or !isset($wp_scripts->registered['jquery-ui-datepicker'])) { $date_ver = FrmProAppHelper::datepicker_version(); wp_register_script('jquery-ui-datepicker', FrmAppHelper::plugin_url() . '/pro/js/jquery.ui.datepicker' . $date_ver . '.js', array('jquery', 'jquery-ui-core'), empty($date_ver) ? '1.8.16' : trim($date_ver, '.'), true); } if ($frm_settings->accordion_js and (!isset($wp_scripts->registered) or !isset($wp_scripts->registered['jquery-ui-accordion']))) { wp_register_script('jquery-ui-accordion', FrmAppHelper::plugin_url() . '/pro/js/jquery.ui.accordion.js', array('jquery', 'jquery-ui-core'), '1.8.16', true); } }