Zeno Font Resizer

Descripción

This plugin allows you to give the visitors of your site the option to change the font size of your text.

Características:

  • Uses JavaScript and jQuery to set the fontsize.
  • Settings are saved in a cookie, so the visitor sees the same fontsize on a revisit.
  • Admin page to set which content is being resized, the resize steps and other options.
  • There is a classic widget.
  • Alternatively, you can add PHP code to a template in your theme, preferably a child theme.
  • Simple and Lightweight.

Este plugin es una variante del plugin «Font Resizer» con muchas correciones de fallos y características añadidas.

Compatibilidad

Este plugin es compatible con ClassicPress.

Contributions

This plugin is also available in Codeberg.

Capturas

  • A productive example of the widget.
  • Adding the widget.
  • Settings page.

Instalación

  1. Upload the directory zeno-font-resizer to the /wp-content/plugins/ directory or install the plugin directly with the ‘Install’ function in the ‘Plugins’ menu in WordPress.
  2. Activa el plugin a través del menú «Plugins» en WordPress.
  3. Add the sidebar widget through the ‘Appearance / Widgets’ menu in WordPress.
  4. If you don’t want to use the widget, you can use the template code somewhere in your template. Please check the FAQ.
  5. Define qué contenido debería ser redimensionado en la página de administración de «Zeno Font Resizer». Si no estás familiarizado con HTML y CSS, elige la opción HTML (por defecto). Esto debería redimensionar todo el contenido de tu sitio.

FAQ

¿Cómo puedo activar la función del plugin?

Ve a la página de administración del plugin y selecciona tu opción. Si no estás familiarizado con HTML y CSS, elige la opción HTML (por defecto). Esto redimensionará todo el contenido de tu sitio.

Hago clic en el redimensionador, pero algunas de mis fuentes no cambian de tamaño.

El plugin espera que el CSS de tu tema se configure de manera flexible. Cuando tienes un tamaño de fuente estático como 14px o 14pt en tu menú o en los elementos de contenido, esto no se verá afectado por el plugin. Esta forma de usar el tamaño de fuente es tal vez perfecta para el diseñador, pero no es accesible para el usuario, por lo que solo debes usarla para elementos de diseño, como superponer texto en una imagen.

Cuando usas un porcentaje como 100 % o 124 %, es dinámico y seguirá (heredará) el tamaño de la fuente del padre (y así sucesivamente).
La misma dinámica ocurre para configurar en `em`.

I use font-size in rem in my theme, what do I do?

El tamaño de fuente en `rem` es relativo al tamaño de la fuente del elemento raíz. Puedes ir a la página de ajustes de este plugin,
y establecer el elemento HTML como el elemento para cambiar el tamaño de la fuente (por defecto desde la versión 1.4.4).Ahora, tus elementos `rem` deberían seguir el cambio de tamaño.

¿Cómo puedo usar el plugin sin el widget?

Usa este fragmento de código PHP (en tu tema o en otra parte)

<?php
    if (function_exists('zeno_font_resizer_place')) {
        zeno_font_resizer_place();
    }
?>

¿Cómo puedo usar el código de la plantilla y hacer cosas con él?

Puedes usar el parámetro `$echo = false` y la función devolverá la cadena HTML:

<?php
    if (function_exists('zeno_font_resizer_place')) {
        $font_resizer = zeno_font_resizer_place( false );
        // do stuff with $font_resizer...
    }
?>

¿Cómo puedo cambiar el color de la letra «A»?

Con CSS en tu tema.
Usa algo como:

p.zeno_font_resizer > a {
    color: blue;
}

En el widget veo texto pensado para lectores de pantalla.

A tu tema le falta algo de CSS necesario para ‘.screen-reader-text’. Por favor, contacta con el creador de tu tema.
Puedes encontrar más información sobre accesibilidad en el manual.

Quiero usar un shortcode en el elemento de mi contenido

There is an additional plugin on Codeberg you can use for that.

Reseñas

26 de enero de 2024
Super simple, plugin does the job very well! Thanks! The plugin also has helpful settings and its own shortcode.
23 de marzo de 2021 4 respuestas
I injected the PHP fragment using the plugin Head, Footer and Post Injections In the "posts" / "just before content", section, it works like a charm enabling my users to actually see a theme that is genuinely responsive, so many that claim to be responsive, break up words, when they just shouldn't. Giving the end user the ability to choose their own font size genuinely makes my current theme much more responsive, regardless of which client, OS or guess of both my site thinks its being rendered on... My only one teeny gripe, I'd love to be able to put a simple label just before the triple A that's used to adjust the font size, while it should be configurable, I think I'd go for something like "For your comfort please do change the font size:" (the triple A is nicely centered with the content so there is plenty of room for a label) Good solid working plugin, just does what it says, the only complication is how you inject it, but then there is even available a short code plugin for it. I wanted an option I wouldn't forget to add to each post (I don't like side bars - messes with responsiveness) So injecting it with another plugin just works like a charm - but do be careful with injections, get it wrong and you might need to ftp in and disable the plugin, but then with anything that modifies a theme on the fly, that can always happen.
27 de octubre de 2020
So much so, .. That I've incorporated it into my site and heavily hacked it with header messages and pretty href links, which also means that I'll never be able to upgrade it without taking the code apart. But it really is worth the trouble. The plugin is so simple to work, and it gives your users such a powerful tool in viewing your amusing ditties, (well I think they're amusing), and now the users can't moan that the font size is too small or too big; they can now set the text size that they are comfortable in reading. Seriously, click on the aAA widget and the text inside the DIVs gets bigger or smaller, with even the cookies being taken care of, and what that means: is it's prefect for theme developers to play with. There are other options for non-themers to get the text to grown or shrink. User side wise: there is a short-code version, and also a PHP hack to put it wherever you want on your site, but I just physically worked it into my sidebar. Highly recommended.
5 de agosto de 2020
Does it's job perfectly, had to tweak the defaults a little but will be adding to all my WooCommerce / WP sites... Thank you for sharing your work!
Leer todas las 21 reseñas

Colaboradores y desarrolladores

«Zeno Font Resizer» es un software de código abierto. Las siguientes personas han colaborado con este plugin.

Colaboradores

«Zeno Font Resizer» está traducido en 5 idiomas. Gracias a los traductores por sus contribuciones.

Traduce «Zeno Font Resizer» a tu idioma.

¿Interesado en el desarrollo?

Revisa el código , echa un vistazo al repositorio SVN o suscríbete al registro de desarrollo por RSS.

Registro de cambios

1.8.0

  • 2023-02-15
  • Fix security issue (thanks Rio Darmawan).
  • Escape more output.

1.7.9

  • 2022-03-24
  • Dependency for jquery should be an array.

1.7.8

  • 2021-12-09
  • Upgrade js-cookie.js from 2.2.0 to 3.0.1.
  • Take some hints from phpcs and wpcs.

1.7.7

  • 2021-02-22
  • Fix deprecated jQuery calls with WP 5.6 and jQuery 3.5.

1.7.6

  • 2020-12-02
  • Use autoload for all options on new install.

1.7.5

  • 2020-04-13
  • Better use of esc_html functions.
  • Update support text on admin page.

1.7.4

  • 25 de enero de 2019
  • Añadir CSS a temas rotos.

1.7.3

  • 30 de diciembre de 2018
  • Actualizar js-cookie.js desde 2.1.3 a 2.2.0.
  • El tamaño de fuente para aumentar el carácter cambió de 1.2em a 1.3em.

1.7.2

  • 4 de julio de 2018
  • Add screen-reader-text to widget links.

1.7.1

  • 26 de agosto de 2017
  • Add callback after font resize with example code.
  • El tamaño de la fuente tiene 2 decimales como máximo

1.7.0

  • 25 de diciembre de 2016
  • Actualiza js-cookie a 2.1.3

1.6.3

  • 13 de abril de 2016
  • No need to set the cursor to pointer, it is default behaviour.
  • More use of parseFloat.
  • Actualizar el texto de donación.

1.6.2

  • 2016-02-09
  • Cast to float so value saved in cookie can be used.

1.6.1

  • 2015-12-04
  • Drop pot, nl_NL, they are maintained at GlotPress.

1.6.0

  • 2015-11-29
  • Use Settings API.

1.5.0

  • 2015-11-28
  • Only support WordPress 3.7+, since they really are supported.
  • Add option for Min and Max font size (default 10 and 24 px).
  • On click, return false everywhere.
  • Add link to FAQ on Settings page.
  • Update pot, nl_NL.

1.4.6

  • 2015-09-05
  • Change text-domain to slug.
  • Add radiobutton for ‘body’.
  • Update pot, nl_NL.

1.4.5

  • 2015-08-05
  • Use h1 header on admin page.
  • Update pot, nl_NL.

1.4.4

  • 2015-07-30
  • Use ‘html’ as default element instead of ‘body’ for compatibility with rem sizes.

1.4.3

  • 2015-05-31
  • Add About text.
  • Update pot and nl_NL.

1.4.2

  • 2015-05-26
  • Add ‘return false’ on click event.

1.4.1

  • 2015-05-24
  • Add $echo parameter to template code.

1.4.0

  • 2015-05-24
  • Redo widget properly.
  • Update pot, nl_NL.

1.3.0

  • 2015-05-22
  • Forked from font-resizer.
  • Capability for settingspage is manage_options.
  • Radio buttons have working labels.
  • Delete cookieTime option on uninstall.
  • Add Copyright notice.
  • Add Settings link to main Plugins page.
  • Don’t use WP_PLUGIN_URL for JavaScript enqueue.
  • Add version to JavaScript enqueue.
  • Only enqueue on frontend.
  • Load JavaScript in footer.
  • Update jQuery.cookie to js-cookie 1.5.1.
  • Integrate main.js into jquery.fontsize.js to trim down on loaded files.
  • Move screenshots from trunk to assets.
  • Set list-style to none.
  • Add href attribute for accessibility, tabbing works now.
  • Add option to define your own letter, default is ‘A’.
  • Añadida la cabecera al widget pero no la función de la plantilla.
  • Añadidos tamaños máximo y mínimo (5 pasos desde inicio)
  • Añadida posibilidad de traducción.
  • Add pot, nl_NL.

1.2.3

  • Corregido fallo en widget

1.2.2

  • Added banner img

1.2.1

  • Nothing relevant

1.2.0

  • Fixed some deprecated functions

1.1.9

  • Updated readme

1.1.7

  • Little jquery bugfix for function ownid

1.1.6

  • Arreglado problema de PHP

1.1.5

  • Arreglado problema con Internet Explorer

1.1.4

  • Added option for cookie save time to admin pane
  • Editadas las instrucciones de instalación

1.1.3.1

  • Added an answer to FAQ

1.1.3

  • Fixed JavaScript issue with qTranslate
  • Refactured jQuery scripts

1.1.2

  • Added an option for changing the font resize steps
  • Added comments to source code
  • Cleaned up source code
  • Changed css classes of the visible resizer element in the sidebar

1.1.1

  • Bugfix for different directory structure (like language structure, yourdomain.tld/en/ for english)

1.1.0

  • Añadida la página del menú
  • Changed default resizable element from a div with id innerbody to body element
  • Ganchos de desinstalación añadidos
  • Added some answer to FAQ

1.0.0

  • First stable version
  • Publish the plugin