@@ -11,6 +11,7 @@ function disableauthors_settings_init( ) {
1111 register_setting ('disableauthors ' , 'disableauthors_default_name ' , array ( 'default ' => 'Anonymous ' ));
1212 register_setting ('disableauthors ' , 'disableauthors_disable_feed ' , array ( 'default ' => true ));
1313 register_setting ('disableauthors ' , 'disableauthors_disable_author_pages ' , array ( 'default ' => true ));
14+ register_setting ('disableauthors ' , 'disableauthors_yoast ' , array ( 'default ' => true ));
1415
1516 add_settings_section (
1617 'disableauthors_pluginPage_settings_section ' ,
@@ -36,7 +37,14 @@ function disableauthors_settings_init( ) {
3637 add_settings_field (
3738 'disable-author-pages ' ,
3839 __ ('Disable Author Pages ' , 'disableauthors ' ),
39- 'disableauthors_field_default_disable_author_pages ' ,
40+ 'disableauthors_field_disable_author_pages ' ,
41+ 'disableauthors ' ,
42+ 'disableauthors_pluginPage_settings_section '
43+ );
44+ add_settings_field (
45+ 'disable-author-yoast ' ,
46+ __ ('Patch Yoast (wordpress-seo) ' , 'disableauthors ' ),
47+ 'disableauthors_field_yoast ' ,
4048 'disableauthors ' ,
4149 'disableauthors_pluginPage_settings_section '
4250 );
@@ -59,7 +67,7 @@ function disableauthors_field_disable_feed_render() {
5967 <?php
6068}
6169
62- function disableauthors_field_default_disable_author_pages () {
70+ function disableauthors_field_disable_author_pages () {
6371 $ option = get_option ('disableauthors_disable_author_pages ' , 'on ' );
6472 $ checked = $ option === 'on ' ;
6573 ?>
@@ -68,6 +76,15 @@ function disableauthors_field_default_disable_author_pages() {
6876 <?php
6977}
7078
79+ function disableauthors_field_yoast () {
80+ $ option = get_option ('disableauthors_yoast ' , 'on ' );
81+ $ checked = $ option === 'on ' ;
82+ ?>
83+ <label><input type="checkbox" name='disableauthors_yoast' <?php checked ($ checked ); ?> /> <?php esc_html_e ('Patch Yoast (wordpress-seo) plugin? ' , 'disableauthors ' ); ?> </label>
84+ <p><?php esc_html_e ('Customizes Yoast to not output author details. Primarily affects ld+json output and may have an impact on seo. ' , 'disableauthors ' ); ?> </p>
85+ <?php
86+ }
87+
7188function disableauthors_options_page () {
7289 ?>
7390 <form action='options.php' method='post'>
0 commit comments