kalponikoronno

wp validation

Dec 15th, 2017
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.63 KB | None | 0 0
  1.  
  2. esc_html
  3.  
  4. esc_html_e
  5. string ব্যবহৃত হলে esc_html_e হবে
  6. string ব্যবহৃত না হলে esc_html হবে
  7. /* for url sanitize */
  8.  
  9. কোথাও সাধারনত টেক্সট ব্যবহার করতে হলে esc_html_e লিখতে হবে।
  10.  
  11. <h2>Oops! That page can't be found.</h2>
  12. <h2><?php esc_html_e( 'Oops! That page can&rsquo;t be found.', 'seo' ); ?></h2>
  13.  
  14.  
  15. esc_url
  16. /* for url sanitize */
  17.  
  18. <a href="<?php echo $link['link']; ?>"></a>
  19. <?php echo esc_url($link['link']); ?>
  20.  
  21. esc_attr
  22. /* for class sanitize */
  23. <i class="<?php echo $link['icon']; ?> "></i>
  24. <i class="<?php echo esc_attr($link['icon']); ?> "></i>
  25.  
  26. <img src="<?php echo $image_logo_src[0]; ?>" alt="" style="max-height:<?php echo $image_logo_max_height; ?>" alt=""/>
  27. <img src="<?php echo esc_url($image_logo_src[0]); ?>" style="max-height:<?php echo esc_attr($image_logo_max_height); ?>" alt="<?php echo html(bloginfo('name')); ?>"/>
  28.  
  29. wp_kses
  30.  
  31. $footer_copyright_text_allowed_tags = array(
  32.     'a' => array(
  33.         'href' => array(),
  34.         'title' => array()
  35.     ),
  36.     'img' => array(
  37.         'src' => array(),
  38.         'alt' => array()
  39.     ),
  40.     'br' => array(),
  41.     'em' => array(),
  42.     'strong' => array(),
  43. );
  44.  
  45. <div class="col-md-4">
  46.     <?php if(!empty($footer_copyright_text)){echo $footer_copyright_text;} else{esc_html_e('Copyright &copy; 2017 - All rights reserved', 'seo')} ?>
  47.    
  48. </div>
  49. <div class="col-md-4">
  50.         <?php if(!empty($footer_copyright_text)){echo wp_kses($footer_copyright_text, $footer_copyright_text_allowed_tags);} else{esc_html_e('Copyright &copy; 2017 - All rights reserved', 'seo')} ?>
  51.    
  52. </div>
Advertisement
Add Comment
Please, Sign In to add comment