You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: includes/admin/settings/class-settings.php
+39-15
Original file line number
Diff line number
Diff line change
@@ -281,7 +281,7 @@ public static function settings_general() {
281
281
),
282
282
'show_metabox_admins' => array(
283
283
'id' => 'show_metabox_admins',
284
-
'name' => esc_html__( 'Limit meta box to Admins only', 'top-10' ),
284
+
'name' => esc_html__( 'Limit meta box to Admins', 'top-10' ),
285
285
'desc' => esc_html__( 'If selected, the meta box will be hidden from anyone who is not an Admin. By default, Contributors and above will be able to see the meta box. Applies only if the above option is selected.', 'top-10' ),
286
286
'type' => 'checkbox',
287
287
'options' => false,
@@ -308,6 +308,15 @@ public static function settings_general() {
308
308
'type' => 'checkbox',
309
309
'options' => true,
310
310
),
311
+
'show_dashboard_to_roles' => array(
312
+
'id' => 'show_dashboard_to_roles',
313
+
'name' => esc_html__( 'Also show dashboard to', 'top-10' ),
314
+
'desc' => esc_html__( 'Choose the user roles that should have access to the Top 10 dashboard, which showcases popular posts over time. These roles are linked to specific capabilities, and selecting a lower role will automatically grant access to higher roles.', 'top-10' ),
@@ -342,10 +351,7 @@ public static function settings_counter() {
342
351
/* translators: 1: Code. */
343
352
'desc' => sprintf( esc_html__( 'If you choose to disable this, please add the following code to your template file where you want it displayed: %1$s', 'top-10' ), "<code><?php if ( function_exists( 'echo_tptn_post_count' ) ) { echo_tptn_post_count(); } ?></code>" ),
344
353
'type' => 'multicheck',
345
-
'default' => array(
346
-
'single' => 'single',
347
-
'page' => 'page',
348
-
),
354
+
'default' => 'single,page',
349
355
'options' => array(
350
356
'single' => esc_html__( 'Posts', 'top-10' ),
351
357
'page' => esc_html__( 'Pages', 'top-10' ),
@@ -434,12 +440,9 @@ public static function settings_counter() {
'desc' => esc_html__( 'Top 10 tracks hits in two tables in the database. The overall table only tracks the total hits per post. The daily table tracks hits per post on an hourly basis.', 'top-10' ),
438
444
'type' => 'multicheck',
439
-
'default' => array(
440
-
'overall' => 'overall',
441
-
'daily' => 'daily',
442
-
),
445
+
'default' => 'overall,daily',
443
446
'options' => array(
444
447
'overall' => esc_html__( 'Overall', 'top-10' ),
445
448
'daily' => esc_html__( 'Daily range', 'top-10' ),
@@ -465,11 +468,7 @@ public static function settings_counter() {
465
468
'name' => esc_html__( 'Track user groups', 'top-10' ) . ':',
466
469
'desc' => esc_html__( 'Uncheck above to disable tracking if the current user falls into any one of these groups.', 'top-10' ),
467
470
'type' => 'multicheck',
468
-
'default' => array(
469
-
'authors' => 'authors',
470
-
'editors' => 'editors',
471
-
'admins' => 'admins',
472
-
),
471
+
'default' => 'authors,editors,admins',
473
472
'options' => array(
474
473
'authors' => esc_html__( 'Authors', 'top-10' ),
475
474
'editors' => esc_html__( 'Editors', 'top-10' ),
@@ -1095,6 +1094,31 @@ public static function get_styles() {
0 commit comments