Пример #1
0
 function notices()
 {
     global $cp_options, $current_user;
     if ($cp_options->charge_ads && $cp_options->enable_membership_packs) {
         $membership = cp_get_user_membership_package($current_user->ID);
         $step = _appthemes_get_step_from_query();
         if ($membership && in_array($step, array('listing-details', 'select-category'))) {
             appthemes_display_notice('success', sprintf(__('You have active membership pack "%s". Membership benefit will apply on the review page before publishing an ad.', APP_TD), $membership->pack_name));
         }
     }
     parent::notices();
 }
Пример #2
0
 function notices()
 {
     global $cp_options;
     if (!empty($this->error)) {
         foreach ($this->error as $error) {
             appthemes_display_notice('error', $error);
         }
     } elseif (isset($_POST['action']) && $_POST['action'] == 'cp-edit-item') {
         $link = html_link(CP_DASHBOARD_URL, __('Return to my dashboard', APP_TD));
         if ($cp_options->moderate_edited_ads) {
             appthemes_display_notice('success', __('Your ad has been successfully updated and awaiting approval.', APP_TD) . ' ' . $link);
         } else {
             appthemes_display_notice('success', __('Your ad has been successfully updated.', APP_TD) . ' ' . $link);
         }
     }
     parent::notices();
 }