Plugin Directory

Changeset 2087915


Ignore:
Timestamp:
05/14/2019 10:32:54 PM (7 years ago)
Author:
danillonunes
Message:

Add option to disable donations by default

Location:
makemydonation-imo/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • makemydonation-imo/trunk/mmdimo.php

    r2087914 r2087915  
    7272  register_setting( 'mmdimo', 'mmdimo_post_type' );
    7373  register_setting( 'mmdimo', 'mmdimo_default_state' );
     74  register_setting( 'mmdimo', 'mmdimo_case_check_default' );
    7475}
    7576
     
    138139  }
    139140
    140   $mmdimo_case_checked = TRUE;
     141  $mmdimo_case_checked = get_option('mmdimo_case_check_default') !== '';
    141142  if ( isset( $mmdimo_case ) && $mmdimo_case ) {
    142143    if ( isset( $mmdimo_case['status'] ) && $mmdimo_case['status'] == 0 ) {
  • makemydonation-imo/trunk/options.php

    r1394905 r2087915  
    5555  </select>
    5656  <p class="description"><?php _e( 'If you are using Custom Post Types for your funeral home obituaries, chose the post type here. If you leave the default option, you will be allowed to manually create a funeral home case for all post types.', 'mmdimo' ); ?></p>
     57</td>
     58</tr>
     59
     60<tr>
     61<th scope="row"><label for="mmdimo_case_check_default"><?php _e( 'Default Settings', 'mmdimo' ); ?></label></th>
     62<td>
     63  <?php $mmdimo_case_check_default = get_option('mmdimo_case_check_default') !== ''; ?>
     64  <p>
     65    <label>
     66      <input type="checkbox" name="mmdimo_case_check_default" id="mmdimo-case-check-default" value="1" <?php if ($mmdimo_case_check_default) { echo 'checked="checked"'; } ?>>
     67      <?php _e( 'Allow Memorial Donations', 'mmdimo' ); ?>
     68    </label>
     69  </p>
     70  <p class="description"><?php _e( 'Enable memorial donations by default when creating a new post.', 'mmdimo' ); ?></p>
    5771</td>
    5872</tr>
Note: See TracChangeset for help on using the changeset viewer.