函数原型
options_reading_add_js()
函数描述
Display JavaScript on the page.
是否弃用
未弃用
函数参数
无
函数返回值
无
函数位置
File: wp-admin/includes/options.php.
函数源码
function options_reading_add_js() {
?>
<script type="text/javascript">
jQuery( function($) {
var section = $('#front-static-pages'),
staticPage = section.find('input:radio[value="page"]'),
selects = section.find('select'),
check_disabled = function(){
selects.prop( 'disabled', ! staticPage.prop('checked') );
};
check_disabled();
section.find( 'input:radio' ).on( 'change', check_disabled );
} );
</script>
<?php
}
源码链接
变更日志
| Version | Description |
|---|---|
| 3.5.0 | Introduced. |

