Advertisement
gregrickaby

Custom Field

Feb 1st, 2012
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.92 KB | None | 0 0
  1. <?php // Check for platforms
  2. if ( genesis_get_custom_field( '_cmb_additional_platforms_available' ) ) {
  3. $platforms = get_post_custom_values('_cmb_additional_platforms_available', false); // Get available platforms
  4. $result = array_reverse($platforms); // Reverse the array
  5. foreach ( $result as $platform => $pname ) {
  6. if ( $pname == 'windows' ) { echo '<img src="' . CHILD_URL . '/images/windows.png" height="24" width="24" alt="Windows" title="Windows" class="platform-ico">'; }
  7. if ( $pname == 'bsd' ) { echo '<img src="' . CHILD_URL . '/images/bsd.png" height="24" width="24" alt="BSD" title="BSD" class="platform-ico">'; }
  8. if ( $pname == 'mac' ) { echo '<img src="' . CHILD_URL . '/images/mac.png" height="24" width="24" alt="Mac" title="Mac" class="platform-ico">'; }
  9. if ( $pname == 'linux' ) { echo '<img src="' . CHILD_URL . '/images/linux.png" height="24" width="24" alt="Linux" title="Linux" class="platform-ico">'; }
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement