Plugin Directory

Changeset 3167485


Ignore:
Timestamp:
10/12/2024 08:44:45 AM (18 months ago)
Author:
roelv
Message:

added support for BB power pack

Location:
inesta-faq-h2
Files:
1 added
2 edited
2 copied

Legend:

Unmodified
Added
Removed
  • inesta-faq-h2/tags/1.0.1/inesta-faq-h2.php

    r3167465 r3167485  
    33 * Plugin Name: Inesta FAQ H2
    44 * Description: Automatically changes Yoast FAQ question labels to H2 elements for better SEO and accessibility.
    5  * Version:     1.0
     5 * Version:     1.0.1
    66 * Author:      Roel Veldhuizen
    77 * Author URI:  https://webapplicatielatenmaken.nl
     
    4040// Add the filter to modify content when rendered.
    4141add_filter( 'the_content', 'inesta_change_yoast_faq_to_h2' );
     42
     43/**
     44 * @param $content
     45 * @return array|mixed|string|string[]|null
     46 */
     47function inesta_change_power_pack_faq_to_h2($content) {
     48    // Controleer of de content het PP FAQ blok bevat
     49    if (strpos($content, 'pp-faq-button-label') !== false) {
     50        // Gebruik een regex om de span-tags te vervangen door h2-tags
     51        $pattern = '/<span class="pp-faq-button-label">(.*?)<\/span>/';
     52        $replacement = '<h2 class="pp-faq-button-label">$1</h2>';
     53        $content = preg_replace($pattern, $replacement, $content);
     54    }
     55    return $content;
     56}
     57
     58// Voeg de filter toe aan 'the_content' om alleen de content van de pagina/post te bewerken
     59add_filter('the_content', 'inesta_change_power_pack_faq_to_h2');
  • inesta-faq-h2/tags/1.0.1/readme.txt

    r3167468 r3167485  
    44Requires at least: 5.0
    55Tested up to: 6.6.2
    6 Stable tag: 1.0
     6Stable tag: 1.0.1
    77Requires PHP: 7.2
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    10 Automatically change Yoast FAQ question labels to H2 elements for better SEO and accessibility.
     10Automatically change Yoast FAQ and Power Pack question labels to H2 elements for better SEO and accessibility.
    1111
    1212== Description ==
    13 **Inesta FAQ H2** is a lightweight plugin designed to enhance your Yoast FAQ blocks by converting the default question labels from `<span>` elements to `<h2>` headings. This helps improve SEO by ensuring better use of semantic headings and can enhance accessibility for screen readers.
     13**Inesta FAQ H2** is a lightweight plugin designed to enhance your Yoast or Power Pack FAQ blocks by converting the default question labels from `<span>` elements to `<h2>` headings. This helps improve SEO by ensuring better use of semantic headings and can enhance accessibility for screen readers.
    1414
    1515### Key Features
    16 * Converts Yoast FAQ question labels to H2 headings automatically.
     16* Converts Yoast and Power Pack FAQ question labels to H2 headings automatically.
    1717* No configuration required — activate and the plugin works immediately.
    1818* Improves SEO by providing proper heading structure within FAQ sections.
     
    2828
    2929== Installation ==
    30 1. Upload the plugin files to the `/wp-content/plugins/inesta-yoast-faq-h2` directory, or install the plugin through the WordPress plugins screen directly.
     301. Upload the plugin files to the `/wp-content/plugins/inesta-faq-h2` directory, or install the plugin through the WordPress plugins screen directly.
    31312. Activate the plugin through the 'Plugins' screen in WordPress.
    32323. The plugin will automatically convert your Yoast FAQ question labels to H2 headings.
     
    4444
    4545== Changelog ==
     46= 1.0.1 =
     47* Added support for Beaver Builder Power Pack FAQ block.
     48
    4649= 1.0 =
    4750* Initial release of Inesta Yoast FAQ H2.
  • inesta-faq-h2/trunk/inesta-faq-h2.php

    r3167465 r3167485  
    33 * Plugin Name: Inesta FAQ H2
    44 * Description: Automatically changes Yoast FAQ question labels to H2 elements for better SEO and accessibility.
    5  * Version:     1.0
     5 * Version:     1.0.1
    66 * Author:      Roel Veldhuizen
    77 * Author URI:  https://webapplicatielatenmaken.nl
     
    4040// Add the filter to modify content when rendered.
    4141add_filter( 'the_content', 'inesta_change_yoast_faq_to_h2' );
     42
     43/**
     44 * @param $content
     45 * @return array|mixed|string|string[]|null
     46 */
     47function inesta_change_power_pack_faq_to_h2($content) {
     48    // Controleer of de content het PP FAQ blok bevat
     49    if (strpos($content, 'pp-faq-button-label') !== false) {
     50        // Gebruik een regex om de span-tags te vervangen door h2-tags
     51        $pattern = '/<span class="pp-faq-button-label">(.*?)<\/span>/';
     52        $replacement = '<h2 class="pp-faq-button-label">$1</h2>';
     53        $content = preg_replace($pattern, $replacement, $content);
     54    }
     55    return $content;
     56}
     57
     58// Voeg de filter toe aan 'the_content' om alleen de content van de pagina/post te bewerken
     59add_filter('the_content', 'inesta_change_power_pack_faq_to_h2');
  • inesta-faq-h2/trunk/readme.txt

    r3167468 r3167485  
    44Requires at least: 5.0
    55Tested up to: 6.6.2
    6 Stable tag: 1.0
     6Stable tag: 1.0.1
    77Requires PHP: 7.2
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    10 Automatically change Yoast FAQ question labels to H2 elements for better SEO and accessibility.
     10Automatically change Yoast FAQ and Power Pack question labels to H2 elements for better SEO and accessibility.
    1111
    1212== Description ==
    13 **Inesta FAQ H2** is a lightweight plugin designed to enhance your Yoast FAQ blocks by converting the default question labels from `<span>` elements to `<h2>` headings. This helps improve SEO by ensuring better use of semantic headings and can enhance accessibility for screen readers.
     13**Inesta FAQ H2** is a lightweight plugin designed to enhance your Yoast or Power Pack FAQ blocks by converting the default question labels from `<span>` elements to `<h2>` headings. This helps improve SEO by ensuring better use of semantic headings and can enhance accessibility for screen readers.
    1414
    1515### Key Features
    16 * Converts Yoast FAQ question labels to H2 headings automatically.
     16* Converts Yoast and Power Pack FAQ question labels to H2 headings automatically.
    1717* No configuration required — activate and the plugin works immediately.
    1818* Improves SEO by providing proper heading structure within FAQ sections.
     
    2828
    2929== Installation ==
    30 1. Upload the plugin files to the `/wp-content/plugins/inesta-yoast-faq-h2` directory, or install the plugin through the WordPress plugins screen directly.
     301. Upload the plugin files to the `/wp-content/plugins/inesta-faq-h2` directory, or install the plugin through the WordPress plugins screen directly.
    31312. Activate the plugin through the 'Plugins' screen in WordPress.
    32323. The plugin will automatically convert your Yoast FAQ question labels to H2 headings.
     
    4444
    4545== Changelog ==
     46= 1.0.1 =
     47* Added support for Beaver Builder Power Pack FAQ block.
     48
    4649= 1.0 =
    4750* Initial release of Inesta Yoast FAQ H2.
Note: See TracChangeset for help on using the changeset viewer.