function gllr_admin_head()
 {
     global $wp_version, $gllr_plugin_info, $post_type, $pagenow;
     wp_enqueue_style('gllr_stylesheet', plugins_url('css/style.css', __FILE__));
     wp_enqueue_script('jquery');
     if (isset($_GET['page']) && "gallery-plugin.php" == $_GET['page']) {
         wp_enqueue_style('wp-color-picker');
         wp_enqueue_script('gllr_script', plugins_url('js/script.js', __FILE__), array('jquery', 'wp-color-picker'));
         wp_localize_script('gllr_script', 'gllr_vars', array('gllr_nonce' => wp_create_nonce(plugin_basename(__FILE__), 'gllr_ajax_nonce_field'), 'update_img_message' => __('Updating images...', 'gallery-plugin'), 'not_found_img_info' => __('No image found.', 'gallery-plugin'), 'img_success' => __('All images are updated.', 'gallery-plugin'), 'img_error' => __('Error.', 'gallery-plugin')));
         if (isset($_GET['action']) && 'custom_code' == $_GET['action']) {
             bws_plugins_include_codemirror();
         }
     } else {
         if (isset($_GET['action']) && $_GET['action'] == 'edit' && get_post_type(get_the_ID()) == 'gallery' || isset($pagenow) && $pagenow == 'post-new.php' && isset($_GET['post_type']) && $_GET['post_type'] == 'gallery') {
             wp_enqueue_script('jquery-ui-sortable');
             wp_enqueue_script('gllr_script', plugins_url('js/script.js', __FILE__), array('jquery'));
             wp_localize_script('gllr_script', 'gllr_vars', array('gllr_nonce' => wp_create_nonce(plugin_basename(__FILE__), 'gllr_ajax_nonce_field'), 'gllr_add_nonce' => wp_create_nonce(plugin_basename(__FILE__), 'gllr_ajax_add_nonce'), 'warnBulkDelete' => __("You are about to delete these items from this gallery.\n 'Cancel' to stop, 'OK' to delete.", 'gallery-plugin'), 'confirm_update_gallery' => __("Switching to another mode, all unsaved data will be lost. Save data before switching?", 'gallery-plugin'), 'wp_media_title' => __('Insert Media', 'gallery-plugin'), 'wp_media_button' => __('Insert', 'gallery-plugin')));
         }
     }
     if (isset($post_type) && 'gallery' == $post_type) {
         if (!function_exists('bws_add_tooltip_in_admin')) {
             require_once dirname(__FILE__) . '/bws_menu/bws_include.php';
         }
         if (!function_exists('get_plugins')) {
             require_once ABSPATH . 'wp-admin/includes/plugin.php';
         }
         $all_plugins = get_plugins();
         $learn_more = str_replace(' ', '&nbsp', __('Learn more', 'gallery-plugin'));
         /* tooltip for gallery categories */
         if (isset($all_plugins['gallery-categories/gallery-categories.php']) || isset($all_plugins['gallery-categories-pro/gallery-categories-pro.php'])) {
             /* if gallery categories is installed */
             $link = "plugins.php";
             $text = __('Activate', 'gallery-plugin');
         } else {
             if (function_exists('is_multisite')) {
                 $link = !is_multisite() ? admin_url('/') : network_admin_url('/');
             } else {
                 $link = admin_url('/');
             }
             $link = $link . 'plugin-install.php?tab=search&type=term&s=Gallery+Categories+BestWebSoft&plugin-search-input=Search+Plugins';
             $text = __('Install now', 'gallery-plugin');
         }
         $tooltip_args = array('tooltip_id' => 'gllr_install_gallery_categories_tooltip', 'css_selector' => '.gllr_ad_block #gallery_categories-add-toggle', 'actions' => array('click' => true, 'onload' => true), 'content' => '<h3>' . __('Add multiple gallery categories', 'gallery-plugin') . '</h3><p>' . __("Install Gallery Categories plugin to add unlimited number of categories.", 'gallery-plugin') . ' <a href="http://bestwebsoft.com/products/gallery-categories/?k=bb17b69bfb50827f3e2a9b3a75978760&pn=79&v=' . $gllr_plugin_info["Version"] . '&wp_v=' . $wp_version . '" target="_blank">' . $learn_more . '</a></p>', 'buttons' => array(array('type' => 'link', 'link' => $link, 'text' => $text), 'close' => array('type' => 'dismiss', 'text' => __('Close', 'gallery-plugin'))), 'position' => array('edge' => is_rtl() ? 'left' : 'right'));
         if (4.0 > $wp_version && 3.8 < $wp_version) {
             $tooltip_args['position']['edge'] = 'top';
         }
         bws_add_tooltip_in_admin($tooltip_args);
     }
 }
 function cntctfrm_admin_head()
 {
     if (isset($_REQUEST['page']) && 'contact_form.php' == $_REQUEST['page']) {
         global $wp_version, $cntctfrm_plugin_info;
         wp_enqueue_style('cntctfrm_stylesheet', plugins_url('css/style.css', __FILE__), false, $cntctfrm_plugin_info["Version"]);
         if (isset($_GET['action']) && 'appearance' == $_GET['action']) {
             wp_enqueue_style('cntctfrm_form_style', plugins_url('css/form_style.css', __FILE__), false, $cntctfrm_plugin_info["Version"]);
         }
         $script_vars = array('cntctfrm_nonce' => wp_create_nonce(plugin_basename(__FILE__), 'cntctfrm_ajax_nonce_field'), 'cntctfrm_confirm_text' => __('Are you sure that you want to delete this language data?', 'contact-form-plugin'));
         if (wp_is_mobile()) {
             wp_enqueue_script('jquery-touch-punch');
         }
         wp_enqueue_script('cntctfrm_script', plugins_url('js/script.js', __FILE__), array('jquery', 'jquery-ui-sortable'));
         wp_localize_script('cntctfrm_script', 'cntctfrm_ajax', $script_vars);
         if (isset($_GET['action']) && 'custom_code' == $_GET['action']) {
             bws_plugins_include_codemirror();
         }
         require_once dirname(__FILE__) . '/bws_menu/bws_include.php';
         $tooltip_args = array('tooltip_id' => 'cntctfrm_install_multi_tooltip', 'css_selector' => '#cntctfrm_show_multi_notice', 'actions' => array('click' => true, 'onload' => true), 'content' => '<h3>' . __('Add multiple forms', 'contact-form-plugin') . '</h3>' . '<p>' . __('Install Contact Form Multi plugin to create unlimited number of contact forms.', 'contact-form-plugin') . '</p>', 'buttons' => array(array('type' => 'link', 'link' => 'http://bestwebsoft.com/products/contact-form-multi/?k=747ca825fb44711e2d24e40697747bc6&pn=77&v=' . $cntctfrm_plugin_info["Version"] . '&wp_v=' . $wp_version, 'text' => __('Learn more', 'contact-form-plugin')), 'close' => array('type' => 'dismiss', 'text' => __('Close', 'contact-form-plugin'))), 'position' => array('edge' => 'top', 'align' => is_rtl() ? 'right' : 'left'));
         bws_add_tooltip_in_admin($tooltip_args);
     }
 }
 function mltlngg_script_style()
 {
     global $hook_suffix;
     wp_enqueue_style('mltlngg_stylesheet', plugins_url('css/style.css', __FILE__));
     if (is_admin()) {
         wp_enqueue_script('mltlngg_script', plugins_url('js/script.js', __FILE__), array('jquery'));
         wp_localize_script('mltlngg_script', 'mltlngg_vars', array('update_post_error' => __('Attention!!! The changes will not be saved because Title and Content fields are empty on the current tab! It is recommended to fill in at least one field or switch to the tab with the fields that are already filled.', 'multilanguage')));
         if ('nav-menus.php' == $hook_suffix) {
             wp_enqueue_script('mltlngg_nav_menu', plugins_url('js/nav-menu.js', __FILE__), array('jquery'));
             $items = get_posts(array('numberposts' => -1, 'nopaging' => true, 'post_type' => 'nav_menu_item', 'fields' => 'ids', 'meta_key' => '_mltlngg_menu_item'));
             /* the options values for the language switcher */
             $data['value'] = array();
             foreach ($items as $item) {
                 $data['value'][$item] = get_post_meta($item, '_mltlngg_menu_item', true);
             }
             $data['switcher'] = array('input' => array('drop-down-list' => __('Drop-down languages list', 'multilanguage'), 'drop-down-icons' => __('Drop-down flag icons', 'multilanguage')));
             $data['title'] = __('Multilanguage switcher', 'multilanguage');
             wp_localize_script('mltlngg_nav_menu', 'mltlngg_var', $data);
         }
         if (isset($_GET['page']) && 'mltlngg_settings' == $_GET['page'] && isset($_GET['tab']) && 'custom_code' == $_GET['tab']) {
             bws_plugins_include_codemirror();
         }
     }
 }
 function prflxtrflds_load_script()
 {
     global $hook_suffix;
     if (isset($_GET['page']) && 'profile-extra-fields.php' == $_GET['page']) {
         wp_enqueue_style('prflxtrflds_stylesheet', plugins_url('css/style.css', __FILE__));
         if (wp_is_mobile()) {
             wp_enqueue_script('jquery-touch-punch');
         }
         wp_enqueue_script('prflxtrflds_script', plugins_url('/js/script.js', __FILE__), array('jquery', 'jquery-ui-sortable'));
         $script_vars = array('prflxtrflds_ajax_url' => admin_url('admin-ajax.php'), 'prflxtrflds_nonce' => wp_create_nonce(plugin_basename(__FILE__), 'prflxtrflds_ajax_nonce_field'));
         wp_localize_script('prflxtrflds_script', 'prflxtrflds_ajax', $script_vars);
         if (isset($_GET['tab-action']) && 'custom_code' == $_GET['tab-action']) {
             bws_plugins_include_codemirror();
         }
     }
     if ('user-edit.php' == $hook_suffix || 'profile.php' == $hook_suffix) {
         wp_enqueue_style('jquery.datetimepicker.css', plugins_url('css/jquery.datetimepicker.css', __FILE__));
         wp_enqueue_script('jquery');
         wp_enqueue_script('jquery.datetimepicker.full.min.js', plugins_url('/js/jquery.datetimepicker.full.min.js', __FILE__));
         wp_enqueue_script('inputmask.js', plugins_url('/js/inputmask.js', __FILE__));
         wp_enqueue_script('jquery.inputmask.js', plugins_url('/js/jquery.inputmask.js', __FILE__));
         wp_enqueue_script('prflxtrflds_profile_script', plugins_url('/js/profile_script.js', __FILE__));
         $script_vars = array('prflxtrflds_nonce' => wp_create_nonce(plugin_basename(__FILE__), 'prflxtrflds_ajax_nonce_field'));
         wp_localize_script('prflxtrflds_profile_script', 'prflxtrflds_vars', $script_vars);
     }
 }
Example #5
0
 function gglcptch_add_admin_script_styles()
 {
     if (isset($_REQUEST['page']) && 'google-captcha.php' == $_REQUEST['page']) {
         wp_enqueue_style('gglcptch_stylesheet', plugins_url('css/style.css', __FILE__));
         wp_enqueue_script('gglcptch_admin_script', plugins_url('js/admin_script.js', __FILE__), array('jquery'));
         if (isset($_GET['action']) && 'custom_code' == $_GET['action']) {
             bws_plugins_include_codemirror();
         }
     }
 }
Example #6
0
 function cptch_admin_head()
 {
     if (isset($_REQUEST['page']) && 'captcha.php' == $_REQUEST['page']) {
         wp_enqueue_style('cptch_stylesheet', plugins_url('css/style.css', __FILE__));
         wp_enqueue_script('cptch_script', plugins_url('js/script.js', __FILE__));
         if (isset($_GET['action']) && 'custom_code' == $_GET['action']) {
             bws_plugins_include_codemirror();
         }
     }
 }