функция
since 3.5.0
options_reading_add_js()
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
options_reading_add_js()
Описание
Выводит JavaScript на странице.
Исходный код
wp-admin/includes/options.php:113
function options_reading_add_js() {
?>
<script>
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
}
История изменений
| Версия | Описание |
|---|---|
| 3.5.0 | Introduced. |

