Skip to content

Commit

Permalink
feat: capitalise labels (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasguillot authored Feb 24, 2022
1 parent a704b55 commit c6d348b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion includes/class-newspack-ads-custom-label.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static function settings_list( $settings_list ) {
return array_merge(
[
[
'description' => esc_html__( 'Custom ad label', 'newspack-ads' ),
'description' => esc_html__( 'Custom Ad Label', 'newspack-ads' ),
'help' => esc_html__( 'Add a custom text to be displayed right before your rendered ads.' ),
'section' => 'custom_label',
'key' => 'active',
Expand Down
6 changes: 3 additions & 3 deletions includes/class-newspack-ads-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public static function api_update_section( $request ) {
*
* @param object $setting The setting object to retrieve the key from.
*
* @return string Option name.
* @return string Option name.
*/
private static function get_setting_option_name( $setting ) {
$option_name = isset( $setting['key'] ) ? $setting['section'] . '_' . $setting['key'] : $setting['section'];
Expand Down Expand Up @@ -168,7 +168,7 @@ private static function get_setting_option_name( $setting ) {
public static function get_settings_list( $assoc = false ) {
$settings_list = array(
array(
'description' => __( 'Lazy loading', 'newspack-ads' ),
'description' => __( 'Lazy Loading', 'newspack-ads' ),
'help' => __( 'Enables pages to load faster, reduces resource consumption and contention, and improves viewability rate.', 'newspack-ads' ),
'section' => 'lazy_load',
'key' => 'active',
Expand Down Expand Up @@ -276,7 +276,7 @@ function( $setting ) use ( $section, $key ) {
*
* @param string $type The type of the setting.
* @param mixed $value The value to sanitize.
*
*
* @return mixed The sanitized value.
*/
private static function sanitize_setting_option( $type, $value ) {
Expand Down
6 changes: 3 additions & 3 deletions includes/class-newspack-ads-sidebar-placements.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static function init() {
* Get the placement key from the sidebar name.
*
* @param int|string $index Index, name, or ID of the dynamic sidebar.
*
*
* @return string The placement key.
*/
private static function get_placement_key( $index ) {
Expand Down Expand Up @@ -150,11 +150,11 @@ public static function add_sidebar_placements( $placements ) {
} else {
$placement_config['hooks'] = [
'before' => [
'name' => __( 'Before widget area', 'newspack-ads' ),
'name' => __( 'Before Widget Area', 'newspack-ads' ),
'hook_name' => sprintf( self::SIDEBAR_BEFORE_HOOK_NAME, $sidebar['id'] ),
],
'after' => [
'name' => __( 'After widget area', 'newspack-ads' ),
'name' => __( 'After Widget Area', 'newspack-ads' ),
'hook_name' => sprintf( self::SIDEBAR_AFTER_HOOK_NAME, $sidebar['id'] ),
],
];
Expand Down

0 comments on commit c6d348b

Please sign in to comment.