Advertisement
neogaleon

Resolve error sendpress in wordpress

Mar 6th, 2013
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.01 KB | None | 0 0
  1. /*original archive sendpress.php*/
  2. /****************************************************************************************/
  3. function plugin_activation(){
  4.         if ( version_compare( $GLOBALS['wp_version'], SENDPRESS_MINIMUM_WP_VERSION, '<' ) ) {
  5.             deactivate_plugins( __FILE__ );
  6.             wp_die( sprintf( __('SendPress requires WordPress version %s or later.', 'sendpress'), SENDPRESS_MINIMUM_WP_VERSION) );
  7.         } else {
  8.             if( SendPress_Option::get('version','0') == '0' ){
  9.                 SendPress_Option::set('sendpress_ignore_087', 'true');
  10.                 require_once(SENDPRESS_PATH .'inc/db/tables.php');
  11.                 require_once(SENDPRESS_PATH .'inc/db/status.table.php');
  12.                 require_once(SENDPRESS_PATH .'inc/db/open.click.table.php');
  13.                 SendPress_Option::set( 'version' , SENDPRESS_VERSION );
  14.  
  15.             }  
  16.         }
  17.         //Make sure we stop the old action from running
  18.         wp_clear_scheduled_hook('sendpress_cron_action_run');
  19.         SendPress_Option::set( 'permalink_rebuild' , true );
  20.         SendPress_Option::set( 'install_date' , time() );
  21.  
  22.     }
  23. /*************************************************************************************/
  24. /*Updated*/
  25.  
  26. function plugin_activation(){
  27.         if ( version_compare( $GLOBALS['wp_version'], SENDPRESS_MINIMUM_WP_VERSION, '<' ) ) {
  28.             deactivate_plugins( __FILE__ );
  29.             wp_die( sprintf( __('SendPress requires WordPress version %s or later.', 'sendpress'), SENDPRESS_MINIMUM_WP_VERSION) );
  30.         } else {
  31.             //if( SendPress_Option::get('version','0') == '0' ){
  32.                 SendPress_Option::set('sendpress_ignore_087', 'true');
  33.                 require_once(SENDPRESS_PATH .'inc/db/tables.php');
  34.                 require_once(SENDPRESS_PATH .'inc/db/status.table.php');
  35.                 require_once(SENDPRESS_PATH .'inc/db/open.click.table.php');
  36.                 SendPress_Option::set( 'version' , SENDPRESS_VERSION );
  37.  
  38.             //}
  39.         }
  40.         //Make sure we stop the old action from running
  41.         wp_clear_scheduled_hook('sendpress_cron_action_run');
  42.         SendPress_Option::set( 'permalink_rebuild' , true );
  43.         SendPress_Option::set( 'install_date' , time() );
  44.  
  45.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement