0
$checkbox_field = "<select name='subscribe-reloaded' id='subscribe-reloaded'>
                <option value='none'>".__("Don't subscribe",'subscribe-reloaded')."</option>
                <option value='yes'".((get_option('subscribe_reloaded_checked_by_default', 'no') == 'yes')?" selected='selected'":'').">".__('All','subscribe-reloaded')."</option>
                <option value='replies'>".__('Replies to my comments','subscribe-reloaded')."</option>
                <!-- option value='digest'>".__('Daily digest','subscribe-reloaded')."</option -->
            </select>";

これは私が使用しているプラ​​グインで、デフォルトで「ALL」になります。「コメントのみに返信」をデフォルトにする方法がわかりません。

4

4 に答える 4

2

これを試して:

$checkbox_field = "<select name='subscribe-reloaded' id='subscribe-reloaded'>
                <option value='none'>".__("Don't subscribe",'subscribe-reloaded')."</option>
                <option value='yes'>".__('All','subscribe-reloaded')."</option>
                <option value='replies'".((get_option('subscribe_reloaded_checked_by_default', 'no') == 'replies')?" selected='selected'":'').">".__('Replies to my comments','subscribe-reloaded')."</option>
                <!-- option value='digest'>".__('Daily digest','subscribe-reloaded')."</option -->
            </select>";
于 2012-09-17T12:55:09.213 に答える
1
$checkbox_field = "<select name='subscribe-reloaded' id='subscribe-reloaded'> 
            <option value='none'>".__("Don't subscribe",'subscribe-reloaded')."</option> 
            <option value='yes'>".__('All','subscribe-reloaded')."</option> 
            <option value='replies'".((get_option('subscribe_reloaded_checked_by_default', 'no') == 'yes')?" selected='selected'":'').">".__('Replies to my comments','subscribe-reloaded')."</option> 
            <!-- option value='digest'>".__('Daily digest','subscribe-reloaded')."</option --> 
        </select>"; 

他のすべてが正しく、意図したとおりに機能すると仮定して、選択したロジックを1つ下に移動しました

于 2012-09-17T12:57:29.130 に答える
0
$checkbox_field = "<select name='subscribe-reloaded' id='subscribe-reloaded'>
            <option value='none'>".__("Don't subscribe",'subscribe-reloaded')."</option>
            <option value='yes'".((get_option('subscribe_reloaded_checked_by_default', 'no') == 'yes')?" selected='selected'":'').">".__('All','subscribe-reloaded')."</option>
            <option value='replies' selected>".__('Replies to my comments','subscribe-reloaded')."</option>
            <!-- option value='digest'>".__('Daily digest','subscribe-reloaded')."</option -->
        </select>";
于 2012-09-17T12:55:52.587 に答える
0

ALL行にあるコードを取得し、代わりにもう一方の行に配置します...

$checkbox_field = "<select name='subscribe-reloaded' id='subscribe-reloaded'>
                <option value='none'>".__("Don't subscribe",'subscribe-reloaded')."</option>
                <option value='yes'>".__('All','subscribe-reloaded')."</option>
                <option value='replies'".((get_option('subscribe_reloaded_checked_by_default', 'no') == 'yes')?" selected='selected'":'').">".__('Replies to my comments','subscribe-reloaded')."</option>
                <!-- option value='digest'>".__('Daily digest','subscribe-reloaded')."</option -->
            </select>";
于 2012-09-17T12:56:12.197 に答える