static function render_license($page = '') { self::$page = $page; $tabs = apply_filters('rtmedia_license_tabs', array()); $addon_installed = false; if (!empty($tabs) && is_array($tabs)) { $addon_installed = true; /** * Grid layout for addon license keys * Design Credits: Pippin Williamson (https://easydigitaldownloads.com/) */ ?> <form method="post" class="license-form"> <div id="rtm-licenses" class="license-row"> <?php foreach ($tabs as $key => $tab) { self::render_license_section(self::$page, $tab); } ?> </div> <div class="rtml-submit-wrapper"> <?php submit_button('Save Changes'); ?> </div> </form> <?php } // For add-on which aren't updated with the latest code if (did_action('rtmedia_addon_license_details')) { $addon_installed = true; ?> <div id="rtm-licenses" class="license-row"> <?php do_action('rtmedia_addon_license_details'); ?> </div> <?php } if (!$addon_installed) { ?> <div class="rtm-license-404"><?php esc_html_e('You may be interested in', 'buddypress-media'); ?> <a href="<?php echo esc_url(admin_url('admin.php?page=rtmedia-addons')); ?> "><?php esc_html_e('rtMedia Addons', 'buddypress-media'); ?> </a>.</div> <?php } }
static function render_license($page = '') { self::$page = $page; global $wp_actions; $tabs = apply_filters('rtmedia_license_tabs', array()); $addon_installed = false; if (!empty($tabs) && is_array($tabs)) { $addon_installed = true; foreach ($tabs as $key => $tab) { $tabs[$key]['callback'] = array('RTMediaLicense', 'render_license_section'); } ?> <div id="rtm-licenses"> <?php RTMediaAdmin::render_admin_ui(self::$page, $tabs); ?> </div> <?php } // For add-on which aren't updated with the latest code if (did_action('rtmedia_addon_license_details')) { $addon_installed = true; ?> <div id="rtm-licenses"> <?php do_action('rtmedia_addon_license_details'); ?> </div> <?php } if (!$addon_installed) { ?> <div class="rtm-license-404">You may be interested in <a href="<?php echo admin_url('admin.php?page=rtmedia-addons'); ?> ">rtMedia Addons</a>.</div> <?php } }