', '' ) ?> array("name" => __('Buttons', 'maxbuttons'), "link" => "page=maxbuttons-list", "active" => "maxbuttons-list", ), "pro" => array( "name" => __('Upgrade to Pro', 'maxbuttons'), "link" => "page=maxbuttons-pro", "active" => "maxbuttons-pro", ), "settings" => array("name" => __('Settings', 'maxbuttons'), "link" => "page=maxbuttons-settings", "active" => "maxbuttons-settings", "userlevel" => 'manage_options' ), "support" => array("name" => __('Support', 'maxbuttons'), "link" => "page=maxbuttons-support", "active" => "maxbuttons-support", "userlevel" => 'manage_options' ) ); if ( maxInstall::hasAddOn('socialshare')) { unset(self::$tabs['collection']); } } public static function tab_menu() { self::tab_items_init(); ?>

$tabdata) { if (isset($tabdata["userlevel"]) && ! current_user_can($tabdata["userlevel"])) continue; $link = admin_url() . "admin.php?" . $tabdata["link"]; $name = $tabdata["name"]; $active = ''; if ($tabdata["active"] == $_GET["page"]) $active = "nav-tab-active"; echo "$name"; } echo "

"; } public static function getAdversion() { $version = MAXBUTTONS_VERSION_NUM; $version = str_replace('.','',$version); return $version; } public static function getCheckoutURL() { return $url = 'https://maxbuttons.com/checkout/?edd_action=add_to_cart&download_id=24035'; } public static function do_review_notice () { $current_user_id = get_current_user_id(); $version = MAXBUTTONS_VERSION_NUM; $review = get_user_meta( $current_user_id, 'maxbuttons_review_notice' , true ); if ($review == '') { //$created = get_option("MBFREE_CREATED"); $show = time() + (7* DAY_IN_SECONDS); update_user_meta($current_user_id, 'maxbuttons_review_notice', $show); return; } $display_review = false; if ($review == 'off') { return; // no show } elseif (is_numeric($review)) { $now = time(); if ($now > $review) { $display_review = true; } } // load style / script. It's seperated since it should show everywhere in admin. if ($display_review) { add_action( 'admin_notices', array( maxUtils::namespaceit('maxAdmin'), 'mb_review_notice')); // registered in admin scripts MB()->load_library('review_notice'); } } public static function setReviewNoticeStatus() { $status = isset($_POST["status"]) ? sanitize_text_field($_POST["status"]) : ''; $current_user_id = get_current_user_id(); $updated = false; if ($status == 'off') { $updated = true; update_user_meta($current_user_id, 'maxbuttons_review_notice', 'off'); } if ($status == 'later') { $updated = true; $later = time() + (14 * DAY_IN_SECONDS ); update_user_meta($current_user_id, 'maxbuttons_review_notice', $later); } if ($status == 'reviewoffer-dismiss') // different ad! { $updated = true; update_user_meta($current_user_id, 'maxbuttons_review_offer', 'off'); } echo json_encode(array("updated" => $updated)) ; exit(); } public static function display_ads() { $plugin_url = MB()->get_plugin_url(); $ad_url = $plugin_url . '/images/ads/'; $version = self::getAdVersion(); $url = self::getCheckoutURL(); ?>
"; $output .= sprintf("Enjoying MaxButtons? Please %s rate us ! %s", "", "" ); $output .= ""; echo $output; } public static function display_pagination($page_args, $location = 'top') { $mbadmin = MB()->getClass("admin"); $pag = $mbadmin->getButtonPages($page_args); if ($pag["first"] == $pag["last"]) { return; } extract($pag); ?>
items « " class="tablenav-pages-navspan button first-page ">« " class="tablenav-pages-navspan button prev-page ">‹ " class=" tablenav-pages-navspan button next-page ">› » " class="tablenav-pages-navspan button last-page ">»

", ""); ?>