__( 'Acquisto spazi pubblicitari', 'advertising_purchase' ), 'post_content' => '[purchase_page]', 'post_status' => 'publish', 'post_author' => 1, 'post_type' => 'page', 'comment_status' => 'closed' ); // Insert the post into the database $insertP= wp_insert_post( $purchase_page,true ); //save the id in the database update_option( 'advertising_management_purchasePage', $insertP ); //-----finish Create page PURCHASE //-----start Create page CUSTOM ADV $custom_adv_page = array( 'post_title' => __( 'Personalizza spazio pubblicitario', 'advertising_custom' ), 'post_content' => '[custom_adv_page]', 'post_status' => 'publish', 'post_author' => 1, 'post_type' => 'page', 'comment_status' => 'closed' ); // Insert the post into the database $insertC= wp_insert_post( $custom_adv_page,true ); //save the id in the database update_option( 'advertising_management_customAdvPage', $insertC ); //-----finish Create page PURCHASE //-----start Create page REGISTRATION $registration_page = array( 'post_title' => __( 'Registrazione e pagamento', 'advertising_registration' ), 'post_content' => '[registration_wp_advertising]', 'post_status' => 'publish', 'post_author' => 1, 'post_type' => 'page', 'comment_status' => 'closed' ); // Insert the post into the database $insert= wp_insert_post( $registration_page,true ); //save the id in the database update_option( 'advertising_management_registrationPage', $insert ); //-----finish Create page REGISTRATION //-----start Create page THANK YOU PAGE $thank_you_adv_page = array( 'post_title' => __( 'Pagina di ringraziamento', 'thank_you_page_advertising' ), 'post_content' => '[thank_you_page_advertising]', 'post_status' => 'publish', 'post_author' => 1, 'post_type' => 'page', 'comment_status' => 'closed' ); // Insert the post into the database $insertC= wp_insert_post( $thank_you_adv_page,true ); //save the id in the database update_option( 'advertising_management_thank_you_adv_page', $insertC ); //-----finish Create page THANK YUOU PAGE // inizio: se non è stata schedulata, fallo ora if( !wp_next_scheduled( 'check_advertising' ) ) { wp_schedule_event( time(), 'hourly', 'check_advertising' ); } } //menù impostazioni add_action( 'admin_menu', 'advertising_management_menu' ); add_action('check_advertising', 'event_daily_advertising'); ?>