/**
  * Enqueues the do / undo redirect scripts
  */
 public static function enqueue()
 {
     wp_enqueue_script('wpseo-premium-admin-overview', plugin_dir_url(WPSEO_PREMIUM_FILE) . '/assets/js/wpseo-premium-admin-overview' . WPSEO_CSSJS_SUFFIX . '.js', array('jquery'), WPSEO_VERSION);
     wp_localize_script('wpseo-premium-admin-overview', 'wpseo_premium_strings', WPSEO_Premium_Javascript_Strings::strings());
 }
 /**
  * Enqueue post en term overview script
  *
  * @param $hook
  */
 public function enqueue_overview_script($hook)
 {
     if ('edit.php' == $hook || 'edit-tags.php' == $hook || 'post.php' == $hook) {
         wp_enqueue_script('wpseo-premium-admin-overview', plugin_dir_url(WPSEO_PREMIUM_FILE) . '/assets/js/wpseo-premium-admin-overview.js', array('jquery'), '1.0.0');
         wp_localize_script('wpseo-premium-admin-overview', 'wpseo_premium_strings', WPSEO_Premium_Javascript_Strings::strings());
     }
 }
Example #3
0
 /**
  * Load the admin redirects scripts
  */
 public function page_scripts()
 {
     wp_enqueue_script('wpseo-premium-yoast-overlay', plugin_dir_url(WPSEO_PREMIUM_FILE) . '/assets/js/wpseo-premium-yoast-overlay.js', array('jquery'), '1.0.0');
     wp_enqueue_script('wp-seo-premium-admin-gwt', plugin_dir_url(WPSEO_PREMIUM_FILE) . '/assets/js/wp-seo-premium-admin-gwt.js', array('jquery'), '1.0.0');
     wp_localize_script('wp-seo-premium-admin-gwt', 'wpseo_premium_strings', WPSEO_Premium_Javascript_Strings::strings());
     add_screen_option('per_page', array('label' => __('Crawl errors per page', 'wordpress-seo'), 'default' => 25, 'option' => 'errors_per_page'));
 }
 private static function fill()
 {
     self::$strings = array('ajaxurl' => admin_url('admin-ajax.php'), 'error_old_url' => __("The old URL field can't be empty.", 'wordpress-seo'), 'error_regex' => __("The REGEX field can't be empty.", 'wordpress-seo'), 'error_new_url' => __("The new URL field can't be empty.", 'wordpress-seo'), 'error_saving_redirect' => __("Error while saving this redirect", 'wordpress-seo'), 'error_new_type' => __("New type can't be empty.", 'wordpress-seo'), 'unsaved_redirects' => __("You have unsaved redirects, are you sure you want to leave?", 'wordpress-seo'), 'enter_new_url' => __("Please enter the new URL", 'wordpress-seo'), 'redirect_saved' => __("Redirect saved!", 'wordpress-seo'), 'redirect_possibly_bad' => __("Possibly bad redirect.", 'wordpress-seo'), 'redirect_not_ok' => __("The URL you entered returned a HTTP code different than 200(OK).", 'wordpress-seo'));
 }
 /**
  * Load the admin redirects scripts
  */
 public static function page_scripts()
 {
     wp_enqueue_script('jquery-qtip', plugins_url('js/jquery.qtip.min.js', WPSEO_FILE), array('jquery'), '1.0.0-RC3', true);
     wp_enqueue_script('wpseo-premium-yoast-overlay', plugin_dir_url(WPSEO_PREMIUM_FILE) . 'assets/js/wpseo-premium-yoast-overlay' . WPSEO_CSSJS_SUFFIX . '.js', array('jquery'), WPSEO_VERSION);
     wp_enqueue_script('wp-seo-premium-admin-redirects', plugin_dir_url(WPSEO_PREMIUM_FILE) . 'assets/js/wp-seo-premium-admin-redirects' . WPSEO_CSSJS_SUFFIX . '.js', array('jquery'), WPSEO_VERSION);
     wp_localize_script('wp-seo-premium-admin-redirects', 'wpseo_premium_strings', WPSEO_Premium_Javascript_Strings::strings());
     add_screen_option('per_page', array('label' => __('Redirects per page', 'wordpress-seo-premium'), 'default' => 25, 'option' => 'redirects_per_page'));
 }
 /**
  * Fill the value of self::$strings with translated strings
  */
 private static function fill()
 {
     self::$strings = array('error_circular' => __('You can\'t redirect a URL to itself.', 'wordpress-seo-premium'), 'error_old_url' => __('The old URL field can\'t be empty.', 'wordpress-seo-premium'), 'error_regex' => __('The Regular Expression field can\'t be empty.', 'wordpress-seo-premium'), 'error_new_url' => __('The new URL field can\'t be empty.', 'wordpress-seo-premium'), 'error_saving_redirect' => __('Error while saving this redirect', 'wordpress-seo-premium'), 'error_new_type' => __('New type can\'t be empty.', 'wordpress-seo-premium'), 'unsaved_redirects' => __('You have unsaved redirects, are you sure you want to leave?', 'wordpress-seo-premium'), 'enter_new_url' => __('Please enter the new URL for %s', 'wordpress-seo-premium'), 'redirect_saved' => __('Redirect created from %1$s to %2$s!', 'wordpress-seo-premium'), 'redirect_possibly_bad' => __('Possibly bad redirect.', 'wordpress-seo-premium'), 'redirect_not_ok' => __('The URL you entered returned a HTTP code different than 200(OK).', 'wordpress-seo-premium'));
 }