' . sprintf( __( 'If you would like to override the default format used when displaying the comment timestamps, enter your %scustom format%s here.', 'gravityflow' ), '', '' );
return $tooltips;
}
/**
* Add the assignees and role settings to the general tab.
*
* @param int $position The setting position.
*/
public function field_settings( $position ) {
if ( $position == 20 ) {
// After Description setting.
$this->setting_assignees();
$this->setting_role();
}
}
/**
* Output the markup for the gravityflow_setting_assignees setting to the field general tab in the form editor.
*/
public function setting_assignees() {
?>
setting_role_select(); ?>
'',
'label' => esc_html__( 'Include users from all roles', 'gravityflow' )
)
);
$role_field = array(
'name' => 'gravityflow_users_role_filter',
'choices' => array_merge( $choices, Gravity_Flow_Common::get_roles_as_choices( false ) ),
'onchange' => "SetFieldProperty('gravityflowUsersRoleFilter',this.value);",
);
$html = gravity_flow()->settings_select( $role_field, false );
echo str_replace( sprintf( 'name="_gaddon_setting_%s"', esc_attr( $role_field['name'] ) ), '', $html );
}
/**
* Add the discussion fields custom timestamp format to the appearance tab.
*
* @param int $position The setting position.
*/
public function field_appearance_settings( $position ) {
if ( $position == 0 ) {
?>
roles );
} else {
$value = $user->get( $property );
}
}
}
return self::maybe_format_user_variable( $value, $url_encode, $esc_html );
}
/**
* Filters the value of invalid or special characters before output.
*
* @since 1.5.1-dev
*
* @param string|int $value The user ID or property to be filtered.
* @param bool $url_encode Indicates if the urlencode function should be applied.
* @param bool $esc_html Indicates if the esc_html function should be applied.
*
* @return string
*/
public static function maybe_format_user_variable( $value, $url_encode, $esc_html ) {
if ( $url_encode ) {
$value = urlencode( $value );
}
if ( $esc_html ) {
$value = esc_html( $value );
}
return $value;
}
}
new Gravity_Flow_Fields();