Direction Dependent Float In Wordpress

/ Published in: PHP
Save to your folder(s)

This snippet is great for someone creating a wp theme which supports RTL as well as LTR since in enables you to use one function for multiple instances.

Copy this code and paste it in your HTML
  1. function fright() {
  2. if(is_rtl()) {echo 'fright';} else {echo 'fleft';}
  3. }
  5. function fleft() {
  6. if(is_rtl()) {echo 'fleft';} else {echo 'fleft';}
  7. }


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.