Orderhome/bestoj5/nestedpack.com/wp-content/plugins/woocommerce-help-scout/woo-includes/woo-functions.php000064400000007173147600413600030070 0ustar00file = $file; $plugin->file_id = $file_id; $plugin->product_id = $product_id; $woothemes_queued_updates[] = $plugin; } } /** * Load installer for the WooThemes Updater. * * @return $api Object */ if ( ! class_exists( 'WooThemes_Updater' ) && ! function_exists( 'woothemes_updater_install' ) ) { /** * Display a notice if the "WooThemes Updater" plugin hasn't been installed. * * @param string $api comment about this variable. * @param string $action comment about this variable. * @param object $args comment about this variable. */ function woothemes_updater_install( $api, $action, $args ) { $download_url = 'http://woodojo.s3.amazonaws.com/downloads/woothemes-updater/woothemes-updater.zip'; if ( 'plugin_information' !== $action || false !== $api || ! isset( $args->slug ) || 'woothemes-updater' !== $args->slug ) { return $api; } $api = new stdClass(); $api->name = 'WooThemes Updater'; $api->version = '1.0.0'; $api->download_link = esc_url( $download_url ); return $api; } add_filter( 'plugins_api', 'woothemes_updater_install', 10, 3 ); } /** * WooUpdater Installation Prompts */ if ( ! class_exists( 'WooThemes_Updater' ) && ! function_exists( 'woothemes_updater_notice' ) ) { /** * Display a notice if the "WooThemes Updater" plugin hasn't been installed. * * @return void */ function woothemes_updater_notice() { $active_plugins = apply_filters( 'active_plugins', get_option( 'active_plugins' ) ); if ( in_array( 'woothemes-updater/woothemes-updater.php', $active_plugins ) ) { return; } $slug = 'woothemes-updater'; $install_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=' . $slug ), 'install-plugin_' . $slug ); $activate_url = 'plugins.php?action=activate&plugin=' . rawurlencode( 'woothemes-updater/woothemes-updater.php' ) . '&plugin_status=all&paged=1&s&_wpnonce=' . rawurlencode( wp_create_nonce( 'activate-plugin_woothemes-updater/woothemes-updater.php' ) ); $message = 'Install the WooThemes Updater plugin to get updates for your WooThemes plugins.'; $plugins = array_keys( get_plugins() ); foreach ( $plugins as $plugin ) { if ( strpos( $plugin, 'woothemes-updater.php' ) !== false ) { $message = 'Activate the WooThemes Updater plugin to get updates for your WooThemes plugins.'; } } echo '

' . wp_kses_post( $message, array( 'div' => array( 'class' => array() ), 'a' => array( 'href' => array() ), 'p' => array(), 'strong' => array(), ) ) . '

' . "\n"; } add_action( 'admin_notices', 'woothemes_updater_notice' ); }