admin-menu-addons.html.php 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <div class="wrap apps-container">
  2. <!--
  3. <?php foreach ($notices as $notice): ?>
  4. <div class="nf-addon-notice">
  5. <p>
  6. <strong><?php echo $notice[ 'title' ]; ?></strong> <?php _e( ' requires an update. You have version ', 'ninja-forms' );?><strong><?php echo $notice[ 'old_version' ]; ?></strong><?php _e( ' installed. The current version is ', 'ninja-forms' ); ?><strong><?php echo $notice[ 'new_version' ]; ?></strong>.
  7. </p>
  8. </div>
  9. <?php endforeach; ?>
  10. -->
  11. <?php
  12. $u_id = get_option( 'nf_aff', false );
  13. if ( !$u_id ) $u_id = apply_filters( 'ninja_forms_affiliate_id', false );
  14. ?>
  15. <?php foreach ($items as $item): ?>
  16. <?php
  17. $link = $item[ 'link' ];
  18. if ( $u_id ) {
  19. $last_slash = strripos( $link, '/' );
  20. $link = substr( $link, 0, $last_slash );
  21. $link = urlencode( $link );
  22. $link = 'http://www.shareasale.com/r.cfm?u=' . $u_id . '&b=812237&m=63061&afftrack=&urllink=' . $link;
  23. }
  24. ?>
  25. <div class="nf-extend nf-box">
  26. <div class="nf-box-inside">
  27. <img src="<?php echo NF_PLUGIN_URL . $item['image']; ?>" />
  28. <h2><?php echo $item['title']; ?></h2>
  29. <div class="nf-extend-content">
  30. <p><?php echo $item['content']; ?></p>
  31. <div class="nf-extend-buttons">
  32. <?php if( ! empty( $item['docs'] ) ): ?>
  33. <a target="_blank" href="<?php echo $item['docs']; ?>" class="nf-button secondary nf-doc-button"><?php _e( 'Docs', 'ninja-forms' ); ?></a>
  34. <?php else: ?>
  35. <p><a><?php _e( 'Documentation coming soon.', 'ninja-forms' ); ?></a></p>
  36. <?php endif; ?>
  37. <?php if( ! empty( $item['plugin'] ) && file_exists( WP_PLUGIN_DIR.'/'.$item['plugin'] ) ): ?>
  38. <?php if( is_plugin_active( $item['plugin'] ) ): ?>
  39. <span class="secondary nf-button"><?php _e( 'Active', 'ninja-forms' ); ?></span>
  40. <?php elseif( is_plugin_inactive( $item['plugin'] ) ): ?>
  41. <span class="secondary nf-button"><?php _e( 'Installed', 'ninja-forms' ); ?></span>
  42. <?php else: ?>
  43. <a target="_blank" href="<?php echo $link; ?>" title="<?php echo $item['title']; ?>" class="primary nf-button"><?php _e( 'Learn More', 'ninja-forms' ); ?></a>
  44. <?php endif; ?>
  45. <?php else: ?>
  46. <a target="_blank" href="<?php echo $link; ?>" title="<?php echo $item['title']; ?>" class="primary nf-button"><?php _e( 'Learn More', 'ninja-forms' ); ?></a>
  47. <?php endif; ?>
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. <?php endforeach; ?>
  53. </div>