| @@ -283,8 +283,12 @@ | ||
| 283 | 283 | 'enable_breadcrumb_category' => true, |
| 284 | 284 | 'enable_breadcrumb_title' => true, |
| 285 | 285 | 'enable_sidebar_cat_list' => true, |
| 286 | 286 | 'enable_print_icon' => true, |
| 287 | + 'print_enable_logo' => false, | |
| 288 | + 'print_logo' => array(), | |
| 289 | + 'print_enable_footer' => false, | |
| 290 | + 'print_footer_text' => '', | |
| 287 | 291 | 'enable_tags' => true, |
| 288 | 292 | 'email_feedback' => true, |
| 289 | 293 | 'feedback_link_text' => __( 'Still stuck? How can we help?', 'betterdocs' ), |
| 290 | 294 | 'reaction_feedback_text' => __( 'Thanks for your feedback', 'betterdocs' ), |
| @@ -343,9 +347,21 @@ | ||
| 343 | 347 | 'singular_estimated_reading_time_text' => __( 'min read', 'betterdocs' ), |
| 344 | 348 | 'betterdocs_access_control_repeater' => array(), |
| 345 | 349 | 'internal_knowledge_base_type' => 'basic', |
| 346 | 350 | 'betterdocs_access_control_repeater_kb' => array(), |
| 347 | - 'enable_git_integration' => false | |
| 351 | + 'enable_git_integration' => false, | |
| 352 | + /** | |
| 353 | + * MCP master switch. Off by default; the toggle lives on the | |
| 354 | + * BetterDocs → MCP page, not in the settings tree, and writes | |
| 355 | + * through POST betterdocs/v1/settings. | |
| 356 | + * | |
| 357 | + * The key has to be listed here or `get()` cannot see it at all: | |
| 358 | + * it answers `$default` for anything absent from the defaults | |
| 359 | + * array, whatever the stored option holds. | |
| 360 | + * | |
| 361 | + * @since 4.9.0 | |
| 362 | + */ | |
| 363 | + 'enable_mcp' => '' | |
| 348 | 364 | ); |
| 349 | 365 | |
| 350 | 366 | $_default = apply_filters( 'betterdocs_default_settings', $_default ); |
| 351 | 367 | // $_default = apply_filters_deprecated( |
| @@ -1384,8 +1400,44 @@ | ||
| 1384 | 1400 | 'enable_disable_text_active' => true, |
| 1385 | 1401 | 'default' => 1, |
| 1386 | 1402 | 'priority' => 3 |
| 1387 | 1403 | ), |
| 1404 | + 'print_enable_logo' => array( | |
| 1405 | + 'name' => 'print_enable_logo', | |
| 1406 | + 'type' => 'toggle', | |
| 1407 | + 'label' => __( 'Logo on Printed Doc', 'betterdocs' ), | |
| 1408 | + 'label_subtitle' => __( 'Show a logo at the top of the printed / PDF page', 'betterdocs' ), | |
| 1409 | + 'enable_disable_text_active' => true, | |
| 1410 | + 'default' => 0, | |
| 1411 | + 'priority' => 4 | |
| 1412 | + ), | |
| 1413 | + 'print_logo' => array( | |
| 1414 | + 'name' => 'print_logo', | |
| 1415 | + 'type' => 'media', | |
| 1416 | + 'value' => '', | |
| 1417 | + 'label' => __( 'Print Logo', 'betterdocs' ), | |
| 1418 | + 'label_subtitle' => __( 'Leave empty to use your site logo, or the site icon when no site logo is set', 'betterdocs' ), | |
| 1419 | + 'priority' => 5, | |
| 1420 | + 'rules' => Rules::is( 'print_enable_logo', true ) | |
| 1421 | + ), | |
| 1422 | + 'print_enable_footer' => array( | |
| 1423 | + 'name' => 'print_enable_footer', | |
| 1424 | + 'type' => 'toggle', | |
| 1425 | + 'label' => __( 'Footer on Printed Doc', 'betterdocs' ), | |
| 1426 | + 'label_subtitle' => __( 'Show a footer on every page of the printed / PDF document', 'betterdocs' ), | |
| 1427 | + 'enable_disable_text_active' => true, | |
| 1428 | + 'default' => 0, | |
| 1429 | + 'priority' => 6 | |
| 1430 | + ), | |
| 1431 | + 'print_footer_text' => array( | |
| 1432 | + 'name' => 'print_footer_text', | |
| 1433 | + 'type' => 'textarea', | |
| 1434 | + 'label' => __( 'Print Footer Text', 'betterdocs' ), | |
| 1435 | + 'label_subtitle' => __( 'Leave empty to use the site name and current year', 'betterdocs' ), | |
| 1436 | + 'default' => '', | |
| 1437 | + 'priority' => 7, | |
| 1438 | + 'rules' => Rules::is( 'print_enable_footer', true ) | |
| 1439 | + ), | |
| 1388 | 1440 | 'enable_tags' => array( |
| 1389 | 1441 | 'name' => 'enable_tags', |
| 1390 | 1442 | 'type' => 'toggle', |
| 1391 | 1443 | 'label' => __( 'Tags', 'betterdocs' ), |
| @@ -1390,9 +1442,9 @@ | ||
| 1390 | 1442 | 'type' => 'toggle', |
| 1391 | 1443 | 'label' => __( 'Tags', 'betterdocs' ), |
| 1392 | 1444 | 'enable_disable_text_active' => true, |
| 1393 | 1445 | 'default' => 1, |
| 1394 | - 'priority' => 4 | |
| 1446 | + 'priority' => 8 | |
| 1395 | 1447 | ), |
| 1396 | 1448 | 'show_last_update_time' => array( |
| 1397 | 1449 | 'name' => 'show_last_update_time', |
| 1398 | 1450 | 'type' => 'toggle', |
| @@ -1398,9 +1450,9 @@ | ||
| 1398 | 1450 | 'type' => 'toggle', |
| 1399 | 1451 | 'label' => __( 'Last Update Time', 'betterdocs' ), |
| 1400 | 1452 | 'enable_disable_text_active' => true, |
| 1401 | 1453 | 'default' => 1, |
| 1402 | - 'priority' => 5 | |
| 1454 | + 'priority' => 9 | |
| 1403 | 1455 | ), |
| 1404 | 1456 | 'enable_navigation' => array( |
| 1405 | 1457 | 'name' => 'enable_navigation', |
| 1406 | 1458 | 'type' => 'toggle', |
| @@ -1406,9 +1458,9 @@ | ||
| 1406 | 1458 | 'type' => 'toggle', |
| 1407 | 1459 | 'label' => __( 'Navigation', 'betterdocs' ), |
| 1408 | 1460 | 'enable_disable_text_active' => true, |
| 1409 | 1461 | 'default' => 1, |
| 1410 | - 'priority' => 6 | |
| 1462 | + 'priority' => 10 | |
| 1411 | 1463 | ), |
| 1412 | 1464 | 'enable_comment' => array( |
| 1413 | 1465 | 'name' => 'enable_comment', |
| 1414 | 1466 | 'type' => 'toggle', |
| @@ -1414,9 +1466,9 @@ | ||
| 1414 | 1466 | 'type' => 'toggle', |
| 1415 | 1467 | 'label' => __( 'Comment', 'betterdocs' ), |
| 1416 | 1468 | 'enable_disable_text_active' => true, |
| 1417 | 1469 | 'default' => '', |
| 1418 | - 'priority' => 7 | |
| 1470 | + 'priority' => 11 | |
| 1419 | 1471 | ), |
| 1420 | 1472 | 'enable_credit' => array( |
| 1421 | 1473 | 'name' => 'enable_credit', |
| 1422 | 1474 | 'type' => 'toggle', |
| @@ -1422,9 +1474,9 @@ | ||
| 1422 | 1474 | 'type' => 'toggle', |
| 1423 | 1475 | 'label' => __( 'Show Powered by BetterDocs', 'betterdocs' ), |
| 1424 | 1476 | 'enable_disable_text_active' => true, |
| 1425 | 1477 | 'default' => '', |
| 1426 | - 'priority' => 8 | |
| 1478 | + 'priority' => 12 | |
| 1427 | 1479 | ), |
| 1428 | 1480 | 'reaction_feedback_text' => array( |
| 1429 | 1481 | 'name' => 'reaction_feedback_text', |
| 1430 | 1482 | 'type' => 'text', |
| @@ -1429,9 +1481,9 @@ | ||
| 1429 | 1481 | 'name' => 'reaction_feedback_text', |
| 1430 | 1482 | 'type' => 'text', |
| 1431 | 1483 | 'label' => __( 'Reaction Feedback Text', 'betterdocs' ), |
| 1432 | 1484 | 'default' => __( 'Thanks for your feedback.', 'betterdocs' ), |
| 1433 | - 'priority' => 9 | |
| 1485 | + 'priority' => 13 | |
| 1434 | 1486 | ), |
| 1435 | 1487 | 'enable_estimated_reading_time' => array( |
| 1436 | 1488 | 'name' => 'enable_estimated_reading_time', |
| 1437 | 1489 | 'type' => 'toggle', |
| @@ -1437,9 +1489,9 @@ | ||
| 1437 | 1489 | 'type' => 'toggle', |
| 1438 | 1490 | 'label' => __( 'Estimated Reading Time', 'betterdocs' ), |
| 1439 | 1491 | 'enable_disable_text_active' => true, |
| 1440 | 1492 | 'default' => 0, |
| 1441 | - 'priority' => 10 | |
| 1493 | + 'priority' => 14 | |
| 1442 | 1494 | ), |
| 1443 | 1495 | 'estimated_reading_time_title' => array( |
| 1444 | 1496 | 'name' => 'estimated_reading_time_title', |
| 1445 | 1497 | 'type' => 'text', |
| @@ -1444,9 +1496,9 @@ | ||
| 1444 | 1496 | 'name' => 'estimated_reading_time_title', |
| 1445 | 1497 | 'type' => 'text', |
| 1446 | 1498 | 'label' => __( 'Estimated Reading Time Title', 'betterdocs' ), |
| 1447 | 1499 | 'default' => '', |
| 1448 | - 'priority' => 11, | |
| 1500 | + 'priority' => 15, | |
| 1449 | 1501 | 'rules' => Rules::is( 'enable_estimated_reading_time', true ) |
| 1450 | 1502 | ), |
| 1451 | 1503 | 'estimated_reading_time_text' => array( |
| 1452 | 1504 | 'name' => 'estimated_reading_time_text', |
| @@ -1452,9 +1504,9 @@ | ||
| 1452 | 1504 | 'name' => 'estimated_reading_time_text', |
| 1453 | 1505 | 'type' => 'text', |
| 1454 | 1506 | 'label' => __( 'Estimated Reading Time Text', 'betterdocs' ), |
| 1455 | 1507 | 'default' => __( 'min read', 'betterdocs' ), |
| 1456 | - 'priority' => 12, | |
| 1508 | + 'priority' => 16, | |
| 1457 | 1509 | 'rules' => Rules::is( 'enable_estimated_reading_time', true ) |
| 1458 | 1510 | ), |
| 1459 | 1511 | 'singular_estimated_reading_time_text' => array( |
| 1460 | 1512 | 'name' => 'singular_estimated_reading_time_text', |
| @@ -1460,9 +1512,9 @@ | ||
| 1460 | 1512 | 'name' => 'singular_estimated_reading_time_text', |
| 1461 | 1513 | 'type' => 'text', |
| 1462 | 1514 | 'label' => __( 'Estimated Reading Time Text Singular', 'betterdocs' ), |
| 1463 | 1515 | 'default' => __( 'min read', 'betterdocs' ), |
| 1464 | - 'priority' => 13, | |
| 1516 | + 'priority' => 17, | |
| 1465 | 1517 | 'rules' => Rules::is( 'enable_estimated_reading_time', true ) |
| 1466 | 1518 | ) |
| 1467 | 1519 | ) |
| 1468 | 1520 | ), |