Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find a more standard-friendly way (instead) of changing global $submenu #24

Open
carstingaxion opened this issue Aug 18, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@carstingaxion
Copy link
Member

if ( isset( $submenu['index.php'][6][0] ) && 'Analytics' === $submenu['index.php'][6][0] ) {
    // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
    $submenu['index.php'][6][0] = __( 'Zugriffe', 'figurentheater' );
}

function change_meta_box_title() : void {
global $wp_meta_boxes;
$post_type = 'dashboard'; // our screen->ID
$context = 'side';
$priority = 'high';
$id = 'koko-analytics-dashboard-widget';
if ( isset( $wp_meta_boxes[ $post_type ][ $context ][ $priority ][ $id ]['title'] ) )
$wp_meta_boxes[ $post_type ][ $context ][ $priority ][ $id ]['title'] = __( 'Usage statistics - GDPR compliant', 'figurentheater' );
}
function cleanup_admin_ui() : void {
update_needed_roles();

@carstingaxion carstingaxion added the bug Something isn't working label Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant