
如何提升WordPress站内搜索速度及结果准确率
use_ssl_preference ( $user )
use_ssl_preference: 这个函数检查用户是否设置了在网站上使用SSL的偏好。
可选的SSL偏好,可以通过挂钩’personal_options’动作来开启。
参见{@see ‘personal_options’}动作。
function use_ssl_preference( $user ) { ?> <tr class="user-use-ssl-wrap"> <th scope="row"><?php _e( 'Use https' ); ?></th> <td><label for="use_ssl"><input name="use_ssl" type="checkbox" id="use_ssl" value="1" <?php checked( '1', $user->use_ssl ); ?> /> <?php _e( 'Always use https when visiting the admin' ); ?></label></td> </tr> <?php }