本文整理汇总了PHP中rw_options函数的典型用法代码示例。如果您正苦于以下问题:PHP rw_options函数的具体用法?PHP rw_options怎么用?PHP rw_options使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了rw_options函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: rtrim
* @var RatingWidgetPlugin $rwp
*/
global $rw_fs, $rwp;
$rclass = rtrim(rw_settings_rating_type(), 's');
$has_multi_rating = ratingwidget()->has_multirating_options($rclass);
$multi_criterion = false;
if ($has_multi_rating) {
$multirating_options = ratingwidget()->get_multirating_options_by_class($rclass);
// Check if there are more than one criteria so that we can hide or show additional options
$total_criteria = count($multirating_options->criteria);
$multi_criterion = $total_criteria > 1;
if ($total_criteria > 3) {
$multirating_options->criteria = array_splice($multirating_options->criteria, 0, 3);
}
}
$options = rw_options();
$default_hide_recommendations = isset($options->hideRecommendations) ? $options->hideRecommendations : false;
$urid_summary_star = 1;
$urid_summary_nero = 2;
$add_label_str = __rw('add-label');
$add_criteria_str = __rw('add-criteria-rating');
?>
<div id="rw_wp_preview" class="postbox rw-body<?php
echo $multi_criterion ? ' multi-rating' : '';
echo ' rw-' . $options->advanced->layout->dir;
?>
">
<table cellpadding="0" cellspacing="0" style="float: right;height: 45px;">
<tr>
<td style="vertical-align: middle;">
<iframe
示例2: rw_options
<?php
$selected_size = rw_options()->size;
?>
<td class="rw-ui-def-width">
<span class="rw-ui-def"><?php
_erw('size');
?>
:</span>
</td>
<td>
<?php
$sizes = array('tiny' => __rw('tiny'), 'small' => __rw("small"), 'medium' => __rw("medium"), 'large' => __rw("large"));
$tab_index = 5;
foreach ($sizes as $size => $label) {
?>
<div class="rw-ui-img-radio<?php
if ($selected_size == $size) {
echo " rw-selected";
}
?>
" onclick="RWM.Set.size(RW.SIZE.<?php
echo strtoupper($size);
?>
);">
<i class="rw-ui-holder"><i
class="rw-ui-sprite rw-ui-star rw-ui-<?php
echo $size;
?>
rw-ui-yellow"></i></i>
<span><?php
示例3: rw_options
<?php
$frequency = rw_options()->frequency;
?>
<div id="rw_frequency_settings" class="has-sidebar has-right-sidebar">
<div class="has-sidebar-content">
<div class="postbox rw-body">
<h3><?php
_erw('voting-frequency-settings');
?>
</h3>
<div class="inside rw-ui-content-container rw-no-radius" style="padding: 5px; width: 610px;">
<?php
$frquencies = array(array('f' => 'ONCE', 'label' => __rw('once'), 'days' => -1, 'desc' => __rw('once_desc')), array('f' => 'DAILY', 'label' => __rw('daily'), 'days' => 1, 'desc' => __rw('daily_desc')), array('f' => 'WEEKLY', 'label' => __rw('weekly'), 'days' => 7, 'desc' => __rw('weekly_desc')), array('f' => 'MONTHLY', 'label' => __rw('monthly'), 'days' => 30, 'desc' => __rw('monthly_desc')), array('f' => 'YEARLY', 'label' => __rw('annually'), 'days' => 365, 'desc' => __rw('annually_desc')), array('f' => 'UNLIMITED', 'label' => __rw('unlimited'), 'days' => 0, 'desc' => __rw('unlimited_desc')));
?>
<select>
<?php
foreach ($frquencies as $f) {
$selected = $frequency == $f['days'];
?>
<option name="rw_frequency" data-frequency="<?php
echo $f['f'];
?>
"
value="<?php
echo $f['days'];
?>
" <?php
if ($selected) {
echo ' selected="selected"';
示例4: rw_options
<?php
$nero = rw_options()->advanced->nero;
?>
<table id="rw_nero_settings" cellspacing="0" style="display: none;">
<tr id="rw_nero_show" class="rw-odd">
<td class="rw-ui-def-width">
<span class="rw-ui-def">Show Thumbs:</span>
</td>
<td>
<div class="rw-ui-img-radio<?php
if ($nero->showLike) {
echo ' rw-selected';
}
?>
" onclick="rwStar.toggleLike(); rwNero.toggleLike();">
<i class="rw-ui-holder"><i class="rw-ui-sprite rw-ui-large rw-like"></i></i>
<span>Like</span>
<input type="checkbox" name="rw-nero-show-like" value="0"<?php
if ($nero->showLike) {
echo ' checked="checked"';
}
?>
/>
</div>
<div class="rw-ui-img-radio<?php
if ($nero->showDislike) {
echo ' rw-selected';
}
?>
" onclick="rwStar.toggleDislike(); rwNero.toggleDislike();">
示例5: rw_options
<?php
$font = rw_options()->advanced->font;
?>
<table id="rw_font_settings" cellspacing="0">
<tr id="rw_font_size" class="rw-odd">
<td>
<span class="rw-ui-def"><?php
_erw('size');
?>
:</span>
</td>
<td>
<select
onchange="rwStar.setFontSize(this.value + 'px'); rwNero.setFontSize(this.value + 'px'); RWM.Code.refresh();">
<?php
$font_sizes = array(6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 24, 30, 36);
foreach ($font_sizes as $size) {
echo '<option value="' . $size . '"' . ($size . "px" == $font->size ? ' selected="selected"' : '') . '>' . $size . 'px</option>';
}
?>
</select>
</td>
</tr>
<tr id="rw_font_color" class="rw-even">
<td>
<span class="rw-ui-def"><?php
_erw('color');
?>
:</span>
</td>
示例6: dirname
<table id="rw_text_settings" cellspacing="0" style="display: none;">
<?php
global $LNG_EN;
$odd = true;
$i = 0;
require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/languages/en.php';
$text = rw_options()->advanced->text;
foreach ($LNG_EN as $key => $en_val) {
?>
<tr id="rw_text_<?php
echo $key;
?>
" class="rw-<?php
echo $odd ? 'odd' : 'even';
?>
">
<td<?php
if ($i == 0) {
echo ' class="rw-ui-def-width"';
}
?>
>
<span class="rw-ui-def"><?php
echo $en_val;
?>
:</span>
</td>
<td>
<input onfocus="var e = this; setTimeout(function(){jQuery(e).select();}, 100);" onblur="RWM.Set.text('<?php
echo $key;
?>
示例7: rw_options
<?php
$readOnly = rw_options()->readOnly;
?>
<td class="rw-ui-def-width">
<span class="rw-ui-def">Read Only:</span>
</td>
<td>
<div class="rw-ui-img-radio<?php
if ($readOnly == false) {
echo ' rw-selected';
}
?>
" onclick="rwStar.setReadOnly(false); rwNero.setReadOnly(false);">
<i class="rw-ui-holder"><i class="rw-ui-sprite rw-ui-unlocked rw-ui-default"></i></i>
<span>Active</span>
<input type="radio" name="rw-readonly" value="star"<?php
if ($readOnly == false) {
echo ' checked="checked"';
}
?>
/>
</div>
<div class="rw-ui-img-radio<?php
if ($readOnly == true) {
echo ' rw-selected';
}
?>
" onclick="rwStar.setReadOnly(true); rwNero.setReadOnly(true);">
<i class="rw-ui-holder"><i class="rw-ui-sprite rw-ui-locked"></i></i>
<span>ReadOnly</span>
示例8: rw_options
<?php
$type = rw_options()->type;
?>
<td class="rw-ui-def-width">
<span class="rw-ui-def">Type:</span>
</td>
<td>
<div class="rw-ui-img-radio<?php
if ($type == 'star') {
echo ' rw-selected';
}
?>
" onclick="RWM.Set.type(RW.TYPE.STAR);">
<i class="rw-ui-holder"><i class="rw-ui-sprite rw-ui-large rw-ui-stars rw-ui-default"></i></i>
<span>Star</span>
<input type="radio" tabindex="2" name="rw-type" value="star"<?php
if ($type == 'star') {
echo ' checked="checked"';
}
?>
/>
</div>
<div class="rw-ui-img-radio<?php
if ($type == 'nero') {
echo ' rw-selected';
}
?>
" onclick="RWM.Set.type(RW.TYPE.NERO);">
<i class="rw-ui-holder"><i class="rw-ui-sprite rw-ui-large rw-ui-thumbup"></i></i>
<span>Thumbs</span>
示例9: rw_options
<?php
$container = rw_options()->advanced->css->container;
?>
<td class="rw-ui-def-width">
<span class="rw-ui-def"><?php
_erw('background');
?>
:</span>
</td>
<td>
<div class="rw-ui-img-radio<?php
if ($container !== '') {
echo ' rw-selected';
}
?>
" onclick="RWM.Set.background('buddy');">
<i class="rw-ui-holder"><i class="rw-ui-sprite rw-ui-buddy"></i></i>
<span>Buddy</span>
<input type="radio" name="rw-background" value="buddypress"<?php
if ($container !== '') {
echo ' checked="checked"';
}
?>
/>
</div>
<div class="rw-ui-img-radio<?php
if ($container === '') {
echo ' rw-selected';
}
?>
示例10: rw_options
<?php
$layout = rw_options()->advanced->layout;
?>
<table id="rw_layout_settings" cellspacing="0" style="display: none;">
<tr id="rw_layout_direction" class="rw-odd">
<td class="rw-ui-def-width">
<span class="rw-ui-def">Direction:</span>
</td>
<td>
<?php
$directions = array("ltr" => "Left to Right", "rtl" => "Right to Left");
foreach ($directions as $dir => $direction) {
$selected = strtolower($dir) == $layout->dir;
?>
<div class="rw-ui-img-radio<?php
if ($selected) {
echo ' rw-selected';
}
?>
" onclick="RWM.Set.direction(RW.DIR.<?php
echo strtoupper($dir);
?>
);">
<i class="rw-ui-holder"><i class="rw-ui-sprite rw-ui-large rw-ui-<?php
echo strtolower($dir);
?>
"></i></i>
<span><?php
echo $direction;
?>
示例11: dirname
<a>Advanced Settings</a>
</div>
<div id="rw_advanced_settings" style="display: none;">
<br />
<div class="rw-tabs rw-clearfix">
<div class="rw-selected">Font</div>
<div>Layout</div>
<div>Text</div>
<div id="rw_advanced_star_tab"<?php
if (rw_options()->type === 'nero') {
echo ' style="display: none;"';
}
?>
>Star</div>
<div id="rw_advanced_nero_tab"<?php
if (rw_options()->type === 'star') {
echo ' style="display: none;"';
}
?>
>Thumbs</div>
</div>
<div id="rw_advanced_settings_body" class="rw-clearfix">
<?php
require_once dirname(__FILE__) . '/advanced/font.php';
?>
<?php
require_once dirname(__FILE__) . '/advanced/layout.php';
?>
<?php
require_once dirname(__FILE__) . '/advanced/text.php';
?>
示例12: _erw
</div>
<div><?php
_erw('text');
?>
</div>
<div id="rw_advanced_star_tab"<?php
if (rw_options()->type === "nero") {
echo ' style="display: none;"';
}
?>
><?php
_erw('star');
?>
</div>
<div id="rw_advanced_nero_tab"<?php
if (rw_options()->type === "star") {
echo ' style="display: none;"';
}
?>
><?php
_erw('thumbs');
?>
</div>
</div>
<div id="rw_advanced_settings_body" class="rw-clearfix">
<?php
require_once dirname(__FILE__) . "/advanced/font.php";
?>
<?php
require_once dirname(__FILE__) . "/advanced/layout.php";
?>
示例13: rw_options
<?php
require_once WP_RW__PLUGIN_DIR . '/themes/dir.php';
require_once WP_RW__PLUGIN_DIR . '/lib/defaults.php';
require_once WP_RW__PLUGIN_DIR . '/lib/def_settings.php';
global $DEFAULT_OPTIONS;
$options_type = rw_options()->type;
$options_theme = rw_options()->theme;
?>
<td><span class="rw-ui-def">Theme:</span></td>
<td>
<img id="rw_theme_loader" src="<?php
echo WP_RW__ADDRESS_IMG;
?>
rw.loader.gif" alt="" />
<?php
global $RW_THEMES;
foreach ($RW_THEMES as $type => $type_themes) {
?>
<div id="rw_<?php
echo $type;
?>
_theme_select" class="rw-select" style="display: none;">
<select tabindex="4"><option></option></select>
<i class="rw-select-icon"></i>
<div class="rw-select-frame" style="display: none;"></div>
<div id="rw_<?php
echo $type;
?>
_theme_selected" class="rw-li rw-selected-item">
<?php
示例14: array
<table id="rw_star_settings" cellspacing="0" style="display: none;">
<tr id="rw_star_stars_number" class="rw-odd">
<td class="rw-ui-def-width">
<span class="rw-ui-def">Stars:</span>
</td>
<td>
<select onchange="rwStar.setStarsNum(this.value); RWM.Code.refresh();">
<?php
$stars = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20);
$stars_num = rw_options()->advanced->star->stars;
foreach ($stars as $num) {
echo '<option value="' . $num . '"' . ($num == $stars_num ? ' selected="selected"' : '') . '>' . $num . '</option>';
}
?>
</select>
</td>
</tr>
</table>