plugin = 'woocommerce/woocommerce.php'; add_action( 'admin_menu', array( $this, 'admin_menus') ); add_action( 'admin_head', array( $this, 'admin_head' ) ); add_action( 'admin_init', array( $this, 'welcome' ) ); } /** * Add admin menus/screens * * @access public * @return void */ public function admin_menus() { if ( empty( $_GET['page'] ) ) { return; } $welcome_page_name = __( 'About WooCommerce', 'woocommerce' ); $welcome_page_title = __( 'Welcome to WooCommerce', 'woocommerce' ); switch ( $_GET['page'] ) { case 'wc-about' : $page = add_dashboard_page( $welcome_page_title, $welcome_page_name, 'manage_options', 'wc-about', array( $this, 'about_screen' ) ); add_action( 'admin_print_styles-'. $page, array( $this, 'admin_css' ) ); break; case 'wc-credits' : $page = add_dashboard_page( $welcome_page_title, $welcome_page_name, 'manage_options', 'wc-credits', array( $this, 'credits_screen' ) ); add_action( 'admin_print_styles-'. $page, array( $this, 'admin_css' ) ); break; case 'wc-translators' : $page = add_dashboard_page( $welcome_page_title, $welcome_page_name, 'manage_options', 'wc-translators', array( $this, 'translators_screen' ) ); add_action( 'admin_print_styles-'. $page, array( $this, 'admin_css' ) ); break; } } /** * admin_css function. * * @access public * @return void */ public function admin_css() { wp_enqueue_style( 'woocommerce-activation', plugins_url( '/assets/css/activation.css', WC_PLUGIN_FILE ), array(), WC_VERSION ); } /** * Add styles just for this page, and remove dashboard page links. * * @access public * @return void */ public function admin_head() { remove_submenu_page( 'index.php', 'wc-about' ); remove_submenu_page( 'index.php', 'wc-credits' ); remove_submenu_page( 'index.php', 'wc-translators' ); // Badge for welcome page $badge_url = WC()->plugin_url() . '/assets/images/welcome/wc-badge.png'; ?> version, 0, 3 ); ?>

version ); ?>

Tweet

intro(); ?>

intro(); ?>

Contribute to WooCommerce.', 'woocommerce' ); ?>

contributors(); ?>
intro(); ?>

Translate WooCommerce.', 'woocommerce' ); ?>

' . $contributor . ', ' ); } */ ?>

ABSOLUTE_Web, AIRoman, Adam_Bajer, Aerendir, Aliom, Almaz, Andriy.Gusak, AngeloLazzari, Apelsinova, ArtGoddess, Ashleyking, AslanDoma, Axium, Bhuvanendran, Bitly, Bogusław, Chaos, Chea, Clausen, Closemarketing, CoachBirgit, Compute, DAJOHH, DJIO, Didierjr, Dimis13, Dmitrijb3, EmilEriksen, Fdu4, Flobin, FrancoBaccarini, Fredev, GabrielGil, GeertDD, Gonzalez74, Graya, Griga_M, Grześ, Gustavogcps, HelgaRakel, Ian_Razwadowski, JKKim, JamesIng, Janjaapvandijk, JoakimAndersen, Joeri, JohnRevel, KennethJ, Kiba_No_Ou, Kind, Komarovski, Lazybadger, Leones, M.Mellet, Mastersky, Miefos, Miodrag018, MondayStar, Morten, NANARUIZS1989, NeoTrafy, Nettpilot, Pal74, Promosnet, Pytlas, RealFugu, Rhys, Ricky1990, RistoNiinemets, Rudimidtgaard, Samf, Sasni, SeaBiz, SergeyBiryukov, Shimlesha, SilverXp, SkyHiRider, SzLegradi, TRFlavourart, Tarantulo, Thalitapinheiro, TheJoe, ThemeBoy, TomiToivio, TopOSScz, Triheads, Updulah, UrgentTranslation, Vaclad, Vinci, Violyne, WebArt.es, Wen89, Zouza, Zuige, aOOn, abdmc, abouolia, adamedotco, adiuvo, ahmedbadawy, akmalff, akorsar, alaa13212, alaershov, alichani, alvarogois, amisfranky, amitgilad, andercola, andrey.lima.ramos, anope, arhipaiva, arielk, aroland.hu, artprojectgroup, aruffini, asapvaleriy, audilu, aureliash, avarx, axdil, badsha_eee, badushich, banned, baobinh152, bergslay, blaagnu, blackieA, bluecafe, bohoejgaard, bornforlogic, busic, cadoo, calkut, carletto0282, cdevreugd, cegomez, cglaudel, claudiosmweb, clausRO, clausewitz45, coenjacobs, cool2014, corsonr, cpelham, cris701, cristi.dbr, culkman, dacthang1991, danielp, danitag78, darudar, deckerweb, deepinsource, dekaru, delitestudio, denarefyev, dhikkay14, dickysun, didikpri, difreo, disaada, dix.alex, doorbook, dualcore, dudlaj, e01, edea, eduardoarandah, egill, elct9620, ellena, elwins, embuck, emidiobattipaglia, endestaque, endomenec, ernexto, espellcaste, esspressions, estebanburgos, eugenpaun_ro, fantasy1612, fdaciuk, finnes, flyingoff, fnalescio, fquantium, funmist, fxbenard, gabejshn, gaspas, geerthoekzema, george_pt, gingermig, givitis, globalaperta, goksy973, gonzunigad, gopress.co.il, gordon168, greenbee, greencore, greguly, guxin, hafizero, hamalah, hangga, hannit, haruman, henryk.ibemeinhardt, hfelipe, hhaawwaa, hildago, hisoka512, huy.ng, huytuduy, iagomelanias, ideodora, idofri, ikadar, ilan256, imSuhaib, inceptive, inlaand, inpsyde, ironist, irsyadzaki, ishay1999, israel.cefrin, iwocs, jameskoster, jamesrod29, jeanmichell, jhn_rustan, jhovel, jlgd, jluisfreitas, joelbal, joesadaeng, joesalty, jolish, joseluis, josh_marom, joy.doctor, jpBenfica, jsparic, jugmar, jujjer, junedzhan, justina_ba, kampit, karama89, karistuck, keller2.m, khalil.delavaran, kikarina, kikehz, kjosenet, konglehong, kornienko, kraudio, kreatik, krzysko, kubik999, kweekarius, lahiponeja, lamibo, laszlo.espadas, laurbb, lincw, lingfeng, long.run.international, lopescmauro, louiseana, lubalee, lucasfreitas, lucaso, luciferbui, luisrull, m1k3lm, maayehkhaled, macbluy, madebyh, manuelvillagrdo, marciotoledo, marcosof, marioscrafts, maros336, martian36, martinezmr, martinproject, math_beck, mattyza, maxlam, me2you, meryjoearmstrong, metallicamu, michalvittek, michelle_zhang, mikaeldui, mikejolley, mikseris1001, milord, minimalstudio, mirkowhat, mjepson, mktunited, mobarak, mobiletalk, mod7, molfar, monferro, monsterporing, moon.modena, mortifactor, mostafizur, mruizoea, mucheroni, muhammetayten, muratbutun, mustafamsy, mylene, nabil_kadimi, nalvesrpd, nelblack, ng3but, nicolasleon, niels.heijman, njevdjo, nodarik, nsitbon, oisie, orlandobp31, pabambino, paletta, paoloalbera, pastynko, patjun, patrickheiloo, paulgor, paulofioratti, pdb, peboom, perdersongedal, pfrankov, pindi, pksupply, plaguna, platzh1rsch, playseebow, porclick, potgieterg, ppv1979, prepu, pulanito, rabas.marek, rafaelfunchal, rafalwolak, ragulka, rahmatilham, ramoonus, razorfish79, rbrock, rcovarru, read1, renatofrota, richardshaylor, rickbauck, rickserrat, ridhoyp, rkrizanovskis, rodrigoprior, roidayan, ronshe, rot13, rozumno, rpetkov, rvoogdgeert, s0w4, scottbasgaard, sennbrink, serpav, shady55, shoresh319, sindri, sirdaniel, slasher.art, smartdatasoft, snowre, soldier99, sovichet, srpski.dizajn, standoutmedia, stgoos, studionetting, stuk88, sukruozge, sumodirjo, supertommi, sverrirp, svetrov, swissky, swoboda, syao.pin, sylvie_janssens, t4rv1, tamvo, tanin, teddyostergaard, teotonioricardo, tetsu, the_fafa, tinaswelt, tinygiantstudios, tivnet, tntc1978, toblues, tomasha, tomboersma, tshowhey, tszming, tue.holm, tukangbajaksawah, tuzka, uah, urioste, uworx, valurthorgunnarsson, vanbo, vernandosimbolon, viamarket, viancu, viktorhanacek, vlinicx, w4advn, wachirakorn, wasim, wasley, webby1973, willemsiebe, woodyln, wpsk, xdosil, xepin, xevivb, y12studio, zaantar, zanguanga, zodiac1978, Натали

get_contributors(); if ( empty( $contributors ) ) { return ''; } $contributor_list = ''; return $contributor_list; } /** * Retrieve list of contributors from GitHub. * * @access public * @return mixed */ public function get_contributors() { $contributors = get_transient( 'woocommerce_contributors' ); if ( false !== $contributors ) { return $contributors; } $response = wp_remote_get( 'https://api.github.com/repos/woothemes/woocommerce/contributors', array( 'sslverify' => false ) ); if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) { return array(); } $contributors = json_decode( wp_remote_retrieve_body( $response ) ); if ( ! is_array( $contributors ) ) { return array(); } set_transient( 'woocommerce_contributors', $contributors, 3600 ); return $contributors; } /** * Sends user to the welcome page on first activation */ public function welcome() { // Bail if no activation redirect transient is set if ( ! get_transient( '_wc_activation_redirect' ) ) { return; } // Delete the redirect transient delete_transient( '_wc_activation_redirect' ); // Bail if we are waiting to install or update via the interface update/install links if ( get_option( '_wc_needs_update' ) == 1 || get_option( '_wc_needs_pages' ) == 1 ) { return; } // Bail if activating from network, or bulk, or within an iFrame if ( is_network_admin() || isset( $_GET['activate-multi'] ) || defined( 'IFRAME_REQUEST' ) ) { return; } if ( ( isset( $_GET['action'] ) && 'upgrade-plugin' == $_GET['action'] ) && ( isset( $_GET['plugin'] ) && strstr( $_GET['plugin'], 'woocommerce.php' ) ) ) { return; } wp_redirect( admin_url( 'index.php?page=wc-about' ) ); exit; } } new WC_Admin_Welcome();