[ Index ]

MailPress 7.2

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    

title

Body

[close]

/mp-admin/includes/install/ -> newsletter.php (source)

   1  <?php
   2  
   3  /* Newsletter install */
   4  
   5  global $wpdb, $mp_general;
   6  
   7  $mp_general = get_option( MailPress::option_name_general );
   8  
   9  //////////////////////////////////
  10  //// Install                  ////
  11  //////////////////////////////////
  12  
  13  //    To avoid mailing existing published post
  14  $post_meta = '_MailPress_prior_to_install';
  15  $ids = $wpdb->get_results( "SELECT ID FROM $wpdb->posts WHERE post_status = 'publish' ;" );
  16  if ( $ids )
  17  {
  18      foreach ( $ids as $id )
  19      {
  20          if ( !get_post_meta( $id->ID, $post_meta, true ) )
  21          {
  22              add_post_meta( $id->ID, $post_meta, 'yes', true );
  23          }
  24      }
  25  }
  26  


Generated: Tue May 19 15:55:14 2020 Cross-referenced by PHPXref 0.7.1