• Resolved Jordy Meow

    (@tigroumeow)


    Hi,

    I am also the developer of many plugins available on this repository. I have no technical issue with your plugins, but I think something is missing. I modified the code for myself, but I think it should also be included in the public version.

    My headers are different in the pages and in the posts. Unfortunately, the settings of your plugin are global, and settings can’t be modified.

    Therefore, I modified your plugin so that the settings can be filtered and modified, this way:

    'margin_top' => apply_filters( 'q2w3_margin_top', $options['margin-top'] ),
    'margin_bottom' => apply_filters( 'q2w3_margin_bottom', $options['margin-bottom'] ),

    That allows me to do things in my own custom code:

    add_filter( 'q2w3_margin_top', function ( $margin_top ) {
    	return is_singular( 'post' ) ? ( $margin_top - 90 ) : $margin_top;
    }, 10, 2 );

    This way, everything is perfect. Could you add this into the next version? I would rather keep your plugin with its updates, than keeping my own fork of it.

    Thank you ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • Anonymous User 15026628

    (@anonymized-15026628)

    Hi Jordy Meow

    Thank you for sharing your knowledge with us. We will take a close look at your proposal.

    Kind regards and thanks, Odilo

    Plugin Author Thomas Maier

    (@webzunft)

    Hi @tigroumeow,

    I just wanted to let you know that I added a filter for the options and intend to publish it soon. The changelog of the update is going to contain the exact name of the filter.

    Thomas

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Please add filters so that we can dynamically modify the options’ is closed to new replies.