AnsPress_Admin::options_user_activity()
Description #
Register AnsPress user’s activity options.
Source #
File: admin/anspress-admin.php
public static function options_user_activity() { global $wp_roles; $opt = ap_opt(); $roles = array(); foreach ( $wp_roles->roles as $key => $role ) { $roles[ $key ] = $role['name']; } $form = array( 'fields' => array( 'activity_exclude_roles' => array( 'label' => __( 'Select the roles to exclude in activity feed.', 'anspress-question-answer' ), 'desc' => __( 'Selected role\'s activities will be excluded in site activity feed.', 'anspress-question-answer' ), 'type' => 'checkbox', 'value' => $opt['activity_exclude_roles'], 'options' => $roles, ), ), ); /** * Filter to user's activity option form. * * @param array $form Form arguments. * @since 4.1.8 */ return apply_filters( 'ap_options_form_user_activity', $form ); }
Expand full source code Collapse full source code View on GitHub: admin/anspress-admin.php:1391
Add your comment