예제 #1
0
function taqyeem_options()
{
    ?>
<div id="save-alert"></div>
<div class="taqyeem-panel">
	
	<div class="taqyeem-panel-tabs">
		<a href="http://tielabs.com/" target="_blank" class="taqyeem-logo"></a>
		<ul>
			<li class="tie-tabs start"><a href="#tab0"><span class="dashicons-before dashicons-dashboard taq-icon-menu"></span><?php 
    _e('Start', 'taq');
    ?>
</a> </li>
			<li class="tie-tabs general"><a href="#tab1"><span class="dashicons-before dashicons-admin-settings taq-icon-menu"></span><?php 
    _e('General Settings', 'taq');
    ?>
</a></li>
			<li class="tie-tabs styling"><a href="#tab3"><span class="dashicons-before dashicons-admin-appearance taq-icon-menu"></span><?php 
    _e('Styling', 'taq');
    ?>
</a></li>
			<li class="tie-tabs typography"><a href="#tab4"><span class="dashicons-before dashicons-editor-italic taq-icon-menu"></span><?php 
    _e('Typography', 'taq');
    ?>
</a></li>

			<?php 
    do_action('tie_taqyeem_panel_tabs');
    ?>

			<li class="tie-tabs advanced"><a href="#tab5"><span class="dashicons-before dashicons-admin-tools taq-icon-menu"></span><?php 
    _e('Advanced Settings', 'taq');
    ?>
</a></li>
		</ul>
		<div class="clear"></div>
	</div> <!-- .taqyeem-panel-tabs -->
	
	<div class="taqyeem-panel-content">
	<form action="/" name="taqyeem_form" id="taqyeem_form">

	
		<div id="tab0" class="tab_content taq-tabs-wrap">
			<h2><?php 
    _e('Welcome to TAQYEEM!', 'taq');
    ?>
</h2>	<?php 
    //taq_save_button()
    ?>
	
			<div class="clear"></div>
			<h4><?php 
    _e('Thank you for purchasing the TAQYEEM plugin, a WordPress plugin by <a href="http://tielabs.com/" target="_blank">TieLabs</a>.', 'taq');
    ?>
</h4>
			<div class="clear"><br /></div>
			<div class="taqyeem_message_hint" style="float:left; width:42%;">
				<h3><?php 
    _e('Need Help?', 'taq');
    ?>
</h3>
				<ul>
					<li><a href="http://plugins.tielabs.com/docs/taqyeem/" target="_blank"><?php 
    _e('Plugin Docs', 'taq');
    ?>
</a></li>
					<li><a href="http://support.tielabs.com/forums/forum/wordpress-plugins/taqyeem" target="_blank"><?php 
    _e('Support', 'taq');
    ?>
</a></li>
				</ul>		
			</div>
			
			<div class="taqyeem_message_hint" style="float:left; width:42%;">
				<h3><?php 
    _e('Rate Taqyeem', 'taq');
    ?>
</h3>
				<?php 
    _e('If you like Taqyeem, please don’t forget to <a target="_blank" href="http://themeforest.net/downloads?ref=tielabs">rate it</a>', 'taq');
    ?>
			
			</div>
			
			<div class="clear"></div>
			<div class="taqyeem-item more-addons">
				<h3><?php 
    _e('Taqyeem Add-ons', 'taq');
    ?>
</h3>
				<?php 
    if ($addons_items = taqyeem_get_addons_rss()) {
        foreach ($addons_items as $item) {
            ?>
				<div class="taqyeem-option-item">
					<a href="<?php 
            echo $item->get_link();
            ?>
" target="_blank"><img src="<?php 
            echo html_entity_decode($item->get_description());
            ?>
"  alt="" /></a>
					<h4><a href="<?php 
            echo $item->get_link();
            ?>
" target="_blank"><?php 
            echo $item->get_title();
            ?>
</a></h4>
					<div class="addon-desc"><?php 
            echo html_entity_decode($item->get_content());
            ?>
</div>
					<a href="<?php 
            echo $item->get_link();
            ?>
" class="button button-primary button-small" target="_blank"><?php 
            _e('GET IT NOW', 'taq');
            ?>
</a>
				</div>
				<?php 
        }
    } else {
        echo '<div class="taqyeem-option-item">Error: Unable to fetch the data.</div>';
    }
    ?>
			</div>
			

		</div> <!-- Start -->
		
		<div id="tab1" class="taq-tabs-wrap">
			<h2><?php 
    _e('General Settings', 'taq');
    ?>
</h2> <?php 
    taq_save_button();
    ?>

			<div class="taqyeem-item">
				<h3><?php 
    _e('Show Review Boxes in the singular pages only ?', 'taq');
    ?>
</h3>
				<?php 
    taqyeem_option(array("name" => __('Enable in Single page only ?', 'taq'), "id" => "taq_singular", "type" => "checkbox"));
    ?>
				<p class="taqyeem_message_hint"><?php 
    _e("Enable it if your theme uses ' the_content() ' in homepage and archives pages and you want to show post review box in the single post page only !", "taq");
    ?>
</p>
			</div>
			
			<div class="taqyeem-item">
				<h3><?php 
    _e('Who Is Allowed To Rate ?', 'taq');
    ?>
</h3>
				<?php 
    taqyeem_option(array("name" => __('Who Is Allowed To Rate ?', 'taq'), "id" => "allowtorate", "type" => "radio", "options" => array("none" => __('No One !', 'taq'), "both" => __('Registered Users And Guests', 'taq'), "guests" => __('Guests Only', 'taq'), "users" => __('Registered Users Only', 'taq'))));
    ?>
									
			</div>
			<div class="taqyeem-item">
				<h3><?php 
    _e('Ratings Image', 'taq');
    ?>
</h3>
				<?php 
    taqyeem_option(array("name" => __('Ratings Image', 'taq'), "id" => "rating_image", "type" => "radio", "options" => array("stars" => "<img src='" . plugins_url('admin/images/stars.png', __FILE__) . "' alt='' />", "hearts" => "<img src='" . plugins_url('admin/images/hearts.png', __FILE__) . "' alt='' />", "thumbs" => "<img src='" . plugins_url('admin/images/thumbs.png', __FILE__) . "' alt='' />")));
    ?>
									
			</div>
		</div>
	
		<div id="tab3" class="tab_content taq-tabs-wrap">
			<h2><?php 
    _e('Styling', 'taq');
    ?>
</h2><?php 
    taq_save_button();
    ?>
	
		
			<div class="taqyeem-item">
				<h3><?php 
    _e('Styling', 'taq');
    ?>
</h3>
				<?php 
    taqyeem_option(array("name" => __('Review Box Outer Border', 'taq'), "id" => "review_bg", "type" => "color"));
    taqyeem_option(array("name" => __('Review Box Header & Footer Background', 'taq'), "id" => "review_main_color", "type" => "color"));
    taqyeem_option(array("name" => __('Review items Background', 'taq'), "id" => "review_items_color", "type" => "color"));
    taqyeem_option(array("name" => __('Final Score and percentage bar Background', 'taq'), "id" => "review_secondery_color", "type" => "color"));
    taqyeem_option(array("name" => __('Links Color', 'taq'), "id" => "review_links_color", "type" => "color"));
    taqyeem_option(array("name" => __('Links Decoration', 'taq'), "id" => "review_links_decoration", "type" => "select", "options" => array("" => "Default", "none" => "none", "underline" => "underline", "overline" => "overline", "line-through" => "line-through")));
    taqyeem_option(array("name" => __('Links Color on mouse over', 'taq'), "id" => "review_links_color_hover", "type" => "color"));
    taqyeem_option(array("name" => __('Links Decoration on mouse over', 'taq'), "id" => "review_links_decoration_hover", "type" => "select", "options" => array("" => "Default", "none" => "none", "underline" => "underline", "overline" => "overline", "line-through" => "line-through")));
    do_action('tie_taqyeem_panel_styling');
    ?>
			</div>
		
			<div class="taqyeem-item">
				<h3><?php 
    _e('Custom CSS', 'taq');
    ?>
</h3>	
				<div class="taqyeem-option-item">
					<p><strong><?php 
    _e('Global CSS :', 'taq');
    ?>
</strong></p>
					<textarea id="tie_css" name="taqyeem_options[css]" style="width:100%" rows="7"><?php 
    echo taqyeem_get_option('css');
    ?>
</textarea>
				</div>	
				<div class="taqyeem-option-item">
					<p><strong><?php 
    _e('Tablets CSS :', 'taq');
    ?>
</strong> <?php 
    _e('Width from 768px to 985px', 'taq');
    ?>
</p>
					<textarea id="tie_css" name="taqyeem_options[css_tablets]" style="width:100%" rows="7"><?php 
    echo taqyeem_get_option('css_tablets');
    ?>
</textarea>
				</div>
				<div class="taqyeem-option-item">
					<p><strong><?php 
    _e('Wide Phones CSS :', 'taq');
    ?>
</strong> <?php 
    _e('Width from 480px to 767px', 'taq');
    ?>
</p>
					<textarea id="tie_css" name="taqyeem_options[css_wide_phones]" style="width:100%" rows="7"><?php 
    echo taqyeem_get_option('css_wide_phones');
    ?>
</textarea>
				</div>
				<div class="taqyeem-option-item">
					<p><strong><?php 
    _e('Phones CSS :', 'taq');
    ?>
</strong><?php 
    _e('Width from 320px to 479px', 'taq');
    ?>
</p>
					<textarea id="tie_css" name="taqyeem_options[css_phones]" style="width:100%" rows="7"><?php 
    echo taqyeem_get_option('css_phones');
    ?>
</textarea>
				</div>	
			</div>	

		</div> <!-- Styling -->

		<?php 
    do_action('tie_taqyeem_panel_tabs_content');
    ?>

					
		<div id="tab4" class="tab_content taq-tabs-wrap">
			<h2><?php 
    _e('Typography', 'taq');
    ?>
</h2>	<?php 
    taq_save_button();
    ?>
	
			
			<div class="taqyeem-item">
				<h3><?php 
    _e('Character sets', 'taq');
    ?>
</h3>
				<p class="taqyeem_message_hint"><?php 
    _e("<strong>Tip:</strong> If you choose only the languages that you need, you'll help prevent slowness on your webpage.", "taq");
    ?>
</p>
				<?php 
    taqyeem_option(array("name" => __('Latin Extended', 'taq'), "id" => "typography_latin_extended", "type" => "checkbox"));
    taqyeem_option(array("name" => __('Cyrillic', 'taq'), "id" => "typography_cyrillic", "type" => "checkbox"));
    taqyeem_option(array("name" => __('Cyrillic Extended', 'taq'), "id" => "typography_cyrillic_extended", "type" => "checkbox"));
    taqyeem_option(array("name" => __('Greek', 'taq'), "id" => "typography_greek", "type" => "checkbox"));
    taqyeem_option(array("name" => __('Greek Extended', 'taq'), "id" => "typography_greek_extended", "type" => "checkbox"));
    ?>
			</div>
			
			<div class="taqyeem-item">
				<h3><?php 
    _e('Typography', 'taq');
    ?>
</h3>
				<?php 
    taqyeem_option(array("name" => __('Review Box Title', 'taq'), "id" => "review_typography_title", "type" => "typography"));
    taqyeem_option(array("name" => __('Review Items', 'taq'), "id" => "review_typography_items", "type" => "typography"));
    taqyeem_option(array("name" => __('Review Summary', 'taq'), "id" => "review_typography_summery", "type" => "typography"));
    taqyeem_option(array("name" => __('Total Score', 'taq'), "id" => "review_typography_total", "type" => "typography"));
    taqyeem_option(array("name" => __('Final opinion Text', 'taq'), "id" => "review_typography_final", "type" => "typography"));
    taqyeem_option(array("name" => __('User Rating', 'taq'), "id" => "review_user_rate", "type" => "typography"));
    ?>
			</div>

		</div> <!-- Typography -->
		
		<div id="tab5" class="tab_content taq-tabs-wrap">
			<h2><?php 
    _e('Advanced Settings', 'taq');
    ?>
</h2>	<?php 
    taq_save_button();
    ?>
	

			<?php 
    $current_taqyeem_options = get_option('taqyeem_options');
    ?>
			
			<div class="taqyeem-item">
				<h3><?php 
    _e('Export', 'taq');
    ?>
</h3>
				<div class="taqyeem-option-item">
					<textarea style="width:100%" rows="7"><?php 
    echo $currentsettings = base64_encode(serialize($current_taqyeem_options));
    ?>
</textarea>
				</div>
			</div>
			<div class="taqyeem-item">
				<h3><?php 
    _e('Import', 'taq');
    ?>
</h3>
				<div class="taqyeem-option-item">
					<textarea id="taqyeem_import" name="taqyeem_import" style="width:100%" rows="7"></textarea>
				</div>
			</div>
	
		</div> <!-- Advanced -->

		
		<div class="taqyeem-footer">
			<?php 
    taq_save_button();
    ?>
		</form>

			<form method="post">
				<div class="taqyeem-reset">
					<input type="hidden" name="resetnonce" value="<?php 
    echo wp_create_nonce('reset-action-taqyeem');
    ?>
" />
					<input name="reset" class="taqyeem-reset-button button button-primary button-large" type="submit" onClick="if(confirm('<?php 
    _e('All settings will be reset .. Are you sure ?', 'taq');
    ?>
')) return true ; else return false; " value="<?php 
    _e('Reset Settings', 'taq');
    ?>
" />
					<input type="hidden" name="action" value="reset" />
				</div>
			</form>
		</div>

	</div><!-- .taqyeem-panel-content -->
</div><!-- .taqyeem-panel -->

<?php 
}
예제 #2
0
function tie_taqyeem_buttons_panel_tab_content()
{
    ?>
<div id="taq-button-tab" class="tab_content taq-tabs-wrap">
	<h2><?php 
    _e('Buttons Settings', 'taq');
    ?>
</h2> <?php 
    taq_save_button();
    ?>
		
	<div class="taqyeem-item">
		<h3><?php 
    _e("FontAwesome Icons", "taq");
    ?>
</h3>
		<?php 
    taqyeem_option(array("name" => __("Don't include the FontAwesome icon set files", "taq"), "id" => "taq_button_disable_fontawesome", "type" => "checkbox"));
    ?>
		<p class="taqyeem_message_hint"><?php 
    _e("Enable this option if your theme already includes it.", "taq");
    ?>
</p>
	</div>
</div> <!-- Buttons Settings -->
<?php 
}
예제 #3
0
function tie_pre_defined_criteria_panel_tab_content()
{
    ?>
<div id="tab15" class="tab_content taq-tabs-wrap">
	<h2><?php 
    _e('Predefined Criteria', 'taq');
    ?>
</h2> <?php 
    taq_save_button();
    ?>
		
	<div class="clear"></div>
	<input id="add_review_criteria_group" type="button" class="button" value="<?php 
    _e('Add New Review Criteria Set', 'taq');
    ?>
">
	<div id="taqyeem-reviews-criteria-group">
		<?php 
    $i = 0;
    $groups_data = get_option('taqyeem_options');
    $groups_data = $groups_data['group'];
    if (!empty($groups_data) && is_array($groups_data)) {
        foreach ($groups_data as $group) {
            $i++;
            ?>
		<div data-gropid="<?php 
            echo $i;
            ?>
" class="taqyeem-item">
			<h3><?php 
            echo $group['title'];
            ?>
</h3>
			<input type="hidden" name="taqyeem_options[group][<?php 
            echo $i;
            ?>
][title]" value="<?php 
            echo $group['title'];
            ?>
" />
			<a class="del-review del-group" title="<?php 
            _e('Delete', 'taq');
            ?>
"><?php 
            _e('Delete', 'taq');
            ?>
</a>
			<ul class="taq-reviews-group">
				<?php 
            if (!empty($group['criteria']) && is_array($group['criteria'])) {
                foreach ($group['criteria'] as $criteria_name) {
                    ?>
				<li class="taqyeem-option-item taqyeem-review-item">
					<span class="label"><?php 
                    _e('Review Criteria', 'taq');
                    ?>
</span>
					<input name="taqyeem_options[group][<?php 
                    echo $i;
                    ?>
][criteria][]" type="text" value="<?php 
                    echo $criteria_name;
                    ?>
">
					<a class="del-review del-group" title="<?php 
                    _e('Delete', 'taq');
                    ?>
"></a>
				</li>
				<?php 
                }
            }
            ?>
			</ul>
			<input type="button" class="button add_review_criteria_item_in_group" value="<?php 
            _e('Add Another Review Criteria', 'taq');
            ?>
">
		</div>
		<?php 
        }
    }
    ?>
		<script>var nextGroup = <?php 
    echo $i + 1;
    ?>
 ;</script>
	</div>
</div> <!-- Pre-defined Criteria -->
<?php 
}