Support » Plugins and Hacks » Excerpt- and more-hooks overwrite previous settings

Excerpt- and more-hooks overwrite previous settings

  • Hi,

    this is a very useful plugin and I use it in the most of my installations.

    But some days ago I found a odd behaviour. I use my own hooks for the excerpt length and the more link for pages and don’t want to position them after priority ‘999’.

    If I now reset the fields ‘Word Length of Excerpt’ and ‘Text for the Read More Link’ in the options page of this plugin to empty values, the excerpt has length zero or the more link is overwritten with the default from Ninja Pages.

    The problem seems to be that only the function isset() is used to check for these options. But after reset these options still exist with empty values.

    Perhaps you could modify the both relevant functions.
    File: basic-functions.php
    Function: ninja_pages_adjust_excerpt_length()
    New: if( isset( $options['excerpt_length'] ) && (int)$options['excerpt_length'] > 0 && 'page' == get_post_type() )

    Function: ninja_pages_auto_excerpt_more()
    New: if( isset( $options['more_link'] ) && $options['more_link'] != '' && 'page' == get_post_type() )


  • The topic ‘Excerpt- and more-hooks overwrite previous settings’ is closed to new replies.