static function displayPage() { if (!isset($_GET) || !isset($_GET['page'])) { wp_die('Invalid page name', 'treeson'); return; } $pageSlug = $_GET['page']; echo '<div class="mythemes-admin-page">'; echo self::pageHeader($pageSlug); echo '</div>'; $faqs = mythemes_cfg::get('faqs'); if (!empty($faqs)) { foreach ($faqs as $faq) { echo '<div class="mythemes-content">'; echo '<div class="mythemes-box">'; echo '<div class="mythemes-box-header">'; echo '<h3>' . $faq['title'] . '</h3>'; echo '</div>'; echo '<div class="mythemes-box-content">'; echo $faq['content']; echo '</div>'; echo '</div>'; echo '</div>'; } } $diff = mythemes_cfg::get('diff'); if (empty($diff)) { return null; } echo '<div class="mythemes-headline">'; echo '<h1>' . __('Features & Differences', 'treeson') . '</h1>'; echo '<p><span>' . __('The difference between the free and the premium version.', 'treeson') . '</span></p>'; echo '</div>'; echo '<div class="mythemes-features-diff-wrapper">'; echo '<table class="mythemes-features-diff">'; echo '<tbody>'; echo '<tr>'; echo '<th class="mythemes-feature">' . __('Features', 'treeson') . '</th>'; echo '<th class="mythemes-free">' . __('Free', 'treeson') . '<div><small>' . __('current version', 'treeson') . '</small></div></th>'; echo '<th class="mythemes-premium">' . __('Premium', 'treeson') . '<div><a href="' . mythemes_core::theme('premium') . '"><small>' . __('upgrade to premium', 'treeson') . '</small></a></div></th>'; echo '</tr>'; foreach ($diff as $index => $d) { $free = ''; $premium = ''; if (is_string($d[1])) { $free = $d[1]; } else { if (absint($d[1]) > 1) { $free = absint($d[1]); } else { if (absint($d[1]) == 1) { $free = '<i class="icon-ok-circle-1"></i>'; } else { if (absint($d[1]) == 0) { $free = '<i class="icon-cancel-circled-2"></i>'; } } } } if (is_string($d[2])) { $premium = $d[2]; } else { if (absint($d[2]) > 1) { $premium = absint($d[2]); } else { if (absint($d[2]) == 1) { $premium = '<i class="icon-ok-circle-1"></i>'; } else { if (absint($d[2]) == 0) { $premium = '<i class="icon-cancel-circled-2"></i>'; } } } } echo '<tr>'; echo '<td class="mythemes-feature">' . $d[0] . '</td>'; echo '<td class="mythemes-free">' . $free . '</td>'; echo '<td class="mythemes-free">' . $premium . '</td>'; echo '</tr>'; } echo '</table>'; echo '</div>'; }
static function displayPage() { if (!isset($_GET) || !isset($_GET['page'])) { wp_die('Invalid page name', 'materialize'); return; } $pageSlug = $_GET['page']; echo '<div class="mythemes-admin-page">'; echo self::pageHeader($pageSlug); echo '</div>'; $faqs = mythemes_cfg::get('faqs'); if (!empty($faqs)) { foreach ($faqs as $faq) { echo '<div class="mythemes-content">'; echo '<div class="mythemes-box">'; echo '<div class="mythemes-box-header">'; echo '<h3>' . $faq['title'] . '</h3>'; echo '</div>'; echo '<div class="mythemes-box-content">'; echo $faq['content']; echo '</div>'; echo '</div>'; echo '</div>'; } } $adds = mythemes_cfg::get('adds'); if (empty($adds)) { return null; } echo '<div class="mythemes-headline">'; echo '<h1>' . __('Latest from our Portfolio', 'materialize') . '</h1>'; echo '<p>' . mythemes_core::author('description') . '</p>'; echo '<p><span>' . __('Take a look at our works and projects, you can find something interesting for you !', 'materialize') . '</span></p>'; echo '</div>'; /* ADDVERTISING */ echo '<div class="mythemes-addvertising-wrapper">'; echo '<div class="mythemes-addvertising">'; foreach ($adds as $index => $add) { echo '<div class="mythemes-adds-item">'; echo '<div class="mythemes-adds-content">'; echo '<a href="' . esc_url($add['url']) . '" title="' . esc_attr($add['name']) . ' - $ ' . absint($add['price']) . '" target="_blank">'; echo '<img src="' . esc_url($add['thumbnail']) . '" alt="' . esc_attr($add['name']) . ' - $ ' . absint($add['price']) . '"/>'; echo '</a>'; echo '<div class="mythemes-title">'; echo '<a href="' . esc_url($add['url']) . '" title="' . esc_attr($add['name']) . ' - $ ' . absint($add['price']) . '" target="_blank">'; echo esc_html($add['name']) . ' <span>$ ' . absint($add['price']) . '</span>'; echo '</a>'; echo '</div>'; echo '</div>'; echo '</div>'; } echo '</div>'; echo '</div>'; $diff = mythemes_cfg::get('diff'); if (!mythemes_core::exists_premium()) { return null; } if (empty($diff)) { return null; } echo '<div id="mythemes-differences" class="mythemes-headline">'; echo '<h1>' . __('Features & Differences', 'materialize') . '</h1>'; echo '<p><span>' . __('The difference between the free and the premium version.', 'materialize') . '</span></p>'; echo '</div>'; echo '<div class="mythemes-features-diff-wrapper">'; echo '<table class="mythemes-features-diff">'; echo '<tbody>'; echo '<tr>'; echo '<th class="mythemes-feature">' . __('Features', 'materialize') . '</th>'; echo '<th class="mythemes-free">' . __('Free', 'materialize') . '<div><small>' . __('current version', 'materialize') . '</small></div></th>'; echo '<th class="mythemes-premium">' . __('Premium', 'materialize') . '<div><a href="' . esc_url(mythemes_core::theme('premium')) . '"><small>' . __('upgrade to premium', 'materialize') . '</small></a></div></th>'; echo '</tr>'; foreach ($diff as $index => $d) { $free = ''; $premium = ''; if (is_string($d[1])) { $free = $d[1]; } else { if (absint($d[1]) > 1) { $free = absint($d[1]); } else { if (absint($d[1]) == 1) { $free = '<i class="icon-ok-circle-1"></i>'; } else { if (absint($d[1]) == 0) { $free = '<i class="icon-cancel-circled-2"></i>'; } } } } if (is_string($d[2])) { $premium = $d[2]; } else { if (absint($d[2]) > 1) { $premium = absint($d[2]); } else { if (absint($d[2]) == 1) { $premium = '<i class="icon-ok-circle-1"></i>'; } else { if (absint($d[2]) == 0) { $premium = '<i class="icon-cancel-circled-2"></i>'; } } } } echo '<tr>'; echo '<td class="mythemes-feature">' . $d[0] . '</td>'; echo '<td class="mythemes-free">' . $free . '</td>'; echo '<td class="mythemes-free">' . $premium . '</td>'; echo '</tr>'; } echo '</table>'; echo '</div>'; }
static function links($key) { $cfgs = mythemes_cfg::get('links'); return $cfgs[$key]; }
static function displayPage() { if (!isset($_GET) || !isset($_GET['page'])) { wp_die('Invalid page name', 'cannyon'); return; } $pageSlug = $_GET['page']; echo '<div class="mythemes-admin-page">'; echo self::pageHeader($pageSlug); echo '</div>'; $faqs = mythemes_cfg::get('faqs'); if (!empty($faqs)) { foreach ($faqs as $faq) { echo '<div class="mythemes-content">'; echo '<div class="mythemes-box">'; echo '<div class="mythemes-box-header">'; echo '<h3>' . $faq['title'] . '</h3>'; echo '</div>'; echo '<div class="mythemes-box-content">'; echo $faq['content']; echo '</div>'; echo '</div>'; echo '</div>'; } } $diff = mythemes_cfg::get('diff'); if (!mythemes_core::exists_premium()) { return null; } if (empty($diff)) { return null; } echo '<div id="mythemes-differences" class="mythemes-headline">'; echo '<h1>' . __('Features & Differences', 'cannyon') . '</h1>'; echo '<p><span>' . __('The difference between the free and the premium version.', 'cannyon') . '</span></p>'; echo '</div>'; if (mythemes_core::exists_premium()) { echo '<a href="' . esc_url(mythemes_core::theme('premium')) . '">'; echo '<img src="' . get_template_directory_uri() . '/media/_backend/img/cannyon.png"/ style="margin: 0px auto; display: block; max-width: 100%;">'; echo '</a>'; } echo '<div class="mythemes-features-diff-wrapper">'; echo '<table class="mythemes-features-diff">'; echo '<tbody>'; echo '<tr>'; echo '<th class="mythemes-feature">' . __('Features', 'cannyon') . '</th>'; echo '<th class="mythemes-free">' . __('Free', 'cannyon') . '<div><small>' . __('current version', 'cannyon') . '</small></div></th>'; echo '<th class="mythemes-premium">' . __('Premium', 'cannyon') . '<div><a href="' . esc_url(mythemes_core::theme('premium')) . '"><small>' . __('upgrade to premium', 'cannyon') . '</small></a></div></th>'; echo '</tr>'; foreach ($diff as $index => $d) { $free = ''; $premium = ''; if (is_string($d[1])) { $free = $d[1]; } else { if (absint($d[1]) > 1) { $free = absint($d[1]); } else { if (absint($d[1]) == 1) { $free = '<i class="icon-ok-circle-1"></i>'; } else { if (absint($d[1]) == 0) { $free = '<i class="icon-cancel-circled-2"></i>'; } } } } if (is_string($d[2])) { $premium = $d[2]; } else { if (absint($d[2]) > 1) { $premium = absint($d[2]); } else { if (absint($d[2]) == 1) { $premium = '<i class="icon-ok-circle-1"></i>'; } else { if (absint($d[2]) == 0) { $premium = '<i class="icon-cancel-circled-2"></i>'; } } } } echo '<tr>'; echo '<td class="mythemes-feature">' . $d[0] . '</td>'; echo '<td class="mythemes-free">' . $free . '</td>'; echo '<td class="mythemes-free">' . $premium . '</td>'; echo '</tr>'; } echo '</table>'; echo '<a href="' . esc_url(mythemes_core::theme('premium')) . '" target="_blank" class="mythemes-button mythemes-premium-upgrade mythemes-submit-options"><i class="icon-publish"></i>' . __('Upgrade to Premium', 'cannyon') . '</a>'; echo '</div>'; }