コード例 #1
0
<div class="wrap">
    <section class="text-center">
        <img src="<?php 
echo plugins_url('sebrae/template/assets/img/sebrae_logo.png');
?>
">
    </section>
    <h2 class="nav-tab-wrapper">
        <a href="?page=sebrae&tab=services" class="nav-tab <?php 
sebrae_active_nav_bar('services');
echo !isset($_GET['tab']) ? 'nav-tab-active' : '';
?>
">Shortcodes</a>
        <a href="?page=sebrae&tab=config" class="nav-tab <?php 
sebrae_active_nav_bar('config');
?>
">Configurações</a>
    </h2>
    <?php 
sebrae_load_page();
?>
</div>
コード例 #2
0
<?php

if (sebrae_active_nav_bar('services', true) || !isset($_GET['tab'])) {
    ?>
    <div class="tabs" id="services">
        <p>Bem vindo ao plugin SEBRAE - Ideias de Negócios!</p>
        <p>
            Este plugin não foi desenvolvido pela própria entidade SEBRAE e sim por uma empresa que desenvolve soluções para o Wordpress.<br/>
            Este plugin realializa uma integração com a API ofical do SEBRAE (<a href="http://www.api.sebrae.com.br/api/" target="_blank">http://www.api.sebrae.com.br/api/</a>
            , esta integração só é possível mediante a cadastro no próprio SEBRAE.
            <br/>
            <b>Para mais informações clique <a href="http://www.api.sebrae.com.br/api/" target="_blank">aqui</a>.</b>
            <br/>
            Este plugin é dependente do webservice do SEBRAE para funcionar corretamente.
            <br/>
            <br/>

            <?php 
    /* -- Status dos serviços
       <b>Status</b>
       <br/>
       Configuração <?= sebrae_is_config() ? '<span style="color: #24890d;font-weight: bolder">[OK]</span>' : '<span style="color: #ff0000;font-weight: bolder">[ERRO]</span>'?>
       <br/>
       Credencias <?= sebrae_is_auth() ? '<span style="color: #24890d;font-weight: bolder">[OK]</span>' : '<span style="color: #ff0000;font-weight: bolder">[ERRO]</span>'?>
       <br/>
       <br/>
       */
    ?>

            <b>Shortcodes</b>
            <br/>
コード例 #3
0
<?php

if (sebrae_active_nav_bar('config', true)) {
    ?>
    <div class="tabs" id="config">
        <?php 
    if (isset($_GET['save'])) {
        $save = $_GET['save'];
        if ($save == 'true') {
            echo '<div class="updated fade" style="padding: 10px">Configurações salvas com sucesso.</div>';
        } else {
            echo '<div class="error" style="padding: 10px">Falha ao salvar as configurações. Tente novamente.</div>';
        }
    }
    ?>
        <form method="post" action="<?php 
    echo get_admin_url();
    ?>
admin-post.php">
            <input type='hidden' name='action' value='submit-form' />
            <table class="form-table">
                <tbody>
                <tr>
                    <th scope="row"><label for="sebrae_hash">Hash de Identificação</label></th>
                    <td><input name="sebrae_hash" type="text" id="sebrae_hash" class="regular-text" value="<?php 
    echo sebrae_get_option('hash');
    ?>
" required></td>
                </tr>
                <tr>
                    <th scope="row"><label for="sebrae_user">Usuário</label></th>