Skip to:
Content

BuddyPress.org

Changeset 13731


Ignore:
Timestamp:
02/21/2024 06:46:38 PM (3 years ago)
Author:
espellcaste
Message:

Improve the BP Site Health debug info panel with BP related PHP constants

fixes #9101
closes ​https://github.com/buddypress/buddypress/pull/232

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/admin/bp-core-admin-tools.php

    r13728 r13731  
    872872        );
    873873
     874        $debug_info['buddypress-constants'] = array(
     875                'label'       => __( 'BuddyPress Constants', 'buddypress' ),
     876                'description' => __( 'These constants can alter where and how parts of BuddyPress are loaded or works.', 'buddypress' ),
     877                'fields'      => array(
     878                        'BP_VERSION' => array(
     879                                'label' => 'BP_VERSION',
     880                                'value' => BP_VERSION,
     881                        ),
     882                        'BP_DB_VERSION' => array(
     883                                'label' => 'BP_DB_VERSION',
     884                                'value' => BP_DB_VERSION,
     885                        ),
     886                        'BP_REQUIRED_PHP_VERSION' => array(
     887                                'label' => 'BP_REQUIRED_PHP_VERSION',
     888                                'value' => BP_REQUIRED_PHP_VERSION,
     889                        ),
     890                        'BP_PLUGIN_DIR' => array(
     891                                'label' => 'BP_PLUGIN_DIR',
     892                                'value' => BP_PLUGIN_DIR,
     893                        ),
     894                        'BP_PLUGIN_URL' => array(
     895                                'label' => 'BP_PLUGIN_URL',
     896                                'value' => BP_PLUGIN_URL,
     897                        ),
     898                        'BP_IGNORE_DEPRECATED' => array(
     899                                'label' => 'BP_IGNORE_DEPRECATED',
     900                                'value' => defined( 'BP_IGNORE_DEPRECATED' ) && BP_IGNORE_DEPRECATED ? __( 'Enabled', 'buddypress' ) : __( 'Disabled', 'buddypress' ),
     901                                'debug' => defined( 'BP_IGNORE_DEPRECATED' ) ? BP_IGNORE_DEPRECATED : 'undefined',
     902                        ),
     903                        'BP_LOAD_DEPRECATED' => array(
     904                                'label' => 'BP_LOAD_DEPRECATED',
     905                                'value' => defined( 'BP_LOAD_DEPRECATED' ) && BP_LOAD_DEPRECATED ? __( 'Enabled', 'buddypress' ) : __( 'Disabled', 'buddypress' ),
     906                                'debug' => defined( 'BP_LOAD_DEPRECATED' ) ? BP_LOAD_DEPRECATED : 'undefined',
     907                        ),
     908                        'BP_ROOT_BLOG' => array(
     909                                'label' => 'BP_ROOT_BLOG',
     910                                'value' => BP_ROOT_BLOG,
     911                        ),
     912                        'BP_ENABLE_MULTIBLOG' => array(
     913                                'label' => 'BP_ENABLE_MULTIBLOG',
     914                                'value' => defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG ? __( 'Enabled', 'buddypress' ) : __( 'Disabled', 'buddypress' ),
     915                                'debug' => defined( 'BP_ENABLE_MULTIBLOG' ) ? BP_ENABLE_MULTIBLOG : 'undefined',
     916                        ),
     917                        'BP_ENABLE_ROOT_PROFILES' => array(
     918                                'label' => 'BP_ENABLE_ROOT_PROFILES',
     919                                'value' => defined( 'BP_ENABLE_ROOT_PROFILES' ) && BP_ENABLE_ROOT_PROFILES ? __( 'Enabled', 'buddypress' ) : __( 'Disabled', 'buddypress' ),
     920                                'debug' => defined( 'BP_ENABLE_ROOT_PROFILES' ) ? BP_ENABLE_ROOT_PROFILES : 'undefined',
     921                        ),
     922                        'BP_DEFAULT_COMPONENT' => array(
     923                                'label' => 'BP_DEFAULT_COMPONENT',
     924                                'value' => defined( 'BP_DEFAULT_COMPONENT' ) ? BP_DEFAULT_COMPONENT : __( 'Undefined', 'buddypress' ),
     925                                'debug' => defined( 'BP_DEFAULT_COMPONENT' ) ? BP_DEFAULT_COMPONENT : 'undefined',
     926                        ),
     927                        'BP_XPROFILE_BASE_GROUP_NAME' => array(
     928                                'label' => 'BP_XPROFILE_BASE_GROUP_NAME',
     929                                'value' => BP_XPROFILE_BASE_GROUP_NAME,
     930                        ),
     931                        'BP_XPROFILE_FULLNAME_FIELD_NAME' => array(
     932                                'label' => 'BP_XPROFILE_FULLNAME_FIELD_NAME',
     933                                'value' => BP_XPROFILE_FULLNAME_FIELD_NAME,
     934                        ),
     935                        'BP_MESSAGES_AUTOCOMPLETE_ALL' => array(
     936                                'label' => 'BP_MESSAGES_AUTOCOMPLETE_ALL',
     937                                'value' => defined( 'BP_MESSAGES_AUTOCOMPLETE_ALL' ) && BP_MESSAGES_AUTOCOMPLETE_ALL ? __( 'Enabled', 'buddypress' ) : __( 'Disabled', 'buddypress' ),
     938                        ),
     939                        'BP_DISABLE_AUTO_GROUP_JOIN' => array(
     940                                'label' => 'BP_DISABLE_AUTO_GROUP_JOIN',
     941                                'value' => defined( 'BP_DISABLE_AUTO_GROUP_JOIN' ) && BP_DISABLE_AUTO_GROUP_JOIN ? __( 'Disabled', 'buddypress' ) : __( 'Enabled', 'buddypress' ),
     942                                'debug' => defined( 'BP_DISABLE_AUTO_GROUP_JOIN' ) ? BP_DISABLE_AUTO_GROUP_JOIN : 'undefined',
     943                        ),
     944                        'BP_GROUPS_DEFAULT_EXTENSION' => array(
     945                                'label' => 'BP_GROUPS_DEFAULT_EXTENSION',
     946                                'value' => defined( 'BP_GROUPS_DEFAULT_EXTENSION' ) ? BP_GROUPS_DEFAULT_EXTENSION : __( 'Undefined', 'buddypress' ),
     947                                'debug' => defined( 'BP_GROUPS_DEFAULT_EXTENSION' ) ? BP_GROUPS_DEFAULT_EXTENSION : 'undefined',
     948                        ),
     949                        'BP_SIGNUPS_SKIP_USER_CREATION' => array(
     950                                'label' => 'BP_SIGNUPS_SKIP_USER_CREATION',
     951                                'value' => defined( 'BP_SIGNUPS_SKIP_USER_CREATION' ) && BP_SIGNUPS_SKIP_USER_CREATION ? __( 'Enabled', 'buddypress' ) : __( 'Disabled', 'buddypress' ),
     952                                'debug' => defined( 'BP_SIGNUPS_SKIP_USER_CREATION' ) ? BP_SIGNUPS_SKIP_USER_CREATION : 'undefined',
     953                        ),
     954                        'BP_MEMBERS_REQUIRED_PASSWORD_STRENGTH' => array(
     955                                'label' => 'BP_MEMBERS_REQUIRED_PASSWORD_STRENGTH',
     956                                'value' => defined( 'BP_MEMBERS_REQUIRED_PASSWORD_STRENGTH' ) ? BP_MEMBERS_REQUIRED_PASSWORD_STRENGTH : __( 'Undefined', 'buddypress' ),
     957                                'debug' => defined( 'BP_MEMBERS_REQUIRED_PASSWORD_STRENGTH' ) ? BP_MEMBERS_REQUIRED_PASSWORD_STRENGTH : 'undefined',
     958                        ),
     959                        'BP_EMBED_DISABLE_PRIVATE_MESSAGES' => array(
     960                                'label' => 'BP_EMBED_DISABLE_PRIVATE_MESSAGES',
     961                                'value' => defined( 'BP_EMBED_DISABLE_PRIVATE_MESSAGES' ) ? BP_EMBED_DISABLE_PRIVATE_MESSAGES : __( 'Undefined', 'buddypress' ),
     962                                'debug' => defined( 'BP_EMBED_DISABLE_PRIVATE_MESSAGES' ) ? BP_EMBED_DISABLE_PRIVATE_MESSAGES : 'undefined',
     963                        ),
     964                        'BP_EMBED_DISABLE_ACTIVITY_REPLIES' => array(
     965                                'label' => 'BP_EMBED_DISABLE_ACTIVITY_REPLIES',
     966                                'value' => defined( 'BP_EMBED_DISABLE_ACTIVITY_REPLIES' ) ? BP_EMBED_DISABLE_ACTIVITY_REPLIES : __( 'Undefined', 'buddypress' ),
     967                                'debug' => defined( 'BP_EMBED_DISABLE_ACTIVITY_REPLIES' ) ? BP_EMBED_DISABLE_ACTIVITY_REPLIES : 'undefined',
     968                        ),
     969                        'BP_ENABLE_USERNAME_COMPATIBILITY_MODE' => array(
     970                                'label' => 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE',
     971                                'value' => defined( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE' ) ? BP_ENABLE_USERNAME_COMPATIBILITY_MODE : __( 'Undefined', 'buddypress' ),
     972                                'debug' => defined( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE' ) ? BP_ENABLE_USERNAME_COMPATIBILITY_MODE : 'undefined',
     973                        ),
     974                        'BP_AVATAR_DEFAULT_THUMB' => array(
     975                                'label' => 'BP_AVATAR_DEFAULT_THUMB',
     976                                'value' => defined( 'BP_AVATAR_DEFAULT_THUMB' ) ? BP_AVATAR_DEFAULT_THUMB : __( 'Undefined', 'buddypress' ),
     977                                'debug' => defined( 'BP_AVATAR_DEFAULT_THUMB' ) ? BP_AVATAR_DEFAULT_THUMB : 'undefined',
     978                        ),
     979                        'BP_AVATAR_DEFAULT' => array(
     980                                'label' => 'BP_AVATAR_DEFAULT',
     981                                'value' => defined( 'BP_AVATAR_DEFAULT' ) ? BP_AVATAR_DEFAULT : __( 'Undefined', 'buddypress' ),
     982                                'debug' => defined( 'BP_AVATAR_DEFAULT' ) ? BP_AVATAR_DEFAULT : 'undefined',
     983                        ),
     984                        'BP_AVATAR_URL' => array(
     985                                'label' => 'BP_AVATAR_URL',
     986                                'value' => defined( 'BP_AVATAR_URL' ) ? BP_AVATAR_URL : __( 'Undefined', 'buddypress' ),
     987                                'debug' => defined( 'BP_AVATAR_URL' ) ? BP_AVATAR_URL : 'undefined',
     988                        ),
     989                        'BP_AVATAR_UPLOAD_PATH' => array(
     990                                'label' => 'BP_AVATAR_UPLOAD_PATH',
     991                                'value' => defined( 'BP_AVATAR_UPLOAD_PATH' ) ? BP_AVATAR_UPLOAD_PATH : __( 'Undefined', 'buddypress' ),
     992                                'debug' => defined( 'BP_AVATAR_UPLOAD_PATH' ) ? BP_AVATAR_UPLOAD_PATH : 'undefined',
     993                        ),
     994                        'BP_SHOW_AVATARS' => array(
     995                                'label' => 'BP_SHOW_AVATARS',
     996                                'value' => defined( 'BP_SHOW_AVATARS' ) && BP_SHOW_AVATARS ? __( 'Enabled', 'buddypress' ) : __( 'Disabled', 'buddypress' ),
     997                                'debug' => defined( 'BP_SHOW_AVATARS' ) ? BP_SHOW_AVATARS : 'undefined',
     998                        ),
     999                        'BP_AVATAR_ORIGINAL_MAX_FILESIZE' => array(
     1000                                'label' => 'BP_AVATAR_ORIGINAL_MAX_FILESIZE',
     1001                                'value' => BP_AVATAR_ORIGINAL_MAX_FILESIZE,
     1002                        ),
     1003                        'BP_AVATAR_ORIGINAL_MAX_WIDTH' => array(
     1004                                'label' => 'BP_AVATAR_ORIGINAL_MAX_WIDTH',
     1005                                'value' => BP_AVATAR_ORIGINAL_MAX_WIDTH,
     1006                        ),
     1007                        'BP_AVATAR_ORIGINAL_MAX_FILESIZE' => array(
     1008                                'label' => 'BP_AVATAR_ORIGINAL_MAX_FILESIZE',
     1009                                'value' => size_format( BP_AVATAR_ORIGINAL_MAX_FILESIZE ),
     1010                                'debug' => BP_AVATAR_ORIGINAL_MAX_FILESIZE,
     1011                        ),
     1012                        'BP_AVATAR_FULL_HEIGHT' => array(
     1013                                'label' => 'BP_AVATAR_FULL_HEIGHT',
     1014                                'value' => BP_AVATAR_FULL_HEIGHT,
     1015                        ),
     1016                        'BP_AVATAR_FULL_WIDTH' => array(
     1017                                'label' => 'BP_AVATAR_FULL_WIDTH',
     1018                                'value' => BP_AVATAR_FULL_WIDTH,
     1019                        ),
     1020                        'BP_AVATAR_THUMB_HEIGHT' => array(
     1021                                'label' => 'BP_AVATAR_THUMB_HEIGHT',
     1022                                'value' => BP_AVATAR_THUMB_HEIGHT,
     1023                        ),
     1024                        'BP_AVATAR_THUMB_WIDTH' => array(
     1025                                'label' => 'BP_AVATAR_THUMB_WIDTH',
     1026                                'value' => BP_AVATAR_THUMB_WIDTH,
     1027                        ),
     1028                        'BP_USE_WP_ADMIN_BAR' => array(
     1029                                'label' => 'BP_USE_WP_ADMIN_BAR (deprecated)',
     1030                                'value' => defined( 'BP_USE_WP_ADMIN_BAR' ) ? BP_USE_WP_ADMIN_BAR : __( 'Undefined', 'buddypress' ),
     1031                                'debug' => defined( 'BP_USE_WP_ADMIN_BAR' ) ? BP_USE_WP_ADMIN_BAR : 'undefined',
     1032                        ),
     1033                        'BP_FRIENDS_DB_VERSION' => array(
     1034                                'label' => 'BP_FRIENDS_DB_VERSION (deprecated)',
     1035                                'value' => defined( 'BP_FRIENDS_DB_VERSION' ) ? BP_FRIENDS_DB_VERSION : __( 'Undefined', 'buddypress' ),
     1036                                'debug' => defined( 'BP_FRIENDS_DB_VERSION' ) ? BP_FRIENDS_DB_VERSION : 'undefined',
     1037                        ),
     1038                        'BP_FORUMS_PARENT_FORUM_ID' => array(
     1039                                'label' => 'BP_FORUMS_PARENT_FORUM_ID (deprecated)',
     1040                                'value' => defined( 'BP_FORUMS_PARENT_FORUM_ID' ) ? BP_FORUMS_PARENT_FORUM_ID : __( 'Undefined', 'buddypress' ),
     1041                                'debug' => defined( 'BP_FORUMS_PARENT_FORUM_ID' ) ? BP_FORUMS_PARENT_FORUM_ID : 'undefined',
     1042                        ),
     1043                        'BP_MEMBERS_SLUG' => array(
     1044                                'label' => 'BP_MEMBERS_SLUG (deprecated)',
     1045                                'value' => defined( 'BP_MEMBERS_SLUG' ) ? BP_MEMBERS_SLUG : __( 'Undefined', 'buddypress' ),
     1046                                'debug' => defined( 'BP_MEMBERS_SLUG' ) ? BP_MEMBERS_SLUG : 'undefined',
     1047                        ),
     1048                        'BP_GROUPS_SLUG' => array(
     1049                                'label' => 'BP_GROUPS_SLUG (deprecated)',
     1050                                'value' => defined( 'BP_GROUPS_SLUG' ) ? BP_GROUPS_SLUG : __( 'Undefined', 'buddypress' ),
     1051                                'debug' => defined( 'BP_GROUPS_SLUG' ) ? BP_GROUPS_SLUG : 'undefined',
     1052                        ),
     1053                        'BP_MESSAGES_SLUG' => array(
     1054                                'label' => 'BP_MESSAGES_SLUG (deprecated)',
     1055                                'value' => defined( 'BP_MESSAGES_SLUG' ) ? BP_MESSAGES_SLUG : __( 'Undefined', 'buddypress' ),
     1056                                'debug' => defined( 'BP_MESSAGES_SLUG' ) ? BP_MESSAGES_SLUG : 'undefined',
     1057                        ),
     1058                        'BP_NOTIFICATIONS_SLUG' => array(
     1059                                'label' => 'BP_NOTIFICATIONS_SLUG (deprecated)',
     1060                                'value' => defined( 'BP_NOTIFICATIONS_SLUG' ) ? BP_NOTIFICATIONS_SLUG : __( 'Undefined', 'buddypress' ),
     1061                                'debug' => defined( 'BP_NOTIFICATIONS_SLUG' ) ? BP_NOTIFICATIONS_SLUG : 'undefined',
     1062                        ),
     1063                        'BP_BLOGS_SLUG' => array(
     1064                                'label' => 'BP_BLOGS_SLUG (deprecated)',
     1065                                'value' => defined( 'BP_BLOGS_SLUG' ) ? BP_BLOGS_SLUG : __( 'Undefined', 'buddypress' ),
     1066                                'debug' => defined( 'BP_BLOGS_SLUG' ) ? BP_BLOGS_SLUG : 'undefined',
     1067                        ),
     1068                        'BP_FRIENDS_SLUG' => array(
     1069                                'label' => 'BP_FRIENDS_SLUG (deprecated)',
     1070                                'value' => defined( 'BP_FRIENDS_SLUG' ) ? BP_FRIENDS_SLUG : __( 'Undefined', 'buddypress' ),
     1071                                'debug' => defined( 'BP_FRIENDS_SLUG' ) ? BP_FRIENDS_SLUG : 'undefined',
     1072                        ),
     1073                        'BP_ACTIVITY_SLUG' => array(
     1074                                'label' => 'BP_ACTIVITY_SLUG (deprecated)',
     1075                                'value' => defined( 'BP_ACTIVITY_SLUG' ) ? BP_ACTIVITY_SLUG : __( 'Undefined', 'buddypress' ),
     1076                                'debug' => defined( 'BP_ACTIVITY_SLUG' ) ? BP_ACTIVITY_SLUG : 'undefined',
     1077                        ),
     1078                        'BP_SETTINGS_SLUG' => array(
     1079                                'label' => 'BP_SETTINGS_SLUG (deprecated)',
     1080                                'value' => defined( 'BP_SETTINGS_SLUG' ) ? BP_SETTINGS_SLUG : __( 'Undefined', 'buddypress' ),
     1081                                'debug' => defined( 'BP_SETTINGS_SLUG' ) ? BP_SETTINGS_SLUG : 'undefined',
     1082                        ),
     1083                        'BP_XPROFILE_SLUG' => array(
     1084                                'label' => 'BP_XPROFILE_SLUG (deprecated)',
     1085                                'value' => defined( 'BP_XPROFILE_SLUG' ) ? BP_XPROFILE_SLUG : __( 'Undefined', 'buddypress' ),
     1086                                'debug' => defined( 'BP_XPROFILE_SLUG' ) ? BP_XPROFILE_SLUG : 'undefined',
     1087                        ),
     1088                        'BP_FORUMS_SLUG' => array(
     1089                                'label' => 'BP_FORUMS_SLUG (deprecated)',
     1090                                'value' => defined( 'BP_FORUMS_SLUG' ) ? BP_FORUMS_SLUG : __( 'Undefined', 'buddypress' ),
     1091                                'debug' => defined( 'BP_FORUMS_SLUG' ) ? BP_FORUMS_SLUG : 'undefined',
     1092                        ),
     1093                        'BP_SEARCH_SLUG' => array(
     1094                                'label' => 'BP_SEARCH_SLUG (deprecated)',
     1095                                'value' => defined( 'BP_SEARCH_SLUG' ) ? BP_SEARCH_SLUG : __( 'Undefined', 'buddypress' ),
     1096                                'debug' => defined( 'BP_SEARCH_SLUG' ) ? BP_SEARCH_SLUG : 'undefined',
     1097                        ),
     1098                )
     1099        );
     1100
    8741101        return $debug_info;
    8751102}
Note: See TracChangeset for help on using the changeset viewer.