Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refatoração do Tema #40

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
9de5c04
Alterações mínimas
rodineicosta Apr 23, 2021
429f272
Coding standards nos arquivos da pasta raiz
rodineicosta Apr 23, 2021
e58ee1a
Coding standards nos arquivos da pasta inc
rodineicosta Apr 23, 2021
31a464b
Coding standards (pasta section-parts)
rodineicosta Apr 23, 2021
6eae9c7
Coding standards e componentização do Customizer
rodineicosta May 6, 2021
00520c2
Coding standards em arquivos do customizer
rodineicosta May 6, 2021
1b6987a
Coding standards em arquivos da pasta inc
rodineicosta May 7, 2021
20a8028
Coding standards (pasta section-parts)
rodineicosta May 7, 2021
1557b95
Alterações mínimas
rodineicosta May 8, 2021
b6b303a
Fix: Corerção de nome de variável
rodineicosta May 8, 2021
ac335e8
Coding standards (pasta section-parts)
rodineicosta May 8, 2021
9161efc
Coding standards (pasta section-parts)
rodineicosta May 8, 2021
a5256ed
Alteração mínima
rodineicosta May 8, 2021
3f26cb6
Coding standards (pasta section-parts)
rodineicosta May 8, 2021
0d909b6
Fix: Sanitização
rodineicosta May 8, 2021
799ef7f
Coding standards (pasta template-parts)
rodineicosta May 9, 2021
02cf488
Fix: Substituição de variáveis globais do WordPress
rodineicosta May 9, 2021
d0959bd
Fix: Sanitização e PHPCS Ignore
rodineicosta May 9, 2021
2da98a7
Atualização do Readme.md
rodineicosta May 9, 2021
5e9c5e8
Instalação e configuração do Composer
rodineicosta May 9, 2021
ad40afe
Atualização do .gitignore
rodineicosta May 9, 2021
48e511e
Separação de Classes em arquivos
rodineicosta May 9, 2021
a724aa3
Atualização de carregamento de Classes nas seções
rodineicosta May 9, 2021
bb31161
Atualização do Composer
rodineicosta May 12, 2021
dcbdb74
Alteração do namespace e atualização do Composer
rodineicosta May 14, 2021
41564e3
FIx: Carregamento do Control-Scripts
rodineicosta May 15, 2021
7d9fca8
Remoção de trecho de código duplicado
rodineicosta May 15, 2021
ae8bcfa
Refatoração
rodineicosta May 18, 2021
9bc1603
Fix: Correção do nome da opção
rodineicosta May 19, 2021
c75569f
Fix: Esconder título e descrição do site
rodineicosta May 19, 2021
ffdfa12
Fix: Esconder o "Voltar ao topo"
rodineicosta May 19, 2021
834a14f
Alteração mínima
rodineicosta May 19, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
._*
.cache
.DS_Store
.editorconfig
.idea
.project
.settings
Expand All @@ -30,7 +31,15 @@ node_modules
.sass-cache

# Ignore project files
sftp-config.json
bin/
tests/
.ftppass
*.zip
src/node_modules/*
.phpcs.xml.dist
.travis.yml
sftp-config.json
phpcs.ruleset.xml
phpunit.xml.dist

vendor/*
!vendor/autoload.php
!vendor/composer/
29 changes: 16 additions & 13 deletions 404.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
*
* @link https://codex.wordpress.org/Creating_an_Error_404_Page
*
* @package coletivo
* @package Coletivo
*/

get_header(); ?>
get_header();
?>
<div id="content" class="site-content">
<div id="content-inside" class="container no-sidebar">
<h1 class="fullheader-title">404</h1>
Expand All @@ -24,22 +25,24 @@

<?php the_widget( 'WP_Widget_Recent_Posts' ); ?>

<?php if ( coletivo_categorized_blog() ) : // Only show the widget if site has multiple categories. ?>
<?php if ( coletivo_categorized_blog() ) { // Only show the widget if site has multiple categories. ?>
<div class="widget widget_categories">
<h2 class="widget-title"><?php esc_html_e( 'Most Used Categories', 'coletivo' ); ?></h2>
<ul>
<?php
wp_list_categories( array(
'orderby' => 'count',
'order' => 'DESC',
'show_count' => 1,
'title_li' => '',
'number' => 3,
) );
wp_list_categories(
array(
'orderby' => 'count',
'order' => 'DESC',
'show_count' => 1,
'title_li' => '',
'number' => 3,
)
);
?>
</ul>
</div><!-- .widget -->
<?php endif; ?>
<?php } ?>

<?php the_widget( 'WP_Widget_Tag_Cloud' ); ?>

Expand All @@ -51,5 +54,5 @@

</div><!--#content-inside -->
</div><!-- #content -->
<?php get_footer(); ?>

<?php get_footer(); ?>
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ for business, portfolio, digital agency, product showcase, freelancers and
everyone else who appreciate good design. Is a fork of the OnePress theme,
by Fame Themes.

* Contributors: redelivre, brasadesign, famethemes, congthien, kientrong, diegorojas, matheusgimenez, 2aces
* Contributors: [redelivre](https://github.com/redelivre), [brasadesign](https://profiles.wordpress.org/brasadesign/), [famethemes](https://profiles.wordpress.org/famethemes/), [congthien](https://profiles.wordpress.org/congthien/), [kientrong](https://profiles.wordpress.org/kientrong/), [diegorojas](https://profiles.wordpress.org/diegorojas/), [matheusgimenez](https://profiles.wordpress.org/matheusgimenez/), [2aces](https://profiles.wordpress.org/2aces/), [rodineicosta](https://profiles.wordpress.org/rodineicosta/)
* Tags: one-column, two-columns, left-sidebar, right-sidebar, fluid-layout, responsive-layout, custom-menu, featured-images, full-width-template, sticky-post, theme-options, threaded-comments, translation-ready, blue, light
* Tested up to: 5.2
* Stable tag: 1.7
Expand All @@ -16,7 +16,7 @@ by Fame Themes.

Coletivo is distributed under the terms of the GNU GPL

[![Join the chat at https://telegram.me/IdentidadeDigital](https://patrolavia.github.io/telegram-badge/chat.png)](https://t.me/RedeLivreOrg)
<a href="http://www.gnu.org/licenses/gpl-2.0.html"><img src="https://img.shields.io/badge/License-GPL%20v2-orange.svg"></a> [![Join the chat at https://telegram.me/IdentidadeDigital](https://patrolavia.github.io/telegram-badge/chat.png)](https://t.me/RedeLivreOrg)

# capturas
![Screenshot](./screenshot.png)
Expand All @@ -27,12 +27,12 @@ Coletivo is distributed under the terms of the GNU GPL
2. Click Upload and Choose File, then select the theme's .zip file. Click Install Now.
3. Click Activate to use your new theme right away.

## Frequently Asked Questions
## Frequently Asked Questions

### How to set up the blog page?
First create a page and give it a name ( Note this page will also be the URL of your blog, example "Blog", "News" ... ), at the right site - Template section select Blog Page and then Save. Now you can access your blog at http://yourdomain.com/blog ( or http://yourdomain.com/news )

### How to set up the one page menu like the demo?
### How to set up the one page menu like the demo?

There are a lot of sections available in these theme: Hero, Features, Your Slider, Featured Page, Services, Portfolio, Video Lightbox, Gallery, Team, News, Contact.
For each section, you will need to create a text link menu with anchor point to the ID of the section, like:
Expand Down
50 changes: 28 additions & 22 deletions archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,49 +7,55 @@
* @package coletivo
*/

get_header(); ?>
get_header();
?>

<div id="content" class="site-content">

<div class="page-header">
<div class="container">
<?php the_archive_title( '<h1 class="page-title">', '</h1>' ); ?>
<?php the_archive_description( '<div class="taxonomy-description">', '</div>' ); ?>
<?php
the_archive_title( '<h1 class="page-title">', '</h1>' );
the_archive_description( '<div class="taxonomy-description">', '</div>' );
?>
</div><!-- container -->
</div><!-- page-header -->

<?php if ( function_exists( 'coletivo_breadcrumb' ) ) : ?>
<?php echo coletivo_breadcrumb(); ?>
<?php endif; ?>
<?php
if ( function_exists( 'coletivo_breadcrumb' ) ) {
echo wp_kses_post( coletivo_breadcrumb() );
}
?>

<div id="content-inside" class="container">
<main id="main" class="site-main" role="main">

<?php if ( have_posts() ) : ?>
<?php
if ( have_posts() ) {

<?php while ( have_posts() ) : the_post(); ?>
while ( have_posts() ) {
the_post();

<?php
/*
* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'template-parts/content', 'list' );
?>
/*
* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'template-parts/content', 'list' );

<?php endwhile; ?>
}

<?php the_posts_navigation(); ?>
the_posts_navigation();

<?php else : ?>
} else {

<?php get_template_part( 'template-parts/content', 'none' ); ?>
get_template_part( 'template-parts/content', 'none' );

<?php endif; ?>
}
?>

</main><!-- #main -->
</div><!--#content-inside -->
</div><!-- #content -->

<?php get_footer(); ?>
<?php get_footer(); ?>
36 changes: 19 additions & 17 deletions comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package coletivo
* @package Coletivo
*/

/*
Expand All @@ -24,18 +24,18 @@

<?php // You can start editing here -- including this comment! ?>

<?php if ( have_comments() ) : ?>
<?php if ( have_comments() ) { ?>
<h3 class="comments-title">
<?php
printf( // WPCS: XSS OK.
esc_html( _nx( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'coletivo' ) ),
number_format_i18n( get_comments_number() ),
'<span>' . get_the_title() . '</span>'
printf(
esc_html( _nx( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'coletivo' ) ), // phpcs:ignore
wp_kses_post( number_format_i18n( get_comments_number() ) ),
'<span>' . esc_html( get_the_title() ) . '</span>'
);
?>
</h3>

<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) { // Are there comments to navigate through? ?>
<nav id="comment-nav-above" class="navigation comment-navigation" role="navigation">
<h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'coletivo' ); ?></h2>
<div class="nav-links">
Expand All @@ -45,17 +45,19 @@

</div><!-- .nav-links -->
</nav><!-- #comment-nav-above -->
<?php endif; // Check for comment navigation. ?>
<?php } // Check for comment navigation. ?>

<ol class="comment-list">
<?php
wp_list_comments( array(
wp_list_comments(
array(
'callback' => 'coletivo_comment',
) );
)
);
?>
</ol><!-- .comment-list -->

<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) { // Are there comments to navigate through? ?>
<nav id="comment-nav-below" class="navigation comment-navigation" role="navigation">
<h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'coletivo' ); ?></h2>
<div class="nav-links">
Expand All @@ -65,16 +67,16 @@

</div><!-- .nav-links -->
</nav><!-- #comment-nav-below -->
<?php endif; // Check for comment navigation. ?>
<?php } // Check for comment navigation. ?>

<?php endif; // Check for have_comments(). ?>
<?php } // Check for have_comments(). ?>

<?php
// If comments are closed and there are comments, let's leave a little note, shall we?
if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
?>
// If comments are closed and there are comments, let's leave a little note, shall we?
if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) {
?>
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'coletivo' ); ?></p>
<?php endif; ?>
<?php } ?>

<?php comment_form(); ?>

Expand Down
22 changes: 22 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "redelivre/coletivo",
"description": "Coletivo theme is an outstanding creative and flexible WordPress one page theme well suited for business, portfolio, digital agency, product showcase, freelancers and everyone else who appreciate good design.",
"homepage": "https://tema.coletivowp.com.br/",
"type": "wordpress-theme",
"license": "GPLv2",
"authors": [
{
"name": "Rede Livre"
},
{
"name": "Rodinei Costa",
"email": "[email protected]",
"role": "Developer"
}
],
"autoload": {
"psr-4": {
"RedeLivre\\Coletivo\\": "inc/classes/"
}
}
}
18 changes: 18 additions & 0 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

61 changes: 31 additions & 30 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,39 @@
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package coletivo
* @package Coletivo
*/

?>
<footer id="colophon" class="site-footer" role="contentinfo">
<?php $coletivo_btt_disable = get_theme_mod( 'coletivo_btt_disable' ); ?>
<div class="site-info">
<div class="container">
<?php if ( $coletivo_btt_disable != '1' ) : ?>
<div class="btt">
<a class="back-top-top" href="#page" title="<?php echo esc_html__('Back To Top', 'coletivo') ?>"><i class="fa fa-angle-double-up wow flash" data-wow-duration="2s"></i></a>
</div><!-- btt -->
<?php endif; ?>
<?php
/**
* Hooked: coletivo_footer_site_info
*
* @see coletivo_footer_site_info
*/
do_action( 'coletivo_footer_site_info' );
?>
</div><!-- container -->
</div><!-- .site-info -->
</footer><!-- #colophon -->
<?php
/**
* Hooked: coletivo_site_footer
*
* @see coletivo_site_footer
*/
do_action( 'coletivo_site_end' );
?>
<footer id="colophon" class="site-footer" role="contentinfo">
<?php $coletivo_btt_disable = get_theme_mod( 'coletivo_btt_disable' ); ?>
<div class="site-info">
<div class="container">
<?php if ( true !== $coletivo_btt_disable ) { ?>
<div class="btt">
<a class="back-top-top" href="#page" title="<?php echo esc_html__( 'Back To Top', 'coletivo' ); ?>"><i class="fa fa-angle-double-up wow flash" data-wow-duration="2s"></i></a>
</div><!-- btt -->
<?php } ?>

<?php
/**
* Hooked: coletivo_footer_site_info
*
* @see coletivo_footer_site_info
*/
do_action( 'coletivo_footer_site_info' );
?>
</div><!-- container -->
</div><!-- .site-info -->
</footer><!-- #colophon -->
<?php
/**
* Hooked: coletivo_site_footer
*
* @see coletivo_site_footer
*/
do_action( 'coletivo_site_end' );
?>
</div><!-- #page -->

<?php wp_footer(); ?>
Expand Down
Loading