]> _ Git - couzy.git/blob
ff7107600bedc21dbf311a7318b2539c8db34ec5
[couzy.git] /
1 <?php
2 /**
3  * @package WPSEO\Admin|Google_Search_Console
4  *
5  * This is the view for the modal box that appears when the create redirect link is clicked
6  */
7
8 /**
9  * @var string $view_type                The type of view to be displayed, can be 'create', 'already_exists', 'no_premium'
10  * @var string $current_redirect The existing redirect
11  * @var string $url                  Redirect for URL
12  */
13
14 ?>
15 <div id='redirect-<?php echo md5( $url ); ?>' style='display: none;'>
16         <form>
17                 <div class='form-wrap wpseo_content_wrapper'>
18                 <?php
19                 switch ( $view_type ) {
20                         case 'create' :
21                                 echo '<h3>', __( 'Redirect this broken URL and fix the error', 'wordpress-seo' ), '</h3>';
22                                 ?>
23                                 <div class='form-field form-required'>
24                                         <label for='wpseo-current-url'><?php _e( 'Current URL:', 'wordpress-seo' ); ?></label>
25                                         <input type='text' id='wpseo-current-url' name='current_url' value='<?php echo $url; ?>' disabled='disabled'>
26                                 </div>
27                                 <div class='form-field form-required'>
28                                         <label for='wpseo-new-url'><?php _e( 'New URL:', 'wordpress-seo' ); ?></label>
29                                         <input type='text' id='wpseo-new-url' name='new_url' autofocus value=''>
30                                 </div>
31                                 <div class='form-field form-required'>
32                                         <label for='wpseo-mark-as-fixed' class='clear'><?php _e( 'Mark as fixed:', 'wordpress-seo' ); ?></label>
33                                         <input type='checkbox' checked value='1' id='wpseo-mark-as-fixed' name='mark_as_fixed' class='clear' >
34                                         <p><?php
35                                                 /* Translators: %1$s: expands to 'Google Search Console'. */
36                                                 echo sprintf( __( 'Mark this issue as fixed in %1$s.', 'wordpress-seo' ), 'Google Search Console' );
37                                                 ?></p>
38                                 </div>
39                                 <p class='submit'>
40                                         <input type='button' name='submit' id='submit' class='button button-primary' value='<?php _e( 'Create redirect', 'wordpress-seo' ); ?>' onclick='wpseo_gsc_post_redirect( jQuery( this ) );' />
41                                 </p>
42                                 <?php
43                                 break;
44
45                         case 'already_exists' :
46                                 echo '<h3>', __( 'Error: a redirect for this URL already exists', 'wordpress-seo' ), '</h3>';
47                                 echo '<p>';
48
49                                 /* Translators: %1$s: expands to the current url and %2$s expands to url the redirects points to. */
50                                 echo sprintf(
51                                         __( 'You do not have to create a redirect for URL %1$s because a redirect already exists. The existing redirect points to %2$s. If this is fine you can mark this issue as fixed. If not, please go to the redirects page and change the target URL.', 'wordpress-seo' ),
52                                         $url,
53                                         $current_redirect
54                                 );
55                                 echo '</p>';
56                                 break;
57
58                         case 'no_premium' :
59                                 /* Translators: %s: expands to Yoast SEO Premium */
60                                 echo '<h3>', sprintf( __( 'Creating redirects is a %s feature', 'wordpress-seo' ), 'Yoast SEO Premium' ), '</h3>';
61                                 echo '<p>';
62                                 /* Translators: %1$s: expands to 'Yoast SEO Premium', %2$s: links to Yoast SEO Premium plugin page. */
63                                 echo sprintf(
64                                         __( 'To be able to create a redirect and fix this issue, you need %1$s. You can buy the plugin, including one year support and updates, on %2$s.', 'wordpress-seo' ),
65                                         'Yoast SEO Premium',
66                                         '<a href="http://yoa.st/redirects" target="_blank">yoast.com</a>'
67                                 );
68                                 echo '</p>';
69                                 break;
70                 }
71                 ?>
72                 </div>
73         </form>
74 </div>