Add dollar sign and commas to a number?

To format number, you can use the function number_format_i18n (it’s not documented now, but you can see its source here). Its work is format the number based on the language. You might want to look at number_format (PHP built_in function, and is used by number_format_i18n) to have more control to decimal point and thousand separator. … Read more

How to change text size of Gutenberg editor

If you came here, like me, looking for how to adjust the available text size options within Gutenberg, you can add this code to your theme’s functions.php file (you can add as many options as you like): add_theme_support( ‘editor-font-sizes’, array( array( ‘name’ => __( ‘Normal’, ‘your-theme-text-domain’ ), ‘shortName’ => __( ‘N’, ‘your-theme-text-domain’ ), ‘size’ => … Read more

can I add a custom format to the format option in the text panel?

The “classic” TinyMCE editor has two dropdowns: formatselect for paragraph styles and styleselect for character styles – which can also contain paragraph styles, to make it more confusing. The configuration in WordPress by default only shows the format dropdown. If you apply a custom stylesheet to the editor, TinyMCE can use it to pick up … Read more