Plugin Directory

Changeset 1070804


Ignore:
Timestamp:
01/19/2015 05:42:28 AM (11 years ago)
Author:
somatic
Message:
  • NEW: option to enable built-in page excerpts
Location:
somatic-framework/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • somatic-framework/trunk/inc/somaOptions.php

    r1069841 r1070804  
    1010        add_action( 'init', array( __CLASS__, 'soma_global_options' ), 7 );                         // populate global variable with options to avoid additional DB queries - try to hook earlier than normal...
    1111        add_action( 'init', array( __CLASS__, 'soma_go_endpoint') );                                // creates new permalink endpoint of /go/[slug], used for redirects
     12        add_action( 'init', array( __CLASS__, 'enable_page_excerpts' ) );                           // turns on excerpts for built-in "page" post type
    1213        add_action( 'template_redirect', array( __CLASS__, 'soma_go_redirect' ) );                  // logic to redirect
    1314        add_filter( 'soma_go_redirect_codes', array( __CLASS__, 'soma_default_links' ), 1, 1 );     // default redirect links
     
    464465                            <label><input name="somatic_framework_options[colorbox]" type="checkbox" value="1" <?php if ( isset( $soma_options['colorbox'] ) ) { checked( '1', $soma_options['colorbox'] ); } ?> /> Enable Colorbox JS lightbox for front-end content image links (not just admin)</label><br />
    465466                            <label><input name="somatic_framework_options[go_redirect]" type="checkbox" value="1" <?php if ( isset( $soma_options['go_redirect'] ) ) { checked( '1', $soma_options['go_redirect'] ); } ?> /> Enable custom redirects via go/[code]</label><br />
     467                            <label><input name="somatic_framework_options[enable_page_excerpts]" type="checkbox" value="1" <?php if ( isset( $soma_options['enable_page_excerpts'] ) ) { checked( '1', $soma_options['enable_page_excerpts'] ); } ?> /> Enable excerpts for built-in Pages</label><br />
    466468                            <label><input name="somatic_framework_options[fulldisplayname]" type="checkbox" value="1" <?php if ( isset( $soma_options['fulldisplayname'] ) ) { checked( '1', $soma_options['fulldisplayname'] ); } ?> /> Force display name to be Firstname Lastname (wp default is the username)</label><br />
    467469                            <input type="submit" class="clicker" value="Save Changes" />
     
    11301132
    11311133
     1134function enable_page_excerpts() {
     1135    global $soma_options;
     1136    if ( somaFunctions::fetch_index( $soma_options, 'enable_page_excerpts' ) ) {
     1137        add_post_type_support( 'page', 'excerpt' );
     1138    }
     1139}
     1140
    11321141    /////////////// END CLASS
    11331142}
  • somatic-framework/trunk/readme.txt

    r1069841 r1070804  
    3636* FIX: parse_query action hook repaired, had stopped working oddly
    3737* added demographics tracking line to google analytics code
     38* NEW: option to enable built-in page excerpts
    3839
    3940= 1.8.10 =
Note: See TracChangeset for help on using the changeset viewer.