function delibera_get_main_config($config = array()) { global $deliberaThemes; if (!is_object($deliberaThemes)) { $deliberaThemes = new DeliberaThemes(); } $opt = array(); $opt['theme'] = $deliberaThemes->getThemeDir('creta'); $opt['minimo_validacao'] = '10'; $opt['dias_validacao'] = '5'; $opt['dias_discussao'] = '5'; $opt['dias_votacao'] = '5'; $opt['criar_pauta_pelo_front_end'] = 'N'; $opt['representante_define_prazos'] = 'N'; $opt['pauta_suporta_encaminhamento'] = 'S'; $opt['dias_novo_prazo'] = '2'; $opt['validacao'] = 'S'; $opt['dias_relatoria'] = '2'; $opt['relatoria'] = 'N'; $opt['eleicao_relator'] = 'N'; $opt['dias_votacao_relator'] = '2'; $opt['limitar_tamanho_comentario'] = 'N'; $opt['numero_max_palavras_comentario'] = '50'; $opt['plan_restriction'] = 'N'; $opt['cabecalho_arquivo'] = __('Bem-vindo a plataforma de debate do ', 'delibera') . get_bloginfo('name'); $opt['todos_usuarios_logados_podem_participar'] = 'N'; $opt['data_fixa_nova_pauta_externa'] = ''; return array_merge($opt, $config); }
* * @param string $currentTheme o tema atual * @return string */ public function getSelectBox($currentTheme) { $themes = $this->getAvailableThemes(); $html = "<select name='theme' id='theme'>"; foreach ($themes as $themePath => $themeName) { $html .= "<option value='{$themePath}'" . selected($themePath, $currentTheme, false) . ">{$themeName}</option>"; } $html .= "</select>"; return $html; } } $deliberaThemes = new DeliberaThemes(); add_filter('archive_template', array($deliberaThemes, 'archiveTemplate')); add_filter('single_template', array($deliberaThemes, 'singleTemplate')); add_action('admin_print_styles', array($deliberaThemes, 'adminPrintStyles')); add_action('wp_enqueue_scripts', array($deliberaThemes, 'publicStyles'), 100); // inclui arquivos específicos do tema require_once $deliberaThemes->themeFilePath('functions.php'); require_once $deliberaThemes->themeFilePath('delibera_comments_template.php'); /** * Usa o template de comentário do Delibera * no lugar do padrão do Wordpress para as pautas * * @param string $path * @return string */ function delibera_comments_template($path)