User: ritz Date: 18/9/14 Time: 5:05 PM
예제 #1
0
    static function render_license($page = '')
    {
        self::$page = $page;
        $tabs = apply_filters('rtmedia_license_tabs', array());
        $addon_installed = false;
        if (!empty($tabs) && is_array($tabs)) {
            $addon_installed = true;
            /**
             * Grid layout for addon license keys
             * Design Credits: Pippin Williamson (https://easydigitaldownloads.com/)
             */
            ?>
			<form method="post" class="license-form">
				<div id="rtm-licenses" class="license-row">
					<?php 
            foreach ($tabs as $key => $tab) {
                self::render_license_section(self::$page, $tab);
            }
            ?>
				</div>
				<div class="rtml-submit-wrapper">
					<?php 
            submit_button('Save Changes');
            ?>
				</div>
			</form>
			<?php 
        }
        // For add-on which aren't updated with the latest code
        if (did_action('rtmedia_addon_license_details')) {
            $addon_installed = true;
            ?>
			<div id="rtm-licenses" class="license-row">
				<?php 
            do_action('rtmedia_addon_license_details');
            ?>
			</div>
			<?php 
        }
        if (!$addon_installed) {
            ?>
			<div class="rtm-license-404"><?php 
            esc_html_e('You may be interested in', 'buddypress-media');
            ?>
 <a href="<?php 
            echo esc_url(admin_url('admin.php?page=rtmedia-addons'));
            ?>
"><?php 
            esc_html_e('rtMedia Addons', 'buddypress-media');
            ?>
</a>.</div>
			<?php 
        }
    }
예제 #2
0
    static function render_license($page = '')
    {
        self::$page = $page;
        global $wp_actions;
        $tabs = apply_filters('rtmedia_license_tabs', array());
        $addon_installed = false;
        if (!empty($tabs) && is_array($tabs)) {
            $addon_installed = true;
            foreach ($tabs as $key => $tab) {
                $tabs[$key]['callback'] = array('RTMediaLicense', 'render_license_section');
            }
            ?>
			<div id="rtm-licenses">
				<?php 
            RTMediaAdmin::render_admin_ui(self::$page, $tabs);
            ?>
			</div>
			<?php 
        }
        // For add-on which aren't updated with the latest code
        if (did_action('rtmedia_addon_license_details')) {
            $addon_installed = true;
            ?>
			<div id="rtm-licenses">
				<?php 
            do_action('rtmedia_addon_license_details');
            ?>
			</div>
			<?php 
        }
        if (!$addon_installed) {
            ?>
			<div class="rtm-license-404">You may be interested in <a href="<?php 
            echo admin_url('admin.php?page=rtmedia-addons');
            ?>
">rtMedia Addons</a>.</div>
			<?php 
        }
    }
예제 #3
0
        /**
         * Render BPMedia Settings.
         *
         * @access public
         * @global      string 'buddypress-media'
         *
         * @param  type $page
         * @param  type $option_group
         *
         * @return void
         */
        public function render_page($page, $option_group = null)
        {
            ?>

			<div class="wrap bp-media-admin <?php 
            echo $this->get_current_tab();
            ?>
">
				<div id="icon-buddypress-media" class="icon32"><br></div>
				<div>
					<h2 class="nav-tab-wrapper"><?php 
            $this->rtmedia_tabs();
            ?>
						<span class="alignright by">
							<a class="rt-link" href="http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media" target="_blank" title="rtCamp : <?php 
            esc_html_e('Empowering The Web With WordPress', 'buddypress-media');
            ?>
">
								<img src="<?php 
            echo RTMEDIA_URL;
            ?>
app/assets/admin/img/rtcamp-logo.png" alt="rtCamp" />
							</a>
						</span>
					</h2>
				</div>

				<div class="clearfix rtm-row-container">

					<div id="bp-media-settings-boxes" class="bp-media-settings-boxes-container rtm-setting-container">

						<?php 
            $settings_url = is_multisite() ? network_admin_url('edit.php?action=' . $option_group) : 'options.php';
            if ($page == 'rtmedia-settings') {
                ?>
							<form id="bp_media_settings_form" name="bp_media_settings_form" method="post"
								  enctype="multipart/form-data">
								<div class="bp-media-metabox-holder">
									<div class="rtm-button-container top">
										<?php 
                if (isset($_GET['settings-saved']) && $_GET['settings-saved']) {
                    ?>
											<div class="rtm-success rtm-fly-warning rtm-save-settings-msg"><?php 
                    esc_html_e('Settings saved successfully!', 'buddypress-media');
                    ?>
</div>
										<?php 
                }
                ?>
										<input type="hidden" name="rtmedia-options-save" value="true">
										<input type="submit" class="rtmedia-settings-submit button button-primary button-big" value="<?php 
                esc_html_e('Save Settings', 'buddypress-media');
                ?>
">
									</div>
									<?php 
                settings_fields($option_group);
                if ('rtmedia-settings' == $page) {
                    echo '<div id="rtm-settings-tabs">';
                    $sub_tabs = $this->settings_sub_tabs();
                    RTMediaFormHandler::rtForm_settings_tabs_content($page, $sub_tabs);
                    echo '</div>';
                } else {
                    do_settings_sections($page);
                }
                ?>

									<div class="rtm-button-container bottom">
										<div class="rtm-social-links alignleft">
											<a href="http://twitter.com/rtcamp" class="twitter" target= "_blank"><span class="dashicons dashicons-twitter"></span></a>
											<a href="https://www.facebook.com/rtCamp.solutions" class="facebook" target="_blank"><span class="dashicons dashicons-facebook"></span></a>
											<a href="http://profiles.wordpress.org/rtcamp" class="wordpress" target= "_blank"><span class="dashicons dashicons-wordpress"></span></a>
											<a href="https://rtcamp.com/feed" class="rss" target="_blank"><span class="dashicons dashicons-rss"></span></a>
										</div>

										<input type="hidden" name="rtmedia-options-save" value="true">
										<input type="submit" class="rtmedia-settings-submit button button-primary button-big" value="<?php 
                esc_html_e('Save Settings', 'buddypress-media');
                ?>
">
									</div>
								</div>
							</form><?php 
            } else {
                ?>
							<div class="bp-media-metabox-holder">
								<?php 
                if ('rtmedia-addons' == $page) {
                    RTMediaAddon::render_addons($page);
                } else {
                    if ('rtmedia-support' == $page) {
                        $rtmedia_support = new RTMediaSupport(false);
                        $rtmedia_support->render_support($page);
                    } else {
                        if ('rtmedia-themes' == $page) {
                            RTMediaThemes::render_themes($page);
                        } else {
                            if ('rtmedia-license' == $page) {
                                RTMediaLicense::render_license($page);
                            } else {
                                do_settings_sections($page);
                            }
                        }
                    }
                }
                do_action('rtmedia_admin_page_insert', $page);
                ?>
							</div>
							<?php 
                do_action('rtmedia_admin_page_append', $page);
            }
            ?>
					</div>

					<div class="metabox-holder bp-media-metabox-holder rtm-sidebar">
						<?php 
            $this->admin_sidebar();
            ?>
					</div>

				</div>

			</div><!-- .bp-media-admin --><?php 
        }
예제 #4
0
        /**
         * Render BPMedia Settings.
         *
         * @access public
         * @global      string 'rtmedia'
         *
         * @param  type $page
         * @param  type $option_group
         *
         * @return void
         */
        public function render_page($page, $option_group = null)
        {
            ?>

			<div class="wrap bp-media-admin <?php 
            echo $this->get_current_tab();
            ?>
">
				<div id="icon-buddypress-media" class="icon32"><br></div>
				<div>
					<h2 class="nav-tab-wrapper"><?php 
            $this->rtmedia_tabs();
            ?>
						<span class="alignright by">
							<a class="rt-link" href="http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media" target="_blank" title="rtCamp : <?php 
            _e('Empowering The Web With WordPress', 'rtmedia');
            ?>
">
								<img src="<?php 
            echo RTMEDIA_URL;
            ?>
app/assets/img/rtcamp-logo.png">
							</a>
						</span>
					</h2>
				</div>

				<div class="row bp-media-settings-boxes-container">
					<div id="bp-media-settings-boxes" class="columns large-9">

			<?php 
            $settings_url = is_multisite() ? network_admin_url('edit.php?action=' . $option_group) : 'options.php';
            if ($option_group) {
                //$option_group if ($page == "bp-media-settings") action="<?php echo $settings_url;
                ?>
							<form id="bp_media_settings_form" name="bp_media_settings_form" method="post"
								  enctype="multipart/form-data">
							<div class="bp-media-metabox-holder">
				<?php 
                settings_fields($option_group);
                if ('rtmedia-settings' == $page) {
                    echo '<div id="rtm-settings-tabs">';
                    $sub_tabs = $this->settings_sub_tabs();
                    RTMediaFormHandler::rtForm_settings_tabs_content($page, $sub_tabs);
                    echo '</div>';
                } else {
                    do_settings_sections($page);
                }
                ?>
								<div class="clearfix">&nbsp;</div>
								<div class="row">
									<input type="hidden" name="rtmedia-options-save" value="true">
									<input type="submit" id="rtmedia-settings-submit" class="rtmedia-settings-submit button button-primary button-big" value="<?php 
                _e('Save Settings', 'rtmedia');
                ?>
">
								</div>
							</div>
							</form><?php 
            } else {
                ?>
							<div class="bp-media-metabox-holder">
				<?php 
                if ('rtmedia-addons' == $page) {
                    RTMediaAddon::render_addons($page);
                } else {
                    if ('rtmedia-support' == $page) {
                        $rtmedia_support = new RTMediaSupport(false);
                        $rtmedia_support->render_support($page);
                    } else {
                        if ('rtmedia-themes' == $page) {
                            RTMediaThemes::render_themes($page);
                        } else {
                            if ('rtmedia-license' == $page) {
                                RTMediaLicense::render_license($page);
                            } else {
                                do_settings_sections($page);
                            }
                        }
                    }
                }
                do_action('rtmedia_admin_page_insert', $page);
                ?>
							</div>
				<?php 
                do_action('rtmedia_admin_page_append', $page);
            }
            ?>
					</div>
					<!-- .bp-media-settings-boxes -->
					<div class="metabox-holder bp-media-metabox-holder columns large-3">
						<?php 
            $this->admin_sidebar();
            ?>
					</div>
				</div>
				<!-- .metabox-holder -->
			</div><!-- .bp-media-admin --><?php 
        }