function delibera_novo_prazo($postID) { $situacao = delibera_get_situacao($postID); $opts = delibera_get_config(); switch ($situacao->slug) { case 'validacao': $inova_data = strtotime("+{$opts['dias_novo_prazo']} days"); $nova_data = date("d/m/Y", $inova_data); $inova_datad = strtotime("+{$opts['dias_discussao']} days", $inova_data); $nova_datad = date("d/m/Y", $inova_datad); $inova_datavt = strtotime("+{$opts['dias_votacao']} days", $inova_datad); $nova_datavt = date("d/m/Y", $inova_datavt); $inova_datarel = strtotime("+{$opts['dias_votacao_relator']} days", $inova_datavt); $nova_datarel = date("d/m/Y", $inova_datarel); $inova_datar = strtotime("+{$opts['dias_relatoria']} days", $inova_datarel); $nova_datar = date("d/m/Y", $inova_datar); $events_meta['prazo_validacao'] = $opts['validacao'] == 'S' ? $nova_data : date('d/m/Y'); $events_meta['prazo_discussao'] = $nova_datad; $events_meta['prazo_relatoria'] = $opts['relatoria'] == 'S' ? $nova_datar : date('d/m/Y'); $events_meta['prazo_eleicao_relator'] = $opts['relatoria'] == 'S' && $opts['eleicao_relator'] == 'S' ? $nova_datarel : date('d/m/Y'); $events_meta['prazo_votacao'] = $nova_datavt; foreach ($events_meta as $key => $value) { if (get_post_meta($postID, $key, true)) { update_post_meta($postID, $key, $value); // Atualiza } else { add_post_meta($postID, $key, $value, true); // Se não cria } } delibera_del_cron($postID); delibera_criar_agenda($postID, $nova_data, $nova_datad, $nova_datavt, $nova_datar, $nova_datarel); break; case 'discussao': case 'relatoria': $inova_data = strtotime("+{$opts['dias_novo_prazo']} days"); delibera_set_novo_prazo_discussao_relatoria($postID, $inova_data, $opts); break; case 'emvotacao': $inova_data = strtotime("+{$opts['dias_novo_prazo']} days"); $nova_data = date("d/m/Y", $inova_data); update_post_meta($postID, 'prazo_votacao', $nova_data); delibera_del_cron($postID); delibera_criar_agenda($postID, false, false, $nova_data); break; } //delibera_notificar_situacao($postID); }
<?php require_once ABSPATH . 'wp-admin/includes/screen.php'; global $delibera_comments_padrao; $situacao = delibera_get_situacao($id); if ($situacao->slug == 'comresolucao') { $title = __('Encaminhamentos propostos', 'delibera'); } else { if ($situacao->slug == 'validacao') { $title = ''; $votes = delibera_get_comments_validacoes($post->ID); $approvals = (int) get_post_meta($post->ID, 'numero_validacoes', true); $rejections = (int) get_post_meta($post->ID, 'delibera_numero_comments_validacoes', true) - $approvals; } else { if ($situacao->slug == 'relatoria') { $title = __('Encaminhamentos propostos na discussão', 'delibera'); } else { if ($situacao->slug == 'emvotacao') { $title = __('Usuários que já votaram', 'delibera'); } else { $title = __('Discussão sobre a pauta', 'delibera'); } } } } if (($situacao->slug == "validacao" || $situacao->slug == "emvotacao") && !$delibera_comments_padrao === true) { comment_form(); } ?> <div class="actions">
//Verifica se há alguma mudança no filtro de pautas por página if (isset($_REQUEST['number-options'])) { // adiciona posts por página aos argumentos da query $wp_query->set('posts_per_page', $_REQUEST['number-options']); } //verifica se há algum 'filtro' do título da pauta if (isset($_REQUEST['filter_pauta'])) { $wp_query->set('s', $_REQUEST['filter_pauta']); } // realiza a query query_posts($wp_query->query_vars); if (have_posts()) { while (have_posts()) { the_post(); $temas = wp_get_post_terms($post->ID, 'tema'); $situacao = delibera_get_situacao($post->ID); ?> <div class="topic divider-bottom pb-md mt-md"> <div class="clearfix mb-0"> <p class="status pull-left fontsize-sm text-muted"> <i class="fa fa-users"></i> <?php echo $situacao->name; ?> </p> <p class="deadline pull-left ml-lg fontsize-sm text-muted"> <i class="fa fa-calendar"></i> <?php if (delibera_get_prazo($post->ID) == -1) { echo 'Prazo encerrado';
/** * * Gera código html para criação do botão discordar do sistema delibera * * @param $ID int post_ID ou comment_ID * @param $type string 'pauta' ou 'comment' */ function delibera_gerar_discordar($ID, $type = 'pauta') { global $post; $situacoes_validas = array('validacao' => false, 'discussao' => true, 'emvotacao' => false); $ndiscordou = intval($type == 'pauta' || $type == 'post' ? get_post_meta($ID, 'delibera_numero_discordar', true) : get_comment_meta($ID, 'delibera_numero_discordar', true)); $postID = 0; if (is_object($ID)) { if ($type == 'post' || $type == 'pauta') { $ID = $ID->ID; $postID = $ID; } else { $postID = $ID->comment_post_ID; $ID = $ID->comment_ID; } } $situacao = delibera_get_situacao($postID); if (delibera_current_user_can_participate()) { $user_id = get_current_user_id(); $ip = $_SERVER['REMOTE_ADDR']; if (!delibera_ja_discordou($ID, $user_id, $ip, $type) && (is_object($situacao) && array_key_exists($situacao->slug, $situacoes_validas)) && $situacoes_validas[$situacao->slug] && !delibera_ja_curtiu($ID, $user_id, $ip, $type)) { $html = ''; // $html .= (!$ndiscordou ? '<div class="delibera-unlike-count"></div>' : ''); $html .= '<button class="btn btn-mini btn-danger delibera_unlike"><span class="delibera_unlike_text">' . __('Discordo', 'delibera') . '</span>'; $html .= "<input type='hidden' name='object_id' value='{$ID}' />"; $html .= "<input type='hidden' name='type' value='{$type}' />"; $html .= '</button>'; return $html; } } }
echo delibera_get_comments_link(); ?> "> <?php _e('Discuta', 'delibera'); comments_number('', ' (' . __('Um comentário', 'delibera') . ')', ' (' . __('% comentários', 'delibera') . ')'); ?> </a> </span> <?php } if ($show_situacao == 1) { ?> <span class="archive-situacao delibera-widget-archive-situacao"> <?php echo delibera_get_situacao($post->ID)->name; ?> </span> <?php } ?> </div><!-- .entry-utility --> <?php } ?> </div><!-- #post-## --> <?php } ?> </div>
/** * Detecta o tipo do comentário e set a variábel global $_POST */ function delibera_mailer_comment_type($text, $parent_comment) { global $_POST; $_POST = array(); $tipo = delibera_get_situacao($parent_comment->comment_post_ID); switch ($tipo) { case "validacao": $_POST['delibera_validacao'] = "S"; break; case 'discussao': case 'encaminhamento': $_POST['delibera_encaminha'] = "S"; $_POST['delibera-baseouseem'] = ''; break; case 'voto': foreach ($_POST as $postkey => $postvar) { if (substr($postkey, 0, strlen('delibera_voto')) == 'delibera_voto') { $votos[] = $postvar; } } break; } }
<?php get_header(); $situacao = delibera_get_situacao(get_the_ID()); ?> <div id="delibera" class="situacao-<?php echo $situacao->slug; ?> "> <div id="container"> <div id="content" role="main"> <?php get_delibera_header(); load_template(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'loop-pauta.php', true); ?> </div><!-- #content --> </div><!-- #container --> </div> <?php get_footer();
/** * @see Walker::start_el() * @since 2.7.0 * * @param string $output Passed by reference. Used to append additional content. * @param object $comment Comment data object. * @param int $depth Depth of comment in reference to parents. * @param array $args */ function start_el(&$output, $comment, $depth = 0, $args = array(), $current_object_id = 0) { global $deliberaThemes; $depth++; $GLOBALS['comment_depth'] = $depth; $args['avatar_size'] = '85'; if (!empty($args['callback'])) { call_user_func($args['callback'], $comment, $args, $depth); return; } $GLOBALS['comment'] = $comment; $tipo = get_comment_meta($comment->comment_ID, "delibera_comment_tipo", true); $situacao = delibera_get_situacao($comment->comment_post_ID); extract($args, EXTR_SKIP); if ('div' == $args['style']) { $tag = 'div'; $add_below = 'comment'; } else { $tag = 'li'; $add_below = 'delibera-comment'; } $classes = array(); if (!empty($args['has_children'])) { $classes[] = 'parent'; } if ($tipo == 'encaminhamento' || $tipo == 'resolucao' || $tipo == 'encaminhamento_selecionado') { $classes[] = 'encaminhamento'; if (in_array($situacao->slug, array('comresolucao', 'emvotacao'))) { $classes[] = 'encaminhamentos-selecionados'; } } ob_start(); ?> <?php if (($tipo == 'resolucao' || $tipo == 'encaminhamento') && $situacao->slug == 'comresolucao') { ?> <?php $nvotos = get_comment_meta($comment->comment_ID, "delibera_comment_numero_votos", true); ?> <?php $classes[] = 'clearfix'; ?> <li <?php comment_class($classes); ?> > <div class="alignleft votos"> <span><?php echo $nvotos == 1 ? sprintf(__('%d voto', 'delibera'), $nvotos) : sprintf(__('%d votos', 'delibera'), $nvotos); ?> </span> </div> <div class="alignleft content"> <?php comment_text(); ?> </div> </li> <?php } elseif ($situacao->slug == 'emvotacao' && $tipo == 'voto') { ?> <?php $avatar = get_avatar_with_title($comment->user_id); ?> <li><?php echo $avatar; ?> </li> <?php } else { ?> <li <?php comment_class($classes); ?> > <article id="delibera-comment-<?php echo $comment->comment_ID; ?> "> <header class="coment-meta comment-author vcard clearfix"> <div class="alignleft"> <?php echo get_avatar($comment, 44); ?> <cite class="fn"><?php echo $comment->comment_author; ?> </cite> <a href="<?php echo htmlspecialchars(delibera_get_comment_link($comment->comment_ID)); ?> "> <time datetime="<?php echo get_comment_date('c'); ?> "> <?php $time = mysql2date('G', $comment->comment_date); $time_diff = time() - $time; if ($time_diff > 0 && $time_diff < 30 * 24 * 60 * 60) { printf(__('há %s', 'delibera'), human_time_diff(mysql2date('U', $comment->comment_date, true))); } else { echo get_comment_date('d \\d\\e F \\d\\e Y à\\s H:i'); } ?> </time> </a> </div> <div class="alignright textright"> <span class="type"><?php delibera_get_comment_type_label($comment); ?> </span> <?php if ($situacao->slug == 'discussao' || $situacao->slug == 'relatoria' && current_user_can('relatoria')) { echo "<br/>"; delibera_edit_comment_link(__('Edit'), '', ''); delibera_delete_comment_link(__('Deletar'), '', ''); } ?> </div> </header> <section class="comment-content"> <?php if ($comment->comment_approved == '0') { ?> <em class="delibera-comment-awaiting-moderation"><?php _e('Seu comentário está aguardando moderação.', 'delibera'); ?> </em> <br /> <?php } ?> <?php comment_text(); ?> <?php delibera_comment_edit_form(); ?> </section> <section class="actions clearfix"> <?php if (delibera_comments_is_open($comment->comment_post_ID) && $situacao->slug != 'emvotacao' && $situacao->slug != 'relatoria') { ?> <div class="bottom alignleft"> <div class="reply"> <?php if ($situacao->slug != 'validacao' && is_user_logged_in()) { $args['reply_text'] = __("Responder", 'delibera'); ?> <?php comment_reply_link(array_merge($args, array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?> <?php } else { if (is_user_logged_in()) { ?> <a href="<?php delibera_get_comment_link(); ?> #respond" class="comment-reply-link"><?php _e('De sua opinião', 'delibera'); ?> </a> <?php } else { ?> <a href="<?php echo wp_login_url(delibera_get_comment_link()); ?> #respond" class="comment-reply-link"><?php _e('Faça login e de sua opinião', 'delibera'); ?> </a> <?php } } ?> </div> </div> <?php } ?> <?php if ($situacao->slug == 'relatoria' && current_user_can('relatoria')) { $baseouseem = get_comment_meta($comment->comment_ID, 'delibera-baseouseem', true); if (!empty($baseouseem)) { $elements = explode(',', $baseouseem); $result = ''; $count = count($elements); foreach ($elements as $key => $element) { $reference_comment = get_comment($element); $result .= "<a href='#delibera-comment-{$reference_comment->comment_ID}'>{$reference_comment->comment_author}</a>"; if ($key + 1 < $count) { $result .= ', '; } } echo '<div>' . __('Proposta baseada em:', 'delibera') . ' ' . $result . '</div>'; } } if (($tipo == "encaminhamento" || $tipo == 'encaminhamento_selecionado') && current_user_can('relatoria') && $situacao->slug == "relatoria") { $selecionados = delibera_get_comments_encaminhamentos_selecionados_ids($comment->comment_post_ID); if (!$selecionados) { $selecionados = array(); } ?> <div class="bottom alignleft"> <p> <input id="baseadoem-checkbox-<?php echo $comment->comment_ID; ?> " type="checkbox" name="baseadoem-checkbox[]" value="<?php echo $comment->comment_ID; ?> " class="baseadoem-checkbox" autocomplete="off" /> <label for="baseadoem-checkbox-<?php echo $comment->comment_ID; ?> "><?php _e('Criar novo encaminhamento baseado neste', 'delibera'); ?> </label> </p> <p> <input id="usar-na-votacao-<?php echo $comment->comment_ID; ?> " class="usar-na-votacao" type="checkbox" name="usar_na_votacao[]" value="<?php echo $comment->comment_ID; ?> " <?php echo in_array($comment->comment_ID, $selecionados) ? ' checked="checked" ' : ''; ?> /> <label for="usar-na-votacao-<?php echo $comment->comment_ID; ?> "><?php _e('Usar este encaminhamento na votação', 'delibera'); ?> </label> <img class="usar-na-votacao-feedback" src="<?php echo $deliberaThemes->getThemeUrl(); ?> /img/accept.png" style="display: none;" /> </p> </div> <?php } $ncurtiu = get_comment_meta($comment->comment_ID, 'delibera_numero_curtir', true); $ndiscordou = get_comment_meta($comment->comment_ID, 'delibera_numero_discordar', true); if (is_user_logged_in() || $ncurtiu || $ndiscordou) { ?> <div class="bottom alignright textright"> <?php $curtir = delibera_gerar_curtir($comment->comment_ID, 'comment'); $discordar = delibera_gerar_discordar($comment->comment_ID, 'comment'); if ($curtir) { echo $curtir; } if ($discordar) { echo $discordar; } ?> </div> <?php } ?> </section><!-- .reply --> </article> </li> <?php } $output .= ob_get_clean(); }
/** * * Gera código html para criação do botão discordar do sistema delibera * @param $ID int post_ID ou comment_ID * @param $type string 'pauta' ou 'comment' */ function delibera_gerar_discordar($ID, $type = 'pauta') { global $post; $situacoes_validas = array('validacao' => false, 'discussao' => true, 'emvotacao' => false, 'comresolucao' => true); $postID = 0; if (is_object($ID)) { if ($type == 'post' || $type == 'pauta') { $ID = $ID->ID; $postID = $ID; } else { $postID = $ID->comment_post_ID; $ID = $ID->comment_ID; } } $situacao = delibera_get_situacao($postID); if (is_user_logged_in()) { $user_id = get_current_user_id(); $ip = $_SERVER['REMOTE_ADDR']; if (!delibera_ja_discordou($ID, $user_id, $ip, $type) && (is_object($situacao) && array_key_exists($situacao->slug, $situacoes_validas)) && $situacoes_validas[$situacao->slug] && !delibera_ja_curtiu($ID, $user_id, $ip, $type)) { $html = '<div id="thebuttonDiscordo' . $type . $ID . '" class="delibera_unlike" ><span class="delibera_unlike_text">' . __('Discordo', 'delibera') . '</span>'; $html .= "<input type='hidden' name='object_id' value='{$ID}' />"; $html .= "<input type='hidden' name='type' value='{$type}' />"; $html .= '</div>'; return $html; } } else { $html = '<div id="thebuttonDiscordo' . $type . $ID . '" class="delibera_unlike" >'; if (is_object($situacao) && array_key_exists($situacao->slug, $situacoes_validas) && $situacoes_validas[$situacao->slug]) { $html .= '<a class="delibera-unlike-login" href="'; $html .= wp_login_url($type == "pauta" ? get_permalink() : delibera_get_comment_link()); $html .= '" ><span class="delibera_unlike_text">' . __('Discordo', 'delibera') . '</span></a>'; } return $html; } }
* Gera um arquivo XLS com as opiniões e propostas de * encaminhamento feitos pelos usuários nas pautas */ // contorna problema com links simbolicos no ambiente de desenvolvimento $wp_root = dirname(dirname($_SERVER['SCRIPT_FILENAME'])) . '/../../'; require_once $wp_root . 'wp-load.php'; if (!current_user_can('manage_options')) { die('Você não deveria estar aqui'); } $pautas = get_posts(array('post_type' => 'pauta', 'post_status' => 'publish')); $comments = array(); foreach ($pautas as $pauta) { $comments = array_merge($comments, delibera_get_comments($pauta->ID, array('discussao', 'encaminhamento', 'encaminhamento_selecionado', 'resolucao'))); } foreach ($comments as $comment) { $situacao = delibera_get_situacao($comment->comment_post_ID); $comment->pauta_title = get_the_title($comment->comment_post_ID); $comment->pauta_status = $situacao->name; $comment->type = delibera_get_comment_type_label($comment, false, false); $comment->link = get_comment_link($comment); $comment->concordaram = (int) get_comment_meta($comment->comment_ID, 'delibera_numero_curtir', true); $comment->discordaram = (int) get_comment_meta($comment->comment_ID, 'delibera_numero_discordar', true); $comment->votes_count = (int) get_comment_meta($comment->comment_ID, "delibera_comment_numero_votos", true); } header('Pragma: public'); header('Cache-Control: no-store, no-cache, must-revalidate'); // HTTP/1.1 header("Pragma: no-cache"); header("Expires: 0"); header('Content-Transfer-Encoding: none'); header('Content-Type: application/vnd.ms-excel; charset=UTF-8');
/** * @see Walker::start_el() * @since 2.7.0 * * @param string $output Passed by reference. Used to append additional content. * @param object $comment Comment data object. * @param int $depth Depth of comment in reference to parents. * @param array $args */ function start_el(&$output, $comment, $depth = 0, $args = array(), $current_object_id = 0) { $depth++; $GLOBALS['comment_depth'] = $depth; $args['avatar_size'] = '85'; if (!empty($args['callback'])) { call_user_func($args['callback'], $comment, $args, $depth); return; } $GLOBALS['comment'] = $comment; $tipo = get_comment_meta($comment->comment_ID, "delibera_comment_tipo", true); $situacao = delibera_get_situacao($comment->comment_post_ID); extract($args, EXTR_SKIP); if ('div' == $args['style']) { $tag = 'div'; $add_below = 'comment'; } else { $tag = 'li'; $add_below = 'div-comment'; } ob_start(); ?> <<?php echo $tag; ?> <?php comment_class(empty($args['has_children']) ? '' : 'parent'); ?> id="delibera-comment-<?php comment_ID(); ?> "> <?php if ('div' != $args['style']) { ?> <div id="delibera-div-comment-<?php comment_ID(); ?> " class="delibera-comment-body"> <?php } ?> <div id="delibera-div-comment-header-<?php comment_ID(); ?> " class="delibera-comment-header"> <div class="delibera-comment-author vcard"> <?php if ($args['avatar_size'] != 0) { echo get_avatar($comment, $args['avatar_size']); } ?> <?php $url = get_author_posts_url($comment->user_id); //print_r($comment); $autor_link = "<a href='{$url}' rel='external nofollow' class='url'>{$comment->comment_author}</a>"; printf('<cite class="fn">%s</cite><span class="delibera-says"></span>', $autor_link); ?> </div> <?php if ($comment->comment_approved == '0') { ?> <em class="delibera-comment-awaiting-moderation"><?php _e('Seu comentário está aguardando moderação.', 'delibera'); ?> </em> <br /> <?php } ?> <div class="delibera-comment-meta commentmetadata"> <a href="<?php echo htmlspecialchars(delibera_get_comment_link($comment->comment_ID)); ?> "> <?php $time = mysql2date('G', $comment->comment_date); $time_diff = time() - $time; if ($time_diff > 0 && $time_diff < 30 * 24 * 60 * 60) { printf(' ' . __('há %s', 'delibera'), human_time_diff(mysql2date('U', $comment->comment_date, true))); } else { echo ' ' . __('em', 'delibera') . ' ' . get_comment_date(); } ?> </a> <?php if ($situacao->slug == 'discussao' || $situacao->slug == 'relatoria' && current_user_can('relatoria')) { delibera_edit_comment_link(__('(Edit)'), ' ', ''); delibera_delete_comment_link(__('(Deletar)'), ' ', ''); } ?> </div> <?php if ($situacao->slug == "discussao" || $situacao->slug == "relatoria") { $display_check = $tipo == "encaminhamento" ? '' : 'style="display:none;"'; ?> <span id="checkbox-encaminhamento-<?php echo $comment->comment_ID; ?> " class="checkbox-encaminhamento" <?php echo $display_check; ?> ><span class="encaminhamento-figura"></span><label class="encaminhamento-label"><?php _e('Encaminhamento', 'delibera'); ?> </label></span> <?php } ?> </div> <?php if ($situacao->slug == 'relatoria' && current_user_can('relatoria')) { $baseouseem = get_comment_meta($comment->comment_ID, 'delibera-baseouseem', true); if (strlen($baseouseem) > 0) { $baseouseem_elements = ""; foreach (explode(',', $baseouseem) as $baseouseem_element) { $baseouseem_elements .= do_shortcode($baseouseem_element); } echo '<div id="comment-painel-baseouseem" class="comment-painel-baseouseem"><label id="painel-baseouseem-label" class="painel-baseouseem-label" >' . __('Proposta baseada em:', 'delibera') . ' </label>' . $baseouseem_elements . '</div>'; } } comment_text(); delibera_comment_edit_form(); if ($tipo == "encaminhamento" && current_user_can('relatoria') && $situacao->slug == "relatoria") { ?> <div class="baseadoem-checkbox-div"><label class="baseadoem-checkbox-label"><input id="baseadoem-checkbox-<?php echo $comment->comment_ID; ?> " type="checkbox" name="baseadoem-checkbox[]" value="<?php echo $comment->comment_ID; ?> " class="baseadoem-checkbox" autocomplete="off" /><?php _e('basear-se neste encaminhamento?', 'delibera'); ?> </label></div> <?php } if (delibera_comments_is_open($comment->comment_post_ID)) { ?> <div class="reply"> <?php if ($situacao->slug == 'relatoria' && is_user_logged_in()) { if ($tipo == 'encaminhamento' && current_user_can('relatoria')) { edit_comment_link(__('Editar Encaminhamento', 'delibera'), '<p>', '</p>'); } } elseif ($situacao->slug != 'validacao' && is_user_logged_in()) { $args['reply_text'] = __("Responda este comentário", 'delibera'); comment_reply_link(array_merge($args, array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth']))); } elseif (is_user_logged_in()) { /*$args['reply_text'] = __("De sua opinião", 'delibera'); comment_reply_link(array_merge( $args, array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'])));*/ ?> <div class="entry-respond"> <a href="<?php delibera_get_comment_link(); ?> #respond" class="comment-reply-link"><?php _e('De sua opinião', 'delibera'); ?> </a> </div> <?php } else { ?> <div class="entry-respond"> <a href="<?php echo wp_login_url(delibera_get_comment_link()); ?> #respond" class="comment-reply-link"><?php _e('Faça login e de sua opinião', 'delibera'); ?> </a> </div><!-- .entry-respond --> <?php } ?> </div> <?php } echo '<div id="delibera-comment-botoes-' . $comment->comment_ID . '" class="delibera-comment-botoes" >'; echo delibera_gerar_curtir($comment->comment_ID, 'comment'); echo delibera_gerar_discordar($comment->comment_ID, 'comment'); echo '</div>'; ?> <?php if ('div' != $args['style']) { ?> </div> <?php } $output .= ob_get_clean(); }
function delibera_notificar_fim_prazo($args) { $post = $args['post_ID']; if (is_int($post)) { $post = get_post($post); } $message = ''; $situacao = delibera_get_situacao($post->ID); delibera_notificar_representantes($message, "mensagem_fim_prazo_{$situacao->slug}", $post); }