Skip to content

Commit c0593c9

Browse files
author
Cresencio Cantu
committed
Update everything for theme review
1 parent db5bb48 commit c0593c9

28 files changed

Lines changed: 234 additions & 204 deletions

404.php

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* @link https://codex.wordpress.org/Creating_an_Error_404_Page
66
*
7-
* @package ASP_Theme
7+
* @package a_starting_point
88
*/
99

1010
get_header();
@@ -15,46 +15,46 @@
1515

1616
<section class="error-404 not-found">
1717
<header class="page-header">
18-
<h1 class="page-title"><?php esc_html_e( 'Oops! That page can&rsquo;t be found.', 'asp-theme' ); ?></h1>
18+
<h1 class="page-title"><?php esc_html_e( 'Oops! That page can&rsquo;t be found.', 'a-starting-point' ); ?></h1>
1919
</header><!-- .page-header -->
2020

2121
<div class="page-content">
22-
<p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'asp-theme' ); ?></p>
22+
<p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'a-starting-point' ); ?></p>
2323

24-
<?php
25-
get_search_form();
26-
27-
the_widget( 'WP_Widget_Recent_Posts' );
28-
?>
29-
30-
<div class="widget widget_categories">
31-
<h2 class="widget-title"><?php esc_html_e( 'Most Used Categories', 'asp-theme' ); ?></h2>
32-
<ul>
33-
<?php
34-
wp_list_categories( array(
35-
'orderby' => 'count',
36-
'order' => 'DESC',
37-
'show_count' => 1,
38-
'title_li' => '',
39-
'number' => 10,
40-
) );
41-
?>
42-
</ul>
43-
</div><!-- .widget -->
44-
45-
<?php
46-
/* translators: %1$s: smiley */
47-
$asp_theme_archive_content = '<p>' . sprintf( esc_html__( 'Try looking in the monthly archives. %1$s', 'asp-theme' ), convert_smilies( ':)' ) ) . '</p>';
48-
the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=</h2>$asp_theme_archive_content" );
49-
50-
the_widget( 'WP_Widget_Tag_Cloud' );
51-
?>
24+
<?php get_search_form(); ?>
5225

5326
</div><!-- .page-content -->
5427
</section><!-- .error-404 -->
5528

5629
</main><!-- #main -->
5730
</div><!-- #primary -->
5831

32+
<aside id="secondary" class="widget-area">
33+
<div class="row">
34+
<?php the_widget( 'WP_Widget_Recent_Posts' ); ?>
35+
<div class="widget widget_categories">
36+
<h2 class="widget-title"><?php esc_html_e( 'Most Used Categories', 'a-starting-point' ); ?></h2>
37+
<ul>
38+
<?php
39+
wp_list_categories( array(
40+
'orderby' => 'count',
41+
'order' => 'DESC',
42+
'show_count' => 1,
43+
'title_li' => '',
44+
'number' => 10,
45+
) );
46+
?>
47+
</ul>
48+
</div><!-- .widget -->
49+
<?php
50+
/* translators: %1$s: smiley */
51+
$a_starting_point_archive_content = '<p>' . sprintf( esc_html__( 'Try looking in the monthly archives. %1$s', 'a-starting-point' ), convert_smilies( ':)' ) ) . '</p>';
52+
the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=</h2>$a_starting_point_archive_content" );
53+
54+
the_widget( 'WP_Widget_Tag_Cloud' );
55+
?>
56+
</div>
57+
</aside><!-- #secondary -->
58+
5959
<?php
6060
get_footer();

archive.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
66
*
7-
* @package ASP_Theme
7+
* @package a_starting_point
88
*/
99

1010
get_header();

comments.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
99
*
10-
* @package ASP_Theme
10+
* @package a_starting_point
1111
*/
1212

1313
/*
@@ -28,19 +28,19 @@
2828
?>
2929
<h2 class="comments-title">
3030
<?php
31-
$asp_theme_comment_count = get_comments_number();
32-
if ( '1' === $asp_theme_comment_count ) {
31+
$a_starting_point_comment_count = get_comments_number();
32+
if ( '1' === $a_starting_point_comment_count ) {
3333

3434
printf(
3535
/* translators: 1: title. */
36-
esc_html__( 'One thought on &ldquo;%1$s&rdquo;', 'asp-theme' ),
36+
esc_html__( 'One thought on &ldquo;%1$s&rdquo;', 'a-starting-point' ),
3737
'<span>' . esc_html( get_the_title() ) . '</span>'
3838
);
3939
} else {
4040
printf( // WPCS: XSS OK.
4141
/* translators: 1: comment count number, 2: title. */
42-
esc_html( _nx( '%1$s thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', $asp_theme_comment_count, 'comments title', 'asp-theme' ) ),
43-
number_formati18n( $asp_theme_comment_count ),
42+
esc_html( _nx( '%1$s thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', $a_starting_point_comment_count, 'comments title', 'a-starting-point' ) ),
43+
number_format_i18n( $a_starting_point_comment_count ),
4444
'<span>' . get_the_title() . '</span>'
4545
);
4646
}
@@ -64,7 +64,7 @@
6464
// If comments are closed and there are comments, let's leave a little note, shall we?
6565
if ( ! comments_open() ) :
6666
?>
67-
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'asp-theme' ); ?></p>
67+
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'a-starting-point' ); ?></p>
6868
<?php
6969
endif;
7070

footer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
88
*
9-
* @package ASP_Theme
9+
* @package a_starting_point
1010
*/
1111

1212
?>
@@ -21,16 +21,16 @@
2121
<div class="container-fluid">
2222
<div class="row">
2323
<div class="site-info">
24-
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'asp-theme' ) ); ?>">
24+
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'a-starting-point' ) ); ?>">
2525
<?php
2626
/* translators: %s: CMS name, i.e. WordPress. */
27-
printf( esc_html__( 'Proudly powered by %s', 'asp-theme' ), 'WordPress' );
27+
printf( esc_html__( 'Proudly powered by %s', 'a-starting-point' ), 'WordPress' );
2828
?>
2929
</a>
3030
<span class="sep"> | </span>
3131
<?php
3232
/* translators: 1: Theme name, 2: Theme author. */
33-
printf( esc_html__( 'Theme: %1$s available on %2$s.', 'asp-theme' ), 'asp-theme', '<a href="https://github.com/cresencio/asp-theme">GitHub</a>' );
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>' );
3434
?>
3535
</div><!-- .site-info -->
3636
</div>

functions.php

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,25 @@
44
*
55
* @link https://developer.wordpress.org/themes/basics/theme-functions/
66
*
7-
* @package ASP_Theme
7+
* @package a_starting_point
88
*/
99

10-
if ( ! function_exists( 'asp_theme_setup' ) ) :
10+
if ( ! function_exists( 'a_starting_point_setup' ) ) :
1111
/**
1212
* Sets up theme defaults and registers support for various WordPress features.
1313
*
1414
* Note that this function is hooked into the after_setup_theme hook, which
1515
* runs before the init hook. The init hook is too late for some features, such
1616
* as indicating support for post thumbnails.
1717
*/
18-
function asp_theme_setup() {
18+
function a_starting_point_setup() {
1919
/*
2020
* Make theme available for translation.
2121
* Translations can be filed in the /languages/ directory.
2222
* If you're building a theme based on ASP Theme, use a find and replace
23-
* to change 'asp-theme' to the name of your theme in all the template files.
23+
* to change 'a-starting-point' to the name of your theme in all the template files.
2424
*/
25-
load_theme_textdomain( 'asp-theme', get_template_directory() . '/languages' );
25+
load_theme_textdomain( 'a-starting-point', get_template_directory() . '/languages' );
2626

2727
// Add default posts and comments RSS feed links to head.
2828
add_theme_support( 'automatic-feed-links' );
@@ -44,7 +44,7 @@ function asp_theme_setup() {
4444

4545
// This theme uses wp_nav_menu() in one location.
4646
register_nav_menus( array(
47-
'menu-1' => esc_html__( 'Primary', 'asp-theme' ),
47+
'menu-1' => esc_html__( 'Primary', 'a-starting-point' ),
4848
) );
4949

5050
/*
@@ -60,7 +60,7 @@ function asp_theme_setup() {
6060
) );
6161

6262
// Set up the WordPress core custom background feature.
63-
add_theme_support( 'custom-background', apply_filters( 'asp_theme_custom_background_args', array(
63+
add_theme_support( 'custom-background', apply_filters( 'a_starting_point_custom_background_args', array(
6464
'default-color' => '000000',
6565
'default-image' => '',
6666
) ) );
@@ -81,7 +81,7 @@ function asp_theme_setup() {
8181
) );
8282
}
8383
endif;
84-
add_action( 'after_setup_theme', 'asp_theme_setup' );
84+
add_action( 'after_setup_theme', 'a_starting_point_setup' );
8585

8686
/**
8787
* Set the content width in pixels, based on the theme's design and stylesheet.
@@ -90,54 +90,54 @@ function asp_theme_setup() {
9090
*
9191
* @global int $content_width
9292
*/
93-
function asp_theme_content_width() {
93+
function a_starting_point_content_width() {
9494
// This variable is intended to be overruled from themes.
9595
// Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}.
9696
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
97-
$GLOBALS['content_width'] = apply_filters( 'asp_theme_content_width', 640 );
97+
$GLOBALS['content_width'] = apply_filters( 'a_starting_point_content_width', 640 );
9898
}
99-
add_action( 'after_setup_theme', 'asp_theme_content_width', 0 );
99+
add_action( 'after_setup_theme', 'a_starting_point_content_width', 0 );
100100

101101
/**
102102
* Register widget area.
103103
*
104104
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
105105
*/
106-
function asp_theme_widgets_init() {
106+
function a_starting_point_widgets_init() {
107107
register_sidebar( array(
108-
'name' => esc_html__( 'Header', 'asp-theme' ),
108+
'name' => esc_html__( 'Header', 'a-starting-point' ),
109109
'id' => 'sidebar-header',
110-
'description' => esc_html__( 'Add header widgets here.', 'asp-theme' ),
110+
'description' => esc_html__( 'Add header widgets here.', 'a-starting-point' ),
111111
'before_widget' => '<section id="%1$s" class="widget asp-theme-acf %2$s">',
112112
'after_widget' => '</section>',
113113
'before_title' => '<h2 class="widget-title">',
114114
'after_title' => '</h2>',
115115
) );
116116
register_sidebar( array(
117-
'name' => esc_html__( 'Footer', 'asp-theme' ),
117+
'name' => esc_html__( 'Footer', 'a-starting-point' ),
118118
'id' => 'sidebar-footer',
119-
'description' => esc_html__( 'Add footer widgets here.', 'asp-theme' ),
119+
'description' => esc_html__( 'Add footer widgets here.', 'a-starting-point' ),
120120
'before_widget' => '<section id="%1$s" class="widget asp-theme-acf %2$s">',
121121
'after_widget' => '</section>',
122122
'before_title' => '<h2 class="widget-title">',
123123
'after_title' => '</h2>',
124124
) );
125125
register_sidebar( array(
126-
'name' => esc_html__( 'Sidebar', 'asp-theme' ),
126+
'name' => esc_html__( 'Sidebar', 'a-starting-point' ),
127127
'id' => 'sidebar-1',
128-
'description' => esc_html__( 'Add widgets here.', 'asp-theme' ),
128+
'description' => esc_html__( 'Add widgets here.', 'a-starting-point' ),
129129
'before_widget' => '<section id="%1$s" class="widget asp-theme-acf %2$s">',
130130
'after_widget' => '</section>',
131131
'before_title' => '<h2 class="widget-title">',
132132
'after_title' => '</h2>',
133133
) );
134134
}
135-
add_action( 'widgets_init', 'asp_theme_widgets_init' );
135+
add_action( 'widgets_init', 'a_starting_point_widgets_init' );
136136

137137
/**
138138
* Enqueue scripts and styles.
139139
*/
140-
function asp_theme_scripts() {
140+
function a_starting_point_scripts() {
141141

142142
wp_enqueue_style( 'style', get_stylesheet_uri() );
143143
wp_enqueue_script( 'header_js', get_template_directory_uri() . '/js/header-bundle.js', null, 1.0, false );
@@ -147,7 +147,7 @@ function asp_theme_scripts() {
147147
wp_enqueue_script( 'comment-reply' );
148148
}
149149
}
150-
add_action( 'wp_enqueue_scripts', 'asp_theme_scripts' );
150+
add_action( 'wp_enqueue_scripts', 'a_starting_point_scripts' );
151151

152152
/**
153153
* Implement the Custom Header feature.

header.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
88
*
9-
* @package ASP_Theme
9+
* @package a_starting_point
1010
*/
1111

1212
?>
@@ -23,7 +23,7 @@
2323
<?php wp_body_open(); ?>
2424
<div id="page" class="site">
2525

26-
<a class="skip-link screen-reader-text sr-only" href="#content"><?php esc_html_e( 'Skip to content', 'asp-theme' ); ?></a>
26+
<a class="skip-link screen-reader-text sr-only" href="#content"><?php esc_html_e( 'Skip to content', 'a-starting-point' ); ?></a>
2727

2828
<header id="masthead" class="site-header">
2929

@@ -49,19 +49,19 @@
4949
<?php
5050
endif;
5151

52-
$asp_theme_description = get_bloginfo( 'description', 'display' );
52+
$a_starting_point_description = get_bloginfo( 'description', 'display' );
5353

54-
if ( $asp_theme_description || is_customize_preview() ) : ?>
54+
if ( $a_starting_point_description || is_customize_preview() ) : ?>
5555

56-
<p class="site-description"><?php echo $asp_theme_description; /* WPCS: xss ok. */ ?></p>
56+
<p class="site-description"><?php echo $a_starting_point_description; /* WPCS: xss ok. */ ?></p>
5757

5858
<?php endif; ?>
5959

6060
</div><!-- .site-branding -->
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', 'asp-theme' ); ?></button>
64+
<button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false"><?php esc_html_e( 'menu toggle', 'a-starting-point' ); ?></button>
6565
<?php
6666

6767
wp_nav_menu( array(

inc/acf-filters.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// simple function for dealing with text fields
44
// removes special characters for html attributes
5-
function clean_acf_text_fields($string) {
5+
function a_starting_point_clean_acf_text_fields($string) {
66
// sanitize the text before anything
77
$string = sanitize_text_field( $string );
88
//replace any remaining special characters with white space (except for - and _)
@@ -11,31 +11,31 @@ function clean_acf_text_fields($string) {
1111
}
1212

1313
// Add the custom classes to widgets (and blocks too I guess)
14-
function acf_widget_custom_class( $params ) {
14+
function a_starting_point_acf_widget_custom_class( $params ) {
1515
// get widget vars
1616
$widget_name = $params[0]['widget_name'];
1717
$widget_id = $params[0]['widget_id'];
1818
// get acf value
19-
$custom_css_class_value = clean_acf_text_fields(get_field('asp_custom_widget_class', 'widget_' . $widget_id));
19+
$custom_css_class_value = a_starting_point_clean_acf_text_fields(get_field('asp_custom_widget_class', 'widget_' . $widget_id));
2020

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

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

31-
function asp_theme_wp_nav_menu_objects( $items, $args ) {
31+
function a_starting_point_wp_nav_menu_objects( $items, $args ) {
3232

3333
$menu = $args->menu;
3434

3535
$custom_menu_class = get_field('asp_custom_menu_class', $menu);
3636

3737
if($custom_menu_class){
38-
$args->menu_class .= ' '. clean_acf_text_fields($custom_menu_class);
38+
$args->menu_class .= ' '. a_starting_point_clean_acf_text_fields($custom_menu_class);
3939
}
4040

4141
// loop
@@ -57,4 +57,4 @@ function asp_theme_wp_nav_menu_objects( $items, $args ) {
5757

5858
return $items;
5959
}
60-
add_filter('wp_nav_menu_objects', 'asp_theme_wp_nav_menu_objects', 10, 2);
60+
add_filter('wp_nav_menu_objects', 'a_starting_point_wp_nav_menu_objects', 10, 2);

0 commit comments

Comments
 (0)