Exemplo n.º 1
0
 public function compose_to()
 {
     $accounts = $this->get_accounts();
     if (!count($accounts)) {
         _e('No accounts configured', 'support_hub');
     }
     foreach ($accounts as $account) {
         $ucm_account = new shub_ucm_account($account['shub_ucm_id']);
         echo '<div class="ucm_compose_account_select">' . '<input type="checkbox" name="compose_ucm_id[' . $account['shub_ucm_id'] . '][share]" value="1"> ' . ($ucm_account->get_picture() ? '<img src="' . $ucm_account->get_picture() . '">' : '') . '<span>' . htmlspecialchars($ucm_account->get('ucm_name')) . ' (status update)</span>' . '</div>';
         /*echo '<div class="ucm_compose_account_select">' .
           '<input type="checkbox" name="compose_ucm_id[' . $account['shub_ucm_id'] . '][blog]" value="1"> ' .
           ($ucm_account->get_picture() ? '<img src="'.$ucm_account->get_picture().'">' : '' ) .
           '<span>' . htmlspecialchars( $ucm_account->get( 'ucm_name' ) ) . ' (blog post)</span>' .
           '</div>';*/
         $products = $ucm_account->get('products');
         foreach ($products as $ucm_product_id => $product) {
             echo '<div class="ucm_compose_account_select">' . '<input type="checkbox" name="compose_ucm_id[' . $account['shub_ucm_id'] . '][' . $ucm_product_id . ']" value="1"> ' . ($ucm_account->get_picture() ? '<img src="' . $ucm_account->get_picture() . '">' : '') . '<span>' . htmlspecialchars($product->get('product_name')) . ' (product)</span>' . '</div>';
         }
     }
 }