function vl_updater_notice() { if (isset($_GET['action']) && $_GET['action'] == 'install-plugin') { return; } if (isset($_GET['action']) && $_GET['action'] == 'dimiss-update-notice') { update_option('vl_dismiss_update_notice', 1); return; } $active_plugins = apply_filters('active_plugins', get_option('active_plugins', array())); if (in_array('visser-labs-updater/visser-labs-updater.php', $active_plugins)) { return; } if (get_option('vl_dismiss_update_notice', false) == false) { $slug = 'visser-labs-updater'; $install_url = wp_nonce_url(self_admin_url(add_query_arg(array('action' => 'install-plugin', 'plugin' => $slug), 'update.php')), sprintf('install-plugin_%s', $slug)); $activate_url = add_query_arg(array('action' => 'activate', 'plugin' => urlencode('visser-labs-updater/visser-labs-updater.php'), 'plugin_status' => 'all', 'paged' => 1, '_wpnonce' => urlencode(wp_create_nonce('activate-plugin_visser-labs-updater/visser-labs-updater.php'))), 'plugins.php'); $dismiss_url = self_admin_url(add_query_arg('action', 'dismiss-update-notice')); $is_downloaded = false; $message = sprintf(__('<a href="%s">Install the Visser Labs Updater plugin</a> to get updates for your Visser Labs plugins.', 'vl_updater'), esc_url($install_url)); if ($plugins = array_keys(get_plugins())) { foreach ($plugins as $plugin) { if (strpos($plugin, 'visser-labs-updater.php') !== false) { $is_downloaded = true; $message = sprintf(__('<a href="%s">Activate the Visser Labs Updater plugin</a> to get updates for your Visser Labs plugins.', 'vl_updater'), esc_url(admin_url($activate_url))); } } } echo '<div class="updated fade"><p>' . $message . '<span style="float:right;"><a href="' . $dismiss_url . '">' . __('Dismiss', 'vl_updater') . '</a></span></p></div>' . "\n"; } }
function pmpro_addon_pmpro_shipping_widget($addon) { /* <img class="addon-thumb" src="<?php echo PMPRO_URL?>/adminpages/addons/images/pmpro-shipping.jpg" /> */ ?> <div class="info"> <p>Adds shipping fields to the checkout page, confirmation page, confirmation emails, member's list and edit user profile pages.</p> <div class="actions"> <?php if ($addon['enabled']) { ?> <a href="https://github.com/strangerstudios/pmpro-shipping/" class="button">Enabled</a> <?php } elseif (file_exists(dirname(__FILE__) . "/../../../pmpro-shipping/pmpro-shipping.php")) { ?> <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-shipping/pmpro-shipping.php'), 'activate-plugin_pmpro-shipping/pmpro-shipping.php'); ?> " class="button button-primary">Activate</a> <?php } else { ?> <a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-shipping.zip" class="button button-primary">Download</a> <?php } ?> </div> </div> <!-- end info --> <?php }
function after() { if (empty($this->upgrader->result['destination_name'])) { return; } $theme_info = $this->upgrader->theme_info(); if (empty($theme_info)) { return; } $name = $theme_info['Name']; $stylesheet = $this->upgrader->result['destination_name']; $template = !empty($theme_info['Template']) ? $theme_info['Template'] : $stylesheet; $preview_link = htmlspecialchars(add_query_arg(array('preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'preview_iframe' => 1, 'TB_iframe' => 'true'), trailingslashit(esc_url(get_option('home'))))); $activate_link = wp_nonce_url("themes.php?action=activate&template=" . urlencode($template) . "&stylesheet=" . urlencode($stylesheet), 'switch-theme_' . $template); $install_actions = array('preview' => '<a href="' . $preview_link . '" class="thickbox thickbox-preview" title="' . esc_attr(sprintf(__('Preview “%s”'), $name)) . '">' . __('Preview') . '</a>', 'activate' => '<a href="' . $activate_link . '" class="activatelink" title="' . esc_attr(sprintf(__('Activate “%s”'), $name)) . '">' . __('Activate') . '</a>'); if (is_network_admin() && current_user_can('manage_network_themes')) { $install_actions['network_enable'] = '<a href="' . esc_url(wp_nonce_url('themes.php?action=enable&theme=' . $template, 'enable-theme_' . $template)) . '" title="' . esc_attr__('Enable this theme for all sites in this network') . '" target="_parent">' . __('Network Enable') . '</a>'; } $install_actions['themes_page'] = '<a href="' . self_admin_url('themes.php') . '" title="' . esc_attr__('Themes page') . '" target="_parent">' . __('View Installed Themes', 'wp-app-store') . '</a>'; if (!$this->result || is_wp_error($this->result) || is_network_admin()) { unset($install_actions['activate'], $install_actions['preview']); } $install_actions = apply_filters('install_theme_complete_actions', $install_actions, $this->api, $stylesheet, $theme_info); if (!empty($install_actions)) { $this->feedback(implode(' | ', (array) $install_actions)); } }
function pmpro_addon_pmpro_wp_affiliate_widget($addon) { ?> <img class="addon-thumb" src="<?php echo PMPRO_URL; ?> /adminpages/addons/images/pmpro-wp-affiliate-platform.jpg" /> <div class="info"> <p>Process an affiliate via WP Affiliate Platform after a PMPro checkout.</p> <div class="actions"> <?php if ($addon['enabled']) { ?> <a href="https://github.com/strangerstudios/pmpro-wp-affiliate-platform/" class="button">Enabled</a> <?php } elseif (file_exists(dirname(__FILE__) . "/../../../pmpro-wp-affiliate-platform/pmpro-wp-affiliate-platform.php")) { ?> <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-wp-affiliate-platform/pmpro-wp-affiliate-platform.php'), 'activate-plugin_pmpro-wp-affiliate-platform/pmpro-wp-affiliate-platform.php'); ?> " class="button button-primary">Activate</a> <?php } else { ?> <a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-wp-affiliate-platform.zip" class="button button-primary">Download</a> <?php } ?> </div> </div> <!-- end info --> <?php }
function pmpro_addon_pmpro_addon_packages_widget($addon) { ?> <div class="info"> <p>Sell access to individual pages or posts for a flat fee. This is a workaround if you would like to allow multiple membership levels per user.</p> <div class="actions"> <?php if ($addon['enabled']) { ?> <a href="https://github.com/strangerstudios/pmpro-addon-packages/blob/master/readme.txt" class="button">Enabled</a> <?php } elseif (file_exists(dirname(__FILE__) . "/../../../pmpro-addon-packages/pmpro-addon-packages.php")) { ?> <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-addon-packages/pmpro-addon-packages.php'), 'activate-plugin_pmpro-addon-packages/pmpro-addon-packages.php'); ?> " class="button button-primary">Activate</a> <?php } else { ?> <a href="https://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-addon-packages.zip" class="button button-primary">Download</a> <?php } ?> </div> </div> <!-- end info --> <?php }
function pmpro_addon_pmpro_network_widget($addon) { ?> <img class="addon-thumb" src="<?php echo PMPRO_URL; ?> /adminpages/addons/images/pmpro-network.gif" /> <div class="info"> <p>Allow users to checkout for a membership to create a site on your WordPress multisite network.</p> <div class="actions"> <?php if ($addon['enabled']) { ?> <a href="https://github.com/strangerstudios/pmpro-network/blob/master/readme.txt" class="button">Enabled</a> <?php } elseif (file_exists(dirname(__FILE__) . "/../../../pmpro-network/pmpro-network.php")) { ?> <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-network/pmpro-network.php'), 'activate-plugin_pmpro-network/pmpro-network.php'); ?> " class="button button-primary">Activate</a> <?php } else { ?> <a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-network.zip" class="button button-primary">Download</a> <?php } ?> </div> </div> <!-- end info --> <?php }
function pmpro_addon_pmpro_register_helper_widget($addon) { ?> <img class="addon-thumb" src="<?php echo PMPRO_URL; ?> /adminpages/addons/images/pmpro-register-helper.gif" /> <div class="info"> <p>Add additional meta fields to your PMPro checkout page and/or "Your Profile" pages. Support for text, select, multi-select, textarea, hidden, and custom HTML. Loop into existing checkout/profile field sections or add new ones.</p> <div class="actions"> <?php if ($addon['enabled']) { ?> <a href="https://github.com/strangerstudios/pmpro-register-helper/blob/master/readme.txt" class="button">Enabled</a> <?php } elseif (file_exists(dirname(__FILE__) . "/../../../pmpro-register-helper/pmpro-register-helper.php")) { ?> <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-register-helper/pmpro-register-helper.php'), 'activate-plugin_pmpro-register-helper/pmpro-register-helper.php'); ?> " class="button button-primary">Activate</a> <?php } else { ?> <a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-register-helper.zip" class="button button-primary">Download</a> <?php } ?> </div> </div> <!-- end info --> <?php }
public static function pagination($args = array()) { $args = wp_parse_args($args, array('current' => 1, 'total_pages' => 1)); $current = $args['current']; $total_pages = $args['total_pages']; $records_link = add_query_arg(array('page' => WP_Stream_Admin::RECORDS_PAGE_SLUG), self_admin_url(WP_Stream_Admin::ADMIN_PARENT_PAGE)); $html_view_all = sprintf('<a class="%s" title="%s" href="%s">%s</a>', 'view-all', esc_attr__('View all records', 'stream'), esc_url($records_link), esc_html__('View All', 'stream')); $page_links = array(); $disable_first = ''; $disable_last = ''; if (1 === $current) { $disable_first = ' disabled'; } if ($current === $total_pages) { $disable_last = ' disabled'; } $page_links[] = sprintf('<a class="%s" title="%s" href="%s" data-page="1">%s</a>', 'first-page' . $disable_first, esc_attr__('Go to the first page', 'stream'), esc_url(remove_query_arg('paged', $records_link)), '«'); $page_links[] = sprintf('<a class="%s" title="%s" href="%s" data-page="%s">%s</a>', 'prev-page' . $disable_first, esc_attr__('Go to the previous page', 'stream'), esc_url(add_query_arg('paged', max(1, $current - 1), $records_link)), max(1, $current - 1), '‹'); $html_total_pages = sprintf('<span class="total-pages">%s</span>', number_format_i18n($total_pages)); $page_links[] = '<span class="paging-input">' . sprintf(_x('%1$s of %2$s', 'paging', 'stream'), number_format_i18n($current), $html_total_pages) . '</span>'; $page_links[] = sprintf('<a class="%s" title="%s" href="%s" data-page="%s">%s</a>', 'next-page' . $disable_last, esc_attr__('Go to the next page', 'stream'), esc_url(add_query_arg('paged', min($total_pages, $current + 1), $records_link)), min($total_pages, $current + 1), '›'); $page_links[] = sprintf('<a class="%s" title="%s" href="%s" data-page="%s">%s</a>', 'last-page' . $disable_last, esc_attr__('Go to the last page', 'stream'), esc_url(add_query_arg('paged', $total_pages, $records_link)), $total_pages, '»'); $html_pagination_links = ' <div class="tablenav"> <div class="tablenav-pages"> <span class="pagination-links">' . join("\n", $page_links) . '</span> </div> <div class="clear"></div> </div>'; echo '<div>' . $html_view_all . $html_pagination_links . '</div>'; // xss ok }
function pmpro_addon_pmpro_expiration_widget($addon) { ?> <div class="info"> <p>Set a specific expiration date (e.g. 2013-12-31) for a PMPro membership level or discount code.</p> <div class="actions"> <?php if ($addon['enabled']) { ?> <a href="https://github.com/strangerstudios/pmpro-set-expiration-dates/blob/master/readme.txt" class="button">Enabled</a> <?php } elseif (file_exists(dirname(__FILE__) . "/../../../pmpro-set-expiration-dates/pmpro-set-expiration-dates.php")) { ?> <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-set-expiration-dates/pmpro-set-expiration-dates.php'), 'activate-plugin_pmpro-set-expiration-dates/pmpro-set-expiration-dates.php'); ?> " class="button button-primary">Activate</a> <?php } else { ?> <a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-set-expiration-dates.zip" class="button button-primary">Download</a> <?php } ?> </div> </div> <!-- end info --> <?php }
function pmpro_addon_pmpro_infusionsoft_widget($addon) { ?> <img class="addon-thumb" src="<?php echo PMPRO_URL; ?> /adminpages/addons/images/pmpro-infusionsoft.jpg" /> <div class="info"> <p>Integrate with Infusionsoft. Add members to email lists (groups, tags) based on their membership level. (Note: works without PMPro as well.)</p> <div class="actions"> <?php if ($addon['enabled']) { ?> <a href="https://github.com/strangerstudios/pmpro-infusionsoft/" class="button">Enabled</a> <?php } elseif (file_exists(dirname(__FILE__) . "/../../../pmpro-infusionsoft/pmpro-infusionsoft.php")) { ?> <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-infusionsoft/pmpro-infusionsoft.php'), 'activate-plugin_pmpro-infusionsoft/pmpro-infusionsoft.php'); ?> " class="button button-primary">Activate</a> <?php } else { ?> <a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-infusionsoft.zip" class="button button-primary">Download</a> <?php } ?> </div> </div> <!-- end info --> <?php }
/** * Add the WordPress logo menu. * * @since 3.3.0 */ function wp_admin_bar_wp_menu($wp_admin_bar) { /* $wp_admin_bar->add_menu( array( 'id' => 'wp-logo', 'title' => '<span class="ab-icon"></span>', 'href' => self_admin_url( 'about.php' ), 'meta' => array( 'title' => __('About WordPress'), ), ) ); */ if (is_user_logged_in()) { // Add "About WordPress" link $wp_admin_bar->add_menu(array('parent' => 'wp-logo', 'id' => 'about', 'title' => __('About WordPress'), 'href' => self_admin_url('about.php'))); } // Add WordPress.org link $wp_admin_bar->add_menu(array('parent' => 'wp-logo-external', 'id' => 'wporg', 'title' => __('WordPress.org'), 'href' => __('http://wordpress.org/'))); // Add codex link $wp_admin_bar->add_menu(array('parent' => 'wp-logo-external', 'id' => 'documentation', 'title' => __('Documentation'), 'href' => __('http://codex.wordpress.org/'))); // Add forums link $wp_admin_bar->add_menu(array('parent' => 'wp-logo-external', 'id' => 'support-forums', 'title' => __('Support Forums'), 'href' => __('http://wordpress.org/support/'))); // Add feedback link $wp_admin_bar->add_menu(array('parent' => 'wp-logo-external', 'id' => 'feedback', 'title' => __('Feedback'), 'href' => __('http://wordpress.org/support/forum/requests-and-feedback'))); }
function pmpro_addon_pmpro_mailchimp_widget($addon) { ?> <img class="addon-thumb" src="<?php echo PMPRO_URL; ?> /adminpages/addons/images/pmpro-mailchimp.jpg" /> <div class="info"> <p>Integrate User Registrations with Mailchimp. Adds members to lists based on their membership level. (Note: works without PMPro as well.)</p> <div class="actions"> <?php if ($addon['enabled']) { ?> <a href="https://github.com/strangerstudios/pmpro-mailchimp/" class="button">Enabled</a> <?php } elseif (file_exists(dirname(__FILE__) . "/../../../pmpro-mailchimp/pmpro-mailchimp.php")) { ?> <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-mailchimp/pmpro-mailchimp.php'), 'activate-plugin_pmpro-mailchimp/pmpro-mailchimp.php'); ?> " class="button button-primary">Activate</a> <?php } else { ?> <a href="<?php echo wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=pmpro-mailchimp'), 'install-plugin_pmpro-mailchimp'); ?> " class="button button-primary">Download</a> <?php } ?> </div> </div> <!-- end info --> <?php }
function pmpro_addon_email_templates_widget($addon) { ?> <img class="addon-thumb" src="<?php echo PMPRO_URL; ?> /adminpages/addons/images/pmpro-email-templates.gif" /> <div class="info"> <p>Easily edit system-generated Email Templates from the WordPress admin.</p> <div class="actions"> <?php if ($addon['enabled']) { ?> <a href="http://wordpress.org/plugins/pmpro-email-templates-addon/" class="button">Enabled</a> <?php } elseif (file_exists(dirname(__FILE__) . "/../../../pmpro-email-templates-addon/pmpro-email-templates.php")) { ?> <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-email-templates-addon/pmpro-email-templates.php'), 'activate-plugin_pmpro-email-templates-addon/pmpro-email-templates.php'); ?> " class="button button-primary">Activate</a> <?php } else { ?> <a href="<?php echo wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=pmpro-email-templates-addon'), 'install-plugin_pmpro-email-templates-addon'); ?> " class="button button-primary">Download</a> <?php } ?> </div> </div> <!-- end info --> <?php }
function pmpro_addon_pmpro_stripe_lite_widget($addon) { ?> <div class="info"> <p>Remove billing fields (not required by Stripe) from the checkout page when using the Stripe payment gateway with PMPro.</p> <div class="actions"> <?php if ($addon['enabled']) { ?> <a href="https://github.com/strangerstudios/pmpro-stripe-lite/blob/master/readme.txt" class="button">Enabled</a> <?php } elseif (file_exists(dirname(__FILE__) . "/../../../pmpro-stripe-lite/pmpro-stripe-lite.php")) { ?> <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-stripe-lite/pmpro-stripe-lite.php'), 'activate-plugin_pmpro-stripe-lite/pmpro-stripe-lite.php'); ?> " class="button button-primary">Activate</a> <?php } else { ?> <a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-stripe-lite.zip" class="button button-primary">Download</a> <?php } ?> </div> </div> <!-- end info --> <?php }
function pmpro_addon_wp_bouncer_widget($addon) { ?> <img class="addon-thumb" src="<?php echo PMPRO_URL; ?> /adminpages/addons/images/wp-bouncer.gif" /> <div class="info"> <p>Make sure users are only logged in from one computer or device at a time.</p> <div class="actions"> <?php if ($addon['enabled']) { ?> <a href="https://github.com/strangerstudios/wp-bouncer/blob/master/readme.txt" class="button">Enabled</a> <?php } elseif (file_exists(dirname(__FILE__) . "/../../../wp-bouncer/wp-bouncer.php")) { ?> <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=wp-bouncer/wp-bouncer.php'), 'activate-plugin_wp-bouncer/wp-bouncer.php'); ?> " class="button button-primary">Activate</a> <?php } else { ?> <a href="<?php echo wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=wp-bouncer'), 'install-plugin_wp-bouncer'); ?> " class="button button-primary">Download</a> <?php } ?> </div> </div> <!-- end info --> <?php }
function pmpro_addon_pmpro_user_pages_widget($addon) { ?> <div class="info"> <p>Creates a unique page for each Member after checkout, giving the Admin access to write customized content for each specific member.</p> <div class="actions"> <?php if ($addon['enabled']) { ?> <a href="https://github.com/strangerstudios/pmpro-user-pages/blob/master/readme.txt" class="button">Enabled</a> <?php } elseif (file_exists(dirname(__FILE__) . "/../../../pmpro-user-pages/pmpro-user-pages.php")) { ?> <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-user-pages/pmpro-user-pages.php'), 'activate-plugin_pmpro-user-pages/pmpro-user-pages.php'); ?> " class="button button-primary">Activate</a> <?php } else { ?> <a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-user-pages.zip" class="button button-primary">Download</a> <?php } ?> </div> </div> <!-- end info --> <?php }
/** * @access public */ public function after() { $this->plugin = $this->upgrader->plugin_info(); if (!empty($this->plugin) && !is_wp_error($this->result) && $this->plugin_active) { // Currently used only when JS is off for a single plugin update? echo '<iframe title="' . esc_attr__('Update progress') . '" style="border:0;overflow:hidden" width="100%" height="170" src="' . wp_nonce_url('update.php?action=activate-plugin&networkwide=' . $this->plugin_network_active . '&plugin=' . urlencode($this->plugin), 'activate-plugin_' . $this->plugin) . '"></iframe>'; } $this->decrement_update_count('plugin'); $update_actions = array('activate_plugin' => '<a href="' . wp_nonce_url('plugins.php?action=activate&plugin=' . urlencode($this->plugin), 'activate-plugin_' . $this->plugin) . '" target="_parent">' . __('Activate Plugin') . '</a>', 'plugins_page' => '<a href="' . self_admin_url('plugins.php') . '" target="_parent">' . __('Return to Plugins page') . '</a>'); if ($this->plugin_active || !$this->result || is_wp_error($this->result) || !current_user_can('activate_plugins')) { unset($update_actions['activate_plugin']); } /** * Filters the list of action links available following a single plugin update. * * @since 2.7.0 * * @param array $update_actions Array of plugin action links. * @param string $plugin Path to the plugin file. */ $update_actions = apply_filters('update_plugin_complete_actions', $update_actions, $this->plugin); if (!empty($update_actions)) { $this->feedback(implode(' | ', (array) $update_actions)); } }
function pmpro_addon_pmpro_post_affiliate_pro_widget($addon) { ?> <img class="addon-thumb" src="<?php echo PMPRO_URL; ?> /adminpages/addons/images/pmpro-post-affiliate-pro.jpg" /> <div class="info"> <p>Integrate Paid Memberships Pro with the Post Affiliate Pro platform.</p> <div class="actions"> <?php if ($addon['enabled']) { ?> <a href="https://github.com/strangerstudios/pmpro-post-affiliate-pro/blob/master/readme.txt" class="button">Enabled</a> <?php } elseif (file_exists(dirname(__FILE__) . "/../../../pmpro-post-affiliate-pro/pmpro-post-affiliate-pro.php")) { ?> <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-post-affiliate-pro/pmpro-post-affiliate-pro.php'), 'activate-plugin_pmpro-post-affiliate-pro/pmpro-post-affiliate-pro.php'); ?> " class="button button-primary">Activate</a> <?php } else { ?> <a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-post-affiliate-pro.zip" class="button button-primary">Download</a> <?php } ?> </div> </div> <!-- end info --> <?php }
function wps_notice_aihrus() { $help_url = esc_url('https://nodedesk.zendesk.com/hc/en-us/articles/202381391'); $help_link = sprintf(__('<a href="%1$s">Update plugins</a>. <a href="%2$s">More information</a>.'), self_admin_url('update-core.php'), $help_url); $text = sprintf(esc_html__('Plugin "%1$s" has been deactivated as it requires a current Aihrus Framework. Once corrected, "%1$s" can be activated. %2$s'), WPS_NAME, $help_link); aihr_notice_error($text); }
function person_select_user_callback($post) { $post = get_post(); wp_nonce_field(basename(__FILE__), 'person_select_user-nonce'); $email = get_post_meta($post->ID, 'email', true); // Get user for person $user_id = get_user_by_person($post->ID); if ($user_id) { $profile_link = add_query_arg('user_id', $user_id, self_admin_url('user-edit.php')); echo '<a href="' . $profile_link . '">Ссылка на профиль</a>'; } else { ?> <label for="user_email_for_added">Укажите адрес эл.почты для приглашения:</label><br/> <input type="text" id="user_email_for_added" name="user_email_for_add_cp" class="field_cp" value="<?php echo $email; ?> " size="30"> <label for="add_user_by_email_cp"><input type="checkbox" name="add_user_by_email_cp" id="add_user_by_email_cp" class="field_cp"> Подключить пользователя</label> <p> <small>Внимание! Эти данные указываются только если требуется предоставить персоне доступ к системе.</small> </p> <?php } }
function pmpro_addon_pmpro_affiliates_widget($addon) { ?> <div class="info"> <p>Lightweight Affiliate system. Create affiliate accounts and codes; tracks checkouts by affiliate account.</p> <div class="actions"> <?php if ($addon['enabled']) { ?> <a href="https://github.com/strangerstudios/pmpro-affiliates/blob/master/readme.txt" class="button">Enabled</a> <?php } elseif (file_exists(dirname(__FILE__) . "/../../../pmpro-affiliates/pmpro-affiliates.php")) { ?> <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-affiliates/pmpro-affiliates.php'), 'activate-plugin_pmpro-affiliates/pmpro-affiliates.php'); ?> " class="button button-primary">Activate</a> <?php } else { ?> <a href="https://github.com/strangerstudios/pmpro-affiliates/archive/master.zip" class="button button-primary">Download</a> <?php } ?> </div> </div> <!-- end info --> <?php }
/** * Replace link to themes page with link to Flow settings page. * * @since 1.0.0 * * @param array $update_actions Links to add after update process ends. * @param string $theme Slug of the theme that just got updated. */ function tf_upgrade_complete($update_actions, $theme) { if ($theme == $this->name) { $update_actions['themes_page'] = '<a href="' . esc_url(add_query_arg(array('page' => $this->page, 'tf_updated' => 'true'), self_admin_url('admin.php'))) . '" title="' . __('Return to Flow Settings', 'themify-flow') . '" target="_parent">' . __('Return to Flow Settings', 'themify-flow') . '</a>'; } return $update_actions; }
public static function self_admin_url($path = '', $scheme = 'admin') { if (function_exists('self_admin_url')) { return self_admin_url($path, $scheme); } return admin_url($path, $scheme); }
function pmpro_addon_pmpro_level_cost_text_widget($addon) { ?> <div class="info"> <p>Adds a "level cost text" field to PMPro Membership Levels and Discount Codes to allow you to override the automatically generated level cost text PMPro provides.</p> <div class="actions"> <?php if ($addon['enabled']) { ?> <a href="https://github.com/strangerstudios/pmpro-level-cost-text/blob/master/readme.txt" class="button">Enabled</a> <?php } elseif (file_exists(dirname(__FILE__) . "/../../../pmpro-level-cost-text/pmpro-level-cost-text.php")) { ?> <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-level-cost-text/pmpro-level-cost-text.php'), 'activate-plugin_pmpro-level-cost-text/pmpro-level-cost-text.php'); ?> " class="button button-primary">Activate</a> <?php } else { ?> <a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-level-cost-text.zip" class="button button-primary">Download</a> <?php } ?> </div> </div> <!-- end info --> <?php }
function pmpro_addon_pmpro_series_widget($addon) { ?> <img class="addon-thumb" src="<?php echo PMPRO_URL; ?> /adminpages/addons/images/pmpro-series.gif" /> <div class="info"> <p>"Drip feed" content to your members over the course of their membership. Serializes content by # of days post-registration.</p> <div class="actions"> <?php if ($addon['enabled']) { ?> <a href="<?php echo admin_url("edit.php?post_type=pmpro_series"); ?> " class="button">Enabled</a> <?php } elseif (file_exists(dirname(__FILE__) . "/../../../pmpro-series/pmpro-series.php")) { ?> <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-series/pmpro-series.php'), 'activate-plugin_pmpro-series/pmpro-series.php'); ?> " class="button button-primary">Activate</a> <?php } else { ?> <a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-series.zip" class="button button-primary">Download</a> <?php } ?> </div> </div> <!-- end info --> <?php }
public function update_warning() { if (!is_admin()) { return; } if (defined('DOING_AJAX') && DOING_AJAX) { return; } if (!(is_multisite() && current_user_can('manage_network') || current_user_can('update_plugins'))) { return; } if (!function_exists('get_plugin_data')) { include_once ABSPATH . 'wp-admin/includes/plugin.php'; } $current = get_site_transient('update_plugins'); foreach (self::$plugins as $plugin) { if (isset($current->response[$plugin])) { $data = self::get_plugin_data($plugin); if (version_compare($current->response[$plugin]->new_version, $data->info->Version, '<=')) { continue; } $this->notice(sprintf(__('Hey! %1$s has an update (version %2$s), <a href="%3$s">click here to update</a>.', WYSIJA), '<strong>' . esc_attr($data->info->Name) . '</strong>', $current->response[$plugin]->new_version, wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin&plugin=') . $plugin, 'upgrade-plugin_' . $plugin)), true, true); } } }
function pmpro_addon_pmpro_international_addresses_widget($addon) { /* <img class="addon-thumb" src="<?php echo PMPRO_URL?>/adminpages/addons/images/pmpro-international-addresses.jpg" /> */ ?> <div class="info"> <p>Adds long form addresses to the PMPro checkout.</p> <div class="actions"> <?php if ($addon['enabled']) { ?> <a href="https://github.com/strangerstudios/pmpro-international-addresses/" class="button">Enabled</a> <?php } elseif (file_exists(dirname(__FILE__) . "/../../../pmpro-international-addresses/pmpro-international-addresses.php")) { ?> <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-international-addresses/pmpro-international-addresses.php'), 'activate-plugin_pmpro-international-addresses/pmpro-international-addresses.php'); ?> " class="button button-primary">Activate</a> <?php } else { ?> <a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-international-addresses.zip" class="button button-primary">Download</a> <?php } ?> </div> </div> <!-- end info --> <?php }
function pmpro_addon_pmpro_freerequire_widget($addon) { ?> <div class="info"> <p>Require name/address for free Membership Level checkout.</p> <div class="actions"> <?php if ($addon['enabled']) { ?> <a href="https://github.com/strangerstudios/pmpro-address-for-free-levels" class="button">Enabled</a> <?php } elseif (file_exists(dirname(__FILE__) . "/../../../pmpro-address-for-free-levels/pmpro-address-for-free-levels.php")) { ?> <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-address-for-free-levels/pmpro-address-for-free-levels.php'), 'activate-plugin_pmpro-address-for-free-levels/pmpro-address-for-free-levels.php'); ?> " class="button button-primary">Activate</a> <?php } else { ?> <a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-address-for-free-levels.zip" class="button button-primary">Download</a> <?php } ?> </div> </div> <!-- end info --> <?php }
function pmpro_addon_pmpro_network_subsite_widget($addon) { ?> <img class="addon-thumb" src="<?php echo PMPRO_URL; ?> /adminpages/addons/images/pmpro-network.gif" /> <div class="info"> <p>Have network subsites use membership data from a "main" site to handle access restrictions.</p> <div class="actions"> <?php if ($addon['enabled']) { ?> <a href="https://github.com/strangerstudios/pmpro-network-subsite" class="button">Enabled</a> <?php } elseif (file_exists(dirname(__FILE__) . "/../../../pmpro-network-subsite/pmpro-network-subsite.php")) { ?> <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-network-subsite/pmpro-network-subsite.php'), 'activate-plugin_pmpro-network-subsite/pmpro-network-subsite.php'); ?> " class="button button-primary">Activate</a> <?php } else { ?> <a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-network-subsite.zip" class="button button-primary">Download</a> <?php } ?> </div> </div> <!-- end info --> <?php }
function tw_notice_aihrus() { $help_url = esc_url('https://aihrus.zendesk.com/entries/35689458'); $help_link = sprintf(__('<a href="%1$s">Update plugins</a>. <a href="%2$s">More information</a>.', 'testimonials-widget'), self_admin_url('update-core.php'), $help_url); $text = sprintf(esc_html__('Plugin "%1$s" has been deactivated as it requires a current Aihrus Framework. Once corrected, "%1$s" can be activated. %2$s', 'testimonials-widget'), TW_NAME, $help_link); aihr_notice_error($text); }