Created
August 23, 2016 10:24
-
-
Save patilswapnilv/f2a7c9721f8aa1060afa2c3321559e71 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class CustomRapidFireFilters { | |
| function __construct() | |
| { | |
| add_filter( 'rapidfire_admin_options', array( &$this, 'custom_admin_options' ) ); | |
| add_filter( 'rapidfire_after_options', array( &$this, 'custom_after_options' ) ); | |
| add_filter( 'rapidfire_after_result', array( &$this, 'custom_after_result' ) ); | |
| } | |
| function custom_admin_options( $options ) | |
| { | |
| $options['read_more_links'] = ''; | |
| return $options; | |
| } | |
| function custom_after_options( $obj ) | |
| { ?> | |
| <h3 class="title">Result Options</h3> | |
| <table class="form-table"> | |
| <tbody> | |
| <tr valign="top"> | |
| <th scope="row"> | |
| <label for="rapidfireOptions[read_more_links]">Read more links:</label> | |
| </th> | |
| <td> | |
| <textarea name=rapidfireOptions[read_more_links]"><?php _e( apply_filters( 'format_to_edit', $obj->get_admin_option( 'read_more_links' ) ) ); ?></textarea> | |
| </td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| <?php | |
| } | |
| function custom_after_result( $obj ) | |
| { | |
| $out = '<div class="read_more_links">'; | |
| $out .= $obj->get_admin_option( 'read_more_links' ); | |
| $out .= '</div>'; | |
| return $out; | |
| } | |
| } | |
| $custom_sq_filters = new CustomRapidFireFilters; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment