Skip to content

Commit 3c6ef72

Browse files
author
Cresencio Cantu
committed
Changes for the theme review
- don't bundle js - prefix various functions and output - fix screenshot - remove the theme url - remove footer link - use core jquery
1 parent c0593c9 commit 3c6ef72

17 files changed

Lines changed: 7232 additions & 171 deletions

README.txt

Lines changed: 22 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,36 @@
1-
Skip to content
2-
3-
Search or jump to…
1+
=== A Starting Point ===
2+
Contributors: can2
3+
Requires at least: 5.0
4+
Tested up to: 5.2
5+
Requires PHP: 5.6
6+
License: GPLv2 or later
7+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
48

5-
Pull requests
6-
Issues
7-
Marketplace
8-
Explore
9-
10-
@cresencio
11-
0
12-
0 0 cresencio/asp-theme
13-
Code Issues 0 Pull requests 0 Projects 0 Wiki Insights Settings
14-
asp-theme/readme.txt
15-
Cresencio Cantu initial commit
16-
e31d2a6 on Mar 19
17-
39 lines (24 sloc) 1.09 KB
18-
19-
=== ASP Theme ===
20-
21-
Contributors: automattic
22-
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
23-
24-
Requires at least: 4.5
25-
Tested up to: 4.8
26-
Stable tag: 1.0.0
27-
License: GNU General Public License v2 or later
28-
License URI: LICENSE
29-
30-
A starter theme called ASP Theme.
9+
A Starting Point is an "_s" or underscores based theme with some extra features.
3110

3211
== Description ==
12+
A Starting Point is an "_s" or underscores based theme with some extra features. Extra features include additional widget areas for the sidebar and footer and additional styles.
3313

34-
A starter theme for WordPress.
35-
36-
== Installation ==
14+
== Frequently Asked Questions ==
3715

38-
1. In your admin panel, go to Appearance > Themes and click the Add New button.
39-
2. Click Upload Theme and Choose File, then select the theme's .zip file. Click Install Now.
40-
3. Click Activate to use your new theme right away.
16+
= Does this theme use a front-end framework? =
4117

42-
== Frequently Asked Questions ==
18+
Yes, this theme includes a full copy of the latest version of Bootstrap.
4319

4420
= Does this theme support any plugins? =
4521

46-
ASP Theme includes support for Infinite Scroll in Jetpack.
22+
Yes, this theme supports the following plugins:
23+
24+
- Advanced Custom Fields
25+
- WooCommerce
4726

4827
== Changelog ==
4928

50-
= 1.0 - May 12 2015 =
51-
* Initial release
29+
= 1.0.0 =
30+
* Initial release.
5231

53-
== Credits ==
5432

55-
* Based on Underscores https://underscores.me/, (C) 2012-2017 Automattic, Inc., [GPLv2 or later](https://www.gnu.org/licenses/gpl-2.0.html)
56-
* normalize.css https://necolas.github.io/normalize.css/, (C) 2012-2016 Nicolas Gallagher and Jonathan Neal, [MIT](https://opensource.org/licenses/MIT)
57-
© 2019 GitHub, Inc.
58-
Terms
59-
Privacy
60-
Security
61-
Status
62-
Help
63-
Contact GitHub
64-
Pricing
65-
API
66-
Training
67-
Blog
68-
About
33+
== Resources ==
34+
* _s - http://underscores.me/
35+
* Bootstrap - https://getbootstrap.com/
36+
* Advanced Custom Fields - http://advancedcustomfields.com/

footer.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@
2727
printf( esc_html__( 'Proudly powered by %s', 'a-starting-point' ), 'WordPress' );
2828
?>
2929
</a>
30-
<span class="sep"> | </span>
31-
<?php
32-
/* translators: 1: Theme name, 2: Theme author. */
33-
printf( esc_html__( 'Theme: %1$s available on %2$s.', 'a-starting-point' ), 'A Starting Point', '<a href="https://github.com/cresencio/asp-theme">GitHub</a>' );
34-
?>
3530
</div><!-- .site-info -->
3631
</div>
3732
</div>

functions.php

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,13 @@ function a_starting_point_widgets_init() {
139139
*/
140140
function a_starting_point_scripts() {
141141

142-
wp_enqueue_style( 'style', get_stylesheet_uri() );
143-
wp_enqueue_script( 'header_js', get_template_directory_uri() . '/js/header-bundle.js', null, 1.0, false );
144-
wp_enqueue_script( 'footer_js', get_template_directory_uri() . '/js/footer-bundle.js', null, 1.0, true );
142+
wp_enqueue_style( 'a_starting_point_style', get_stylesheet_uri() );
143+
wp_enqueue_script( 'jquery');
144+
wp_enqueue_script( 'a_starting_point_popper', get_template_directory_uri() . '/js/popper.js', null, 1.15, true );
145+
wp_enqueue_script( 'a_starting_point_bootstrap', get_template_directory_uri() . '/js/bootstrap.js', null, 4.3, true );
146+
wp_enqueue_script( 'a_starting_point_navigation', get_template_directory_uri() . '/js/navigation.js', null, 1.0, true );
147+
wp_enqueue_script( 'a_starting_point_-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true );
148+
145149

146150
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
147151
wp_enqueue_script( 'comment-reply' );
@@ -197,27 +201,27 @@ function a_starting_point_scripts() {
197201

198202
// add the BS nav class to all menus
199203

200-
function add_bs_nav_class_to_menus( $args )
204+
function a_starting_point_add_bs_nav_class_to_menus( $args )
201205
{
202206
$args['menu_class'] .= ' nav';
203207
return $args;
204208
}
205209

206-
add_filter( 'wp_nav_menu_args', 'add_bs_nav_class_to_menus' );
210+
add_filter( 'wp_nav_menu_args', 'a_starting_point_add_bs_nav_class_to_menus' );
207211

208212
// add BS nav-item class to all li tags
209-
function add_bs_link_item_class_to_list_items($classes, $item, $args) {
213+
function a_starting_point_add_bs_link_item_class_to_list_items($classes, $item, $args) {
210214
$classes[] = 'nav-item';
211215
return $classes;
212216
}
213-
add_filter('nav_menu_css_class', 'add_bs_link_item_class_to_list_items', 1, 3);
217+
add_filter('nav_menu_css_class', 'a_starting_point_add_bs_link_item_class_to_list_items', 1, 3);
214218

215219
// add the BS nav-link class to all menu links
216-
function add_bs_nav_link_class_to_menu_links($atts) {
220+
function a_starting_point_add_bs_nav_link_class_to_menu_links($atts) {
217221
$atts['class'] = "nav-link";
218222
return $atts;
219223
}
220-
add_filter( 'nav_menu_link_attributes', 'add_bs_nav_link_class_to_menu_links');
224+
add_filter( 'nav_menu_link_attributes', 'a_starting_point_add_bs_nav_link_class_to_menu_links');
221225

222226
if ( ! function_exists( 'wp_body_open' ) ) :
223227
/**

header.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161

6262
<nav id="site-navigation" class="main-navigation">
6363

64-
<button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false"><?php esc_html_e( 'menu toggle', 'a-starting-point' ); ?></button>
64+
<button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false"><?php esc_html_e( 'menu', 'a-starting-point' ); ?></button>
6565
<?php
6666

6767
wp_nav_menu( array(

inc/acf-filters.php

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,43 +16,26 @@ function a_starting_point_acf_widget_custom_class( $params ) {
1616
$widget_name = $params[0]['widget_name'];
1717
$widget_id = $params[0]['widget_id'];
1818
// get acf value
19-
$custom_css_class_value = a_starting_point_clean_acf_text_fields(get_field('asp_custom_widget_class', 'widget_' . $widget_id));
19+
$a_starting_point_custom_css_class_value = a_starting_point_clean_acf_text_fields(get_field('asp_custom_widget_class', 'widget_' . $widget_id));
2020

21-
if( $custom_css_class_value ) {
22-
$params[0]['before_widget'] = str_replace( 'asp-theme-acf', esc_html( $custom_css_class_value ), $params[0]['before_widget'] );
21+
if( $a_starting_point_custom_css_class_value ) {
22+
$params[0]['before_widget'] = str_replace( 'asp-theme-acf', esc_html( $a_starting_point_custom_css_class_value ), $params[0]['before_widget'] );
2323
}
2424
// return
2525
return $params;
2626
}
2727
add_filter('dynamic_sidebar_params', 'a_starting_point_acf_widget_custom_class');
2828

29-
// add custom field value to menu class if it exists, also add icon for menu items
29+
// add custom field value to menu class if it exists
3030

3131
function a_starting_point_wp_nav_menu_objects( $items, $args ) {
3232

3333
$menu = $args->menu;
3434

35-
$custom_menu_class = get_field('asp_custom_menu_class', $menu);
36-
37-
if($custom_menu_class){
38-
$args->menu_class .= ' '. a_starting_point_clean_acf_text_fields($custom_menu_class);
39-
}
40-
41-
// loop
42-
foreach( $items as &$item ) {
43-
44-
// vars
45-
$icon = get_field('icon', $item);
46-
$hide_text = get_field('hide_text', $item);
47-
48-
49-
// append icon
50-
if( $icon ) {
51-
52-
( $hide_text ) ? $item->title = '<i class="'.$icon.'"></i>' : $item->title = '<i class="fas fa-'.$icon.'"></i> '. $item->title;
53-
54-
}
35+
$a_starting_point_custom_menu_class = get_field('asp_custom_menu_class', $menu);
5536

37+
if($a_starting_point_custom_menu_class){
38+
$args->menu_class .= ' '. a_starting_point_clean_acf_text_fields($a_starting_point_custom_menu_class);
5639
}
5740

5841
return $items;

inc/acf-json/group_5c97a8b57f2bf.json

Lines changed: 0 additions & 69 deletions
This file was deleted.

inc/customizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function a_starting_point_customize_partial_blogdescription() {
108108
* Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
109109
*/
110110
function a_starting_point_customize_preview_js() {
111-
wp_enqueue_script( 'asp-theme-customizer', get_template_directory_uri() . '/customizer.js', array( 'customize-preview' ), '20151215', true );
111+
wp_enqueue_script( 'asp-theme-customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20151215', true );
112112
}
113113
add_action( 'customize_preview_init', 'a_starting_point_customize_preview_js' );
114114

inc/template-tags.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,12 @@
1414
function a_starting_point_posted_on() {
1515
$time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
1616
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
17-
$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
17+
$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time>';
1818
}
1919

2020
$time_string = sprintf( $time_string,
2121
esc_attr( get_the_date( DATE_W3C ) ),
22-
esc_html( get_the_date() ),
23-
esc_attr( get_the_modified_date( DATE_W3C ) ),
24-
esc_html( get_the_modified_date() )
22+
esc_html( get_the_date() )
2523
);
2624

2725
$posted_on = sprintf(

0 commit comments

Comments
 (0)