Advertisement
geminilabs

Untitled

Jan 10th, 2022
1,198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.60 KB | None | 0 0
  1. /**
  2.  * @param string $value
  3.  * @return string
  4.  */
  5. add_filter('site-reviews/custom/value/platform', function ($value) {
  6.     if ('amazon' === $value) {
  7.         return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="currentColor"><path d="M21.996 18.23c0 .727-.405 2.127-1.314 2.896-.182.14-.365.061-.285-.143.265-.648.872-2.147.587-2.492-.2-.262-1.03-.243-1.738-.182-.324.041-.607.06-.828.105-.203.017-.245-.163-.041-.303.262-.185.545-.325.87-.428 1.15-.344 2.48-.137 2.67.083.036.042.08.16.08.463zm-1.921 1.294a7.426 7.426 0 0 1-.83.55c-2.122 1.275-4.87 1.943-7.258 1.943-3.843 0-7.28-1.417-9.888-3.788-.223-.182-.038-.446.223-.303 2.81 1.64 6.288 2.632 9.889 2.632 2.265 0 4.708-.424 7.035-1.336.162-.061.344-.144.503-.202.367-.165.69.243.326.504zm-6.17-11.03c0-1.041.041-1.654-.304-2.18-.306-.433-.833-.693-1.568-.652-.798.044-1.655.567-1.874 1.526-.042.22-.171.436-.436.483l-2.436-.31c-.174-.04-.438-.173-.352-.521C7.458 4.088 9.81 3.129 12.033 3h.523c1.22 0 2.787.349 3.79 1.264 1.217 1.136 1.088 2.662 1.088 4.32v3.927c0 1.178.477 1.7.958 2.314.13.219.174.477-.045.655-.48.435-1.394 1.219-1.917 1.654-.174.133-.488.147-.61.045-.77-.645-.958-1.003-1.435-1.658-.83.871-1.526 1.352-2.355 1.613a7.035 7.035 0 0 1-1.784.216c-2.09 0-3.746-1.303-3.746-3.88 0-2.049 1.09-3.442 2.7-4.101 1.61-.66 3.95-.87 4.704-.874zm-.478 5.192c.52-.872.477-1.586.477-3.185-.651 0-1.306.045-1.871.178-1.045.303-1.874.961-1.874 2.355 0 1.09.567 1.832 1.525 1.832.132 0 .248-.016.349-.045.67-.186 1.088-.522 1.394-1.135z"/></svg>';
  8.     }
  9.     if ('facebook' === $value) {
  10.         return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="currentColor"><path d="M12 2C6.477 2 2 6.477 2 12c0 4.991 3.657 9.128 8.438 9.879V14.89h-2.54V12h2.54V9.797c0-2.506 1.492-3.89 3.777-3.89 1.094 0 2.238.195 2.238.195v2.46h-1.26c-1.243 0-1.63.771-1.63 1.562V12h2.773l-.443 2.89h-2.33v6.989C18.343 21.129 22 16.99 22 12c0-5.523-4.477-10-10-10z"/></svg>';
  11.     }
  12.     if ('google' === $value) {
  13.         return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="currentColor"><path d="M3.064 7.51A9.996 9.996 0 0 1 12 2c2.695 0 4.959.99 6.69 2.605l-2.867 2.868C14.786 6.482 13.468 5.977 12 5.977c-2.605 0-4.81 1.76-5.595 4.123-.2.6-.314 1.24-.314 1.9 0 .66.114 1.3.314 1.9.786 2.364 2.99 4.123 5.595 4.123 1.345 0 2.49-.355 3.386-.955a4.6 4.6 0 0 0 1.996-3.018H12v-3.868h9.418c.118.654.182 1.336.182 2.045 0 3.046-1.09 5.61-2.982 7.35C16.964 21.105 14.7 22 12 22A9.996 9.996 0 0 1 2 12c0-1.614.386-3.14 1.064-4.49z"/></svg>';
  14.     }
  15.     return ''; // return an empty string for anything else (i.e. website)
  16. });
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement