/** * Output the getting started screen */ public function getting_started_screen() { // Save settings if (isset($_POST['wpcm_sport']) && !empty($_POST['wpcm_sport']) && get_option('wpcm_sport', null) != $_POST['wpcm_sport']) { $sport = WPCM()->sports->{$_POST}['wpcm_sport']; WPCM_Admin_Settings::configure_sport($sport); update_option('wpcm_sport', $_POST['wpcm_sport']); } if (isset($_POST['wpcm_default_club']) && !empty($_POST['wpcm_default_club']) && get_option('wpcm_default_club', null) != $_POST['wpcm_default_club']) { update_option('wpcm_default_club', $_POST['wpcm_default_club']); } ?> <div class="wrap about-wrap"> <?php $this->intro(); ?> <?php $this->tabs(); ?> <p class="about-description"><?php _e('WP Club Manager has been built with the focus on simplicity and ease of use so it won\'t be long before your club website is up and ready for action.', 'wp-club-manager'); ?> </p> <div id="message" class="updated wpclubmanager-message"> <p><strong><?php _e('Your settings have been saved.', 'wp-club-manager'); ?> </strong></p> </div> <div class="changelog"> <form method="post" id="mainform" action="" enctype="multipart/form-data"> <h3><?php _e('Quick and Easy Setup', 'wp-club-manager'); ?> </h3> <div class="feature-section"> <img src="<?php echo WPCM_URL . 'assets/images/welcome/12-wpcm-settings.png'; ?> " class="wpcm-welcome-screenshots"/> <h4><?php _e('1. Choose Your Sport', 'wp-club-manager'); ?> </h4> <p><?php printf(__('Take your pick from 13 supported team sports. Each sport has preset player positions and statistics so it\'s a good idea to set this up before anything else. To select your default sport goto <a href="%s">General Settings</a> or use the form below.', 'wp-club-manager'), admin_url('admin.php?page=wpcm-settings')); ?> </p> <p> <?php $sport_options = wpcm_get_sport_options(); $class = 'chosen_select' . (is_rtl() ? ' chosen-rtl' : ''); $settings = array(array('id' => 'wpcm_sport', 'default' => 'soccer', 'type' => 'select', 'class' => $class, 'options' => $sport_options)); WPCM_Admin_Settings::output_fields($settings); ?> <input name="save" class="button-primary" type="submit" value="<?php _e('Save changes', 'wp-club-manager'); ?> " /> <input type="hidden" name="subtab" id="last_tab" /> <?php wp_nonce_field('wpclubmanager-settings'); ?> </p> <h4><?php _e('2. Create Your Club', 'wp-club-manager'); ?> </h4> <p><?php printf(__('The Clubs menu is where you create and edit clubs, including your own and create Competitions, Seasons, Teams and Venues. To create a club, click <em><a href="%s">Add New</a></em> and then fill out the club details. <strong>Your club will need to be set as the Default Club in <a href="%s">General Settings</a>.</strong> Alternatively, you can enter your default club in the box below.', 'wp-club-manager'), admin_url('post-new.php?post_type=wpcm_club'), admin_url('admin.php?page=wpcm-settings')); ?> </p> <?php if (isset($_POST['wpcm_default_club'])) { $title = $_POST['wpcm_default_club']; $post = array('post_title' => $title, 'post_type' => 'wpcm_club', 'post_status' => 'publish'); $wpcm_default_club = wp_insert_post($post); update_option('wpcm_default_club', $wpcm_default_club); } else { $title = ''; } if (get_option('wpcm_default_club') == null) { ?> <p> <?php $settings = array(array('id' => 'wpcm_default_club', 'default' => '', 'type' => 'text')); WPCM_Admin_Settings::output_fields($settings); ?> <input name="save" class="button-primary" type="submit" value="<?php _e('Save changes', 'wp-club-manager'); ?> " /> <input type="hidden" name="subtab" id="last_tab" /> <?php wp_nonce_field('wpclubmanager-settings'); ?> </p> <?php } ?> <h4><?php _e('3. Seasons, Competitions and Teams', 'wp-club-manager'); ?> </h4> <p><?php printf(__('Before adding your players and opposition clubs you should create <a href="%s">Competitions</a> and <a href="%s">Seasons</a>. If your club has more than one team, for example, firsts, reserves, youth team etc. you will need to create <a href="%s">Teams</a> for each one. When creating players or adding more clubs you will need to choose the competitions, seasons and teams which they compete in.', 'wp-club-manager'), admin_url('edit-tags.php?taxonomy=wpcm_comp&post_type=wpcm_club'), admin_url('edit-tags.php?taxonomy=wpcm_season&post_type=wpcm_club'), admin_url('edit-tags.php?taxonomy=wpcm_team&post_type=wpcm_club')); ?> </p> <p><?php _e('<strong>If you have already created your default club you will need to edit your club to add competitions, seasons and teams.</strong>', 'wp-club-manager'); ?> </p> <img src="<?php echo WPCM_URL . 'assets/images/welcome/12-create-players.png'; ?> " class="wpcm-welcome-screenshots"/> <h4><?php _e('4. Add Your Players', 'wp-club-manager'); ?> </h4> <p><?php printf(__('Now you should be ready to add your clubs players. The Players Menu is where you can create and edit your clubs players and player positions. To create a player, simply click <em><a href="%s">Add New</a></em> and then fill out the player details, including competitions, seasons and teams.', 'wp-club-manager'), admin_url('post-new.php?post_type=wpcm_player')); ?> </p> <h4><?php _e('5. Play A Match', 'wp-club-manager'); ?> </h4> <p><?php printf(__('Now you should be ready to add your clubs players. The Players Menu is where you can create and edit your clubs players and player positions. To create a player, simply click <em><a href="%s">Add New</a></em> and then fill out the player details, including competitions, seasons and teams.', 'wp-club-manager'), admin_url('post-new.php?post_type=wpcm_match')); ?> </p> <p><?php printf(__('Don\'t forget to run through the <a href="%s">WP Club Manager settings</a> where you can set visibility options for player stats, set league standing options and loads more.', 'wp-club-manager'), admin_url('admin.php?page=wpcm-settings')); ?> </p> </div> </form> </div> <div class="changelog"> <h3><?php _e('Need Help?', 'wp-club-manager'); ?> </h3> <div class="feature-section"> <h4><?php _e('Plugin Documentation', 'wp-club-manager'); ?> </h4> <p><?php _e('If you need more help setting up WP Club Manager, using the shortcodes and widgets or customizing the plugin templates then visit our <a href="https://wpclubmanager.com/docs/">documentation</a>.', 'wp-club-manager'); ?> </p> <h4><?php _e('Friendly Support', 'wpclubmanager'); ?> </h4> <p><?php _e('We do our best to provide the best support we can. If you encounter a problem or have a question, post a question in the <a href="https://wpclubmanager.com/support">support forums</a>.', 'wp-club-manager'); ?> </p> </div> </div> <div class="changelog"> <h3><?php _e('Stay Up to Date', 'wp-club-manager'); ?> </h3> <div class="feature-section"> <h4><?php _e('Get Notified of New Extensions and Plugin Updates', 'wpclubmanager'); ?> </h4> <p><?php _e('WP Club Manager is getting better every day with new features, extensions and themes being created. Stay in touch with the latest developments, newest extensions and get special offers by subscribing to our newsletter.', 'wp-club-manager'); ?> </p> <!-- Begin MailChimp Signup Form --> <div id="mc_embed_signup"> <form action="//wpclubmanager.us1.list-manage.com/subscribe/post?u=5af3e709ddae81bdc7aa50610&id=909adae053" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate> <input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="Enter your email address" required> <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups--> <div style="position: absolute; left: -5000px;"><input type="text" name="b_5af3e709ddae81bdc7aa50610_909adae053" tabindex="-1" value=""></div> <div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div> </form> </div> <!--End mc_embed_signup--> </div> </div> <div class="return-to-dashboard"> <a href="<?php echo esc_url(admin_url(add_query_arg(array('page' => 'wpcm-settings'), 'admin.php'))); ?> "><?php _e('Go to WP Club Manager Settings', 'wp-club-manager'); ?> </a> </div> </div> <?php }
/** * Get settings array * * @return array */ public function get_settings() { $sports = wpcm_get_sport_options(); return apply_filters('wpclubmanager_general_settings', array(array('title' => __('General Options', 'wp-club-manager'), 'type' => 'title', 'desc' => '', 'id' => 'general_options'), array('title' => __('Sport', 'wp-club-manager'), 'desc' => __('Choose your sport. Your choice will determine the player stats that are available.', 'wp-club-manager'), 'id' => 'wpcm_sport', 'class' => 'chosen_select', 'css' => 'min-width:350px;', 'default' => 'soccer', 'type' => 'select', 'options' => $sports, 'desc_tip' => true), array('title' => __('Default Club', 'wp-club-manager'), 'desc' => __('This is the default club.', 'wp-club-manager'), 'id' => 'wpcm_default_club', 'css' => 'min-width:350px;', 'default' => '', 'type' => 'default_club', 'desc_tip' => true), array('title' => __('Base Location', 'wp-club-manager'), 'desc' => __('This is the base country for your club. Players nationality will default to this country.', 'wp-club-manager'), 'id' => 'wpcm_default_country', 'css' => 'min-width:350px;', 'default' => 'EN', 'type' => 'single_select_country', 'desc_tip' => true), array('title' => __('Hide Scores', 'wp-club-manager'), 'desc' => __('Check this box to hide scores from guests.', 'wp-club-manager'), 'id' => 'wpcm_hide_scores', 'default' => 'no', 'type' => 'checkbox'), array('type' => 'sectionend', 'id' => 'general_options'))); // End general settings }