Skip to content

Commit 5e1f48a

Browse files
committed
Fix spelling, punctuation, and grammar
1 parent 2391511 commit 5e1f48a

File tree

3 files changed

+36
-36
lines changed

3 files changed

+36
-36
lines changed

README.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,29 @@ License URI: https://www.gnu.org/licenses/gpl-2.0.html
99
Tags: advertising, ad codes, ads, adsense, dfp, doubleclick for publishers
1010
Contributors: rinatkhaziev, jeremyfelt, danielbachhuber, carldanley, zztimur, automattic, doejo
1111

12-
Manage your ad codes through the WordPress admin in a safe and easy way.
12+
Manage your ad codes through the WordPress admin safely and easily.
1313

1414
## Description
1515

1616
Ad Code Manager gives non-developers an interface in the WordPress admin for configuring your complex set of ad codes.
1717

18-
Some code-level configuration may be necessary to set up Ad Code Manager. Ad tags must be added (via `do_action()`) to your theme's template files where you'd like ads to appear. Alternatively, you can incorporate ad tags into your website with our widget and our shortcode. Check out the configuration guide below for the full details.
18+
Some code-level configuration may be necessary to set up Ad Code Manager. Ad tags must be added (via `do_action()`) to your theme's template files where you'd like ads to appear. Alternatively, you can incorporate ad tags into your website with our widget and shortcode. Check out the configuration guide below for the full details.
1919

20-
A common set of parameters must also be defined for your ad provider. This includes the tag IDs used by your template, the default URL for your ad provider, and the default HTML surrounding that URL. Ad Code Manager comes with support for Google Doubleclick For Publishers (and Async), and Google AdSense. All the logic is abstracted, however, so configuring a different provider is relatively easy. Check `providers/doubleclick-for-publishers.php` for an idea of how to extend ACM to suit your needs.
20+
A common set of parameters must also be defined for your ad provider. This includes the tag IDs used by your template, the default URL for your ad provider, and the default HTML surrounding that URL. Ad Code Manager supports Google DoubleClick For Publishers (and Async), and Google AdSense. All the logic is abstracted, however, so configuring a different provider is relatively easy. Check `providers/doubleclick-for-publishers.php` for an idea of how to extend ACM to suit your needs.
2121

22-
Once this configuration is in place, the Ad Code Manager admin interface will allow you to add new ad codes, modify the parameters for your script URL, and define conditionals to determine when the ad code appears. Conditionals are core WordPress functions like is_page(), is_category(), or your own custom functions that evaluate certain expression and then return true or false.
22+
Once this configuration is in place, the Ad Code Manager admin interface will allow you to add new ad codes, modify the parameters for your script URL, and define conditionals to determine when the ad code appears. Conditionals are core WordPress functions like is_page(), is_category(), or your own custom functions that evaluate certain expressions and then return true or false.
2323

2424
[Fork the plugin on Github](https://github.com/Automattic/Ad-Code-Manager) and [follow our development blog](http://adcodemanager.wordpress.com/).
2525

2626
## Installation
2727

28-
The plugin requires PHP 7.4 or later. It is also test on WordPress 5.7 and later, though it may run on older versions.
28+
The plugin requires PHP 7.4 or later. It is also tested WordPress 5.7 and later, though it may run on older versions.
2929

3030
Since the plugin is in its early stages, there are a couple additional configuration steps:
3131

3232
1. Upload `ad-code-manager` to the `/wp-content/plugins/` directory.
3333
2. Activate the plugin through the 'Plugins' menu in WordPress.
34-
3. Incorporate ad tags in your theme template with `do_action( 'acm_tag', 'slot' )`. Also you can use `[acm-tag id="slot"]` shortcode or ACM Widget.
34+
3. Incorporate ad tags in your theme template with `do_action( 'acm_tag', 'slot' );`. Also, you can use `[acm-tag id="slot"]` shortcode or ACM Widget.
3535
4. Implement filters to make the plugin work with your provider.
3636
5. Configure your ad codes in the WordPress admin (Tools -> Ad Code Manager).
3737

@@ -51,11 +51,11 @@ Since the plugin is in its early stages, there are a couple additional configura
5151

5252
## Configure Ad Code Manager to manage the advertisements on your site
5353

54-
Ad Code Manager is a VIP-sponsored plugin designed to make it easier to manage the ad codes used to display advertisements on your site. There's a little bit of work you'll need to do up front, however, in order to integrate Ad Code Manager with your theme.
54+
Ad Code Manager is a VIP-sponsored plugin designed to make managing the ad codes used to display advertisements on your site easier. There's a little bit of work you'll need to do upfront to integrate Ad Code Manager with your theme.
5555

56-
The high-level idea behind Ad Code Manager is that it gives non-developers an admin interface to manage your ad codes. It then permits users to (optionally) target specific ad codes using conditionals like `is_home()` and `is_single()`. Ad codes are associated with positions in the theme through the use of ad tags.
56+
The high-level idea behind Ad Code Manager is that it gives non-developers an admin interface to manage ad codes. It then permits users to (optionally) target specific ad codes using conditionals like `is_home()` and `is_single()`. Ad codes are associated with positions in the theme through the use of ad tags.
5757

58-
Currently, Ad Code Manager easily integrates with Google Doubleclick For Publishers Async and Google AdSense. Other ad providers are supported with additional configuration.
58+
Currently, Ad Code Manager easily integrates with Google DoubleClick For Publishers Async and Google AdSense. Other ad providers are supported with additional configuration.
5959

6060
### Google AdSense and DoubleClick For Publishers Async
6161

@@ -65,11 +65,11 @@ Let's use AdSense as our first example. You'll want to incorporate some of the d
6565
do_action( 'acm_tag', '728x90_leaderboard' );
6666
~~~
6767

68-
Once you've done so, you can select the "Google AdSense" provider in the admin. Ad codes can be registered against ad tags (positions) by choosing the ad tag from the drop down, entering the tag ID and publisher ID, and hitting "Add New Ad Code".
68+
Once done, you can select the "Google AdSense" provider in the admin. Ad codes can be registered against ad tags (positions) by choosing the ad tag from the drop-down, entering the tag ID and publisher ID, and hitting "Add New Ad Code".
6969

7070
And like that, your 728x90 leaderboard will appear on your site.
7171

72-
The Google AdSense configuration comes with many of Google's suggested sizes. Additional ad tags can be registered by the way of filtering:
72+
The Google AdSense configuration comes with many of Google's suggested sizes. Additional ad tags can be registered by way of filtering:
7373

7474
~~~php
7575
add_filter( 'acm_ad_tag_ids', 'acmx_filter_ad_tag_ids' );
@@ -88,13 +88,13 @@ function acmx_filter_ad_tag_ids( $ids ) {
8888
}
8989
~~~
9090

91-
Keep in mind that you'll still need to incorporate a `do_action( 'acm_tag', '100x100_smallsquare' );` in your theme in order to display the ad tag.
91+
Keep in mind that you'll still need to incorporate a `do_action( 'acm_tag', '100x100_smallsquare' );` in your theme to display the ad tag.
9292

9393
If you choose Google DFP Async as your provider, you'll likely need to register additional ad tags, as we only package two default ad tags.
9494

9595
### Custom Ad Provider Implementations
9696

97-
As mentioned previously, other ad code providers are supported with additional configuration. Here's an example of the different filters you would use to configure the older version of Google Doubleclick For Publishers:
97+
As mentioned previously, other ad code providers are supported with additional configuration. Here's an example of the different filters you would use to configure the older version of Google DoubleClick For Publishers:
9898

9999
~~~php
100100
/**
@@ -240,10 +240,10 @@ There are some filters which allow you to easily customize the output of the plu
240240
241241
### `acm_ad_tag_ids`
242242
243-
Ad tag ids are used as a parameter when adding tags to your theme (e.g. `do_action( 'acm_tag', 'my_top_leaderboard' )`). The `url_vars` defined as part of each tag here will also be used to replace tokens in your default URL.
243+
Ad tag IDs are used as a parameter when adding tags to your theme (e.g. `do_action( 'acm_tag', 'my_top_leaderboard' )`). The `url_vars` defined as part of each tag here will also be used to replace tokens in your default URL.
244244
245245
Arguments:
246-
* array $tag_ids array of default tag ids
246+
* array $tag_ids array of default tag IDs
247247
248248
Example usage: Add a new ad tag called 'my_top_leaderboard'
249249
@@ -267,7 +267,7 @@ function my_acm_ad_tag_ids( $tag_ids ) {
267267
Set the default tokenized URL used when displaying your ad tags. This filter is required.
268268
269269
Arguments:
270-
* string $url The tokenized url of Ad Code
270+
* string $url The tokenized URL of Ad Code
271271
272272
Example usage: Set your default ad code URL
273273
@@ -282,7 +282,7 @@ function my_acm_default_url( $url ) {
282282
283283
### `acm_output_html`
284284
285-
The HTML outputted by the `do_action( 'acm_tag', 'ad_tag_id' );` call in your theme. Support multiple ad formats ( e.g. JavaScript ad tags, or simple HTML tags ) by adjusting the HTML rendered for a given ad tag.
285+
The HTML outputted by the `do_action( 'acm_tag', 'ad_tag_id' );` call in your theme. Support multiple ad formats (e.g. JavaScript or simple HTML tags) by adjusting the HTML rendered for a given ad tag.
286286
287287
The `%url%` token used in this HTML will be filled in with the URL defined with `acm_default_url`.
288288
@@ -311,7 +311,7 @@ function my_acm_output_html( $output_html, $tag_id ) {
311311
312312
### `acm_register_provider_slug`
313313
314-
Ad Code Manager has a built-in list of providers that it gathers by scanning the 'providers' directory used by the plugin. Additional providers can be added by placing the appropriate files in that directory, or by using the `acm_register_provider_slug` filter to register those that may be included as part of your theme or another plugin.
314+
Ad Code Manager has a built-in list of providers that it gathers by scanning the 'providers' directory used by the plugin. Additional providers can be added by placing the appropriate files in that directory or using the `acm_register_provider_slug` filter to register those that may be included as part of your theme or another plugin.
315315
316316
When using this plugin, you are defining the provider slug as part of the existing object as well as an array of classes associated with that provider slug.
317317
@@ -339,7 +339,7 @@ A security filter to define a safelist for which ad code script URLs can be adde
339339
Arguments:
340340
* array $whitelisted_urls Existing whitelisted ad code URLs
341341
342-
Example usage: Allow Doubleclick for Publishers ad codes to be used
342+
Example usage: Allow DoubleClick for Publishers ad codes to be used
343343
344344
~~~php
345345
add_filter( 'acm_whitelisted_script_urls', 'my_acm_safelisted_script_urls' );
@@ -351,11 +351,11 @@ function my_acm_safelisted_script_urls( $safelisted_urls ) {
351351
352352
### `acm_output_tokens`
353353
354-
Output tokens can be registered depending on the needs of your setup. Tokens defined here will be replaced in the ad tag's tokenized URL in addition to the tokens already registered with your tag id.
354+
Output tokens can be registered depending on the needs of your setup. Tokens defined here will be replaced in the ad tag's tokenized URL in addition to the tokens already registered with your tag ID.
355355
356356
Arguments:
357357
* array $output_tokens Any existing output tokens
358-
* string $tag_id Unique tag id
358+
* string $tag_id Unique tag ID
359359
* array $code_to_display Ad Code that matched conditionals
360360
361361
Example usage: Test to determine whether you're in test or production by passing ?test=on query argument
@@ -433,7 +433,7 @@ add_filter( 'acm_display_ad_codes_without_conditionals', '__return_true' );
433433
434434
### `acm_provider_slug`
435435
436-
By default, we use our bundled doubleclick_for_publishers config (check it in `/providers/doubleclick-for-publishers.php`). If you want to add your own flavor of DFP or even implement configuration for some another ad network, you'd have to apply a filter to correct the slug.
436+
By default, we use our bundled doubleclick_for_publishers config (check it in `/providers/doubleclick-for-publishers.php`). If you want to add your own flavor of DFP or even implement configuration for another ad network, you'd have to apply a filter to correct the slug.
437437
438438
Example usage:
439439
@@ -448,8 +448,8 @@ add_filter(
448448
449449
### `acm_logical_operator`
450450
451-
By default, logical operator is set to "OR", that is, ad code will be displayed if at least one conditional returns true.
452-
You can change it to "AND", so that ad code will be displayed only if ALL of the conditionals match.
451+
By default, the logical operator is set to "OR", that is, ad code will be displayed if at least one conditional returns true.
452+
You can change it to "AND", so that the ad code will be displayed only if ALL the conditionals match.
453453
454454
Example usage:
455455
@@ -464,7 +464,7 @@ add_filter(
464464
465465
### `acm_manage_ads_cap`
466466
467-
By default, user has to have `manage_options` cap. This filter comes in handy, if you want to relax the requirements.
467+
By default, the user has to have `manage_options` cap. This filter comes in handy if you want to relax the requirements.
468468
469469
Example usage:
470470
@@ -479,7 +479,7 @@ add_filter(
479479
480480
### `acm_allowed_get_posts_args`
481481
482-
This filter is only for edge cases. Most likely you won't have to touch it. Allows to include additional query args for `Ad_Code_Manager->get_ad_codes()` method.
482+
This filter is only for edge cases. Most likely, you won't have to touch it. Allows to include additional query args for `Ad_Code_Manager->get_ad_codes()` method.
483483
484484
Example usage:
485485
@@ -494,7 +494,7 @@ add_filter(
494494
495495
### `acm_ad_code_count`
496496
497-
By default, the total number of ad codes to get is 50, which is reasonable for any small to mid-sized site. However, in some certain cases you would want to increase the limit. This will affect `Ad_Code_Manager->get_ad_codes()` `numberposts` query argument.
497+
By default, the total number of ad codes to get is 50, which is reasonable for any small to mid-sized site. However, in certain cases, you would want to increase the limit. This will affect `Ad_Code_Manager->get_ad_codes()` `numberposts` query argument.
498498
499499
Example usage:
500500
@@ -529,7 +529,7 @@ function my_acm_list_table_columns( $columns ) {
529529
530530
### `acm_ad_code_args`
531531
532-
This filter comes in pair with previous one, it should return array of ad network specific parameters. E.g. in `acm_list_table_columns` example we have 'id', 'name', 'priority', 'conditionals'. All of them except 'name' are generic for Ad Code Manager. Hence, `acm_provider_columns` should return only "name".
532+
This filter comes in pair with the previous one. It should return an array of ad network-specific parameters. E.g. in `acm_list_table_columns` example, we have 'id', 'name', 'priority', and 'conditionals'. All of them except 'name' are generic for Ad Code Manager. Hence, `acm_provider_columns` should return only "name".
533533
534534
"editable" and "required" indicate whether this field should be editable and required.
535535

src/Providers/class-doubleclick-for-publishers.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Doubleclick for Publishers Ad Provider for Ad Code manager
3+
* DoubleClick for Publishers Ad Provider for Ad Code manager
44
*
55
* @since 0.1.3
66
*/
@@ -10,7 +10,7 @@ class Doubleclick_For_Publishers_Columns {
1010

1111
class Doubleclick_For_Publishers_ACM_Provider extends ACM_Provider {
1212
public $crawler_user_agent = 'Mediapartners-Google';
13-
13+
1414
function __construct() {
1515
// Default output HTML
1616
$this->output_html = '<script type="text/javascript" src="%url%"></script>';
@@ -91,7 +91,7 @@ function __construct() {
9191
'singular' => 'doubleclick_for_publishers_acm_wp_list_table', // Singular label
9292
'plural' => 'doubleclick_for_publishers_acm_wp_list_table', // plural label, also this well be one of the table css class
9393
'ajax' => true,
94-
)
94+
)
9595
);
9696
}
9797

src/UI/class-contextual-help.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ public function render( WP_Screen $screen ): void {
5050

5151
ob_start();
5252
?>
53-
<p><?php esc_html_e( 'Choose the ad network you use, and you will see a set of required fields to fill in, such as IDs. You can also set conditionals for each ad tag, which restricts the contexts for when the adverts are displayed. Priorities work pretty much the same way they work in WordPress. Lower numbers correspond with higher priority.', 'ad-code-manager' ); ?></p>
53+
<p><?php esc_html_e( 'Choose your ad network, and you will see a set of required fields to fill in, such as IDs. You can also set conditionals for each ad tag, which restricts the contexts for displaying the adverts. Priorities work pretty much the same way they work in WordPress. Lower numbers correspond with higher priority.', 'ad-code-manager' ); ?></p>
5454
<p><?php esc_html_e( 'Once you\'ve finished creating the ad codes, you can display them in your theme using:', 'ad-code-manager' ); ?></p>
5555
<ul>
56-
<li><?php echo wp_kses_post( __( 'a template tag in your theme: <code>&lt;?php do_action( \'acm_tag\', $tag_id ) ?></code>', 'ad-code-manager' ) ); ?></li>
56+
<li><?php echo wp_kses_post( __( 'a template tag in your theme: <code>&lt;?php do_action( \'acm_tag\', $tag_id ); ?></code>', 'ad-code-manager' ) ); ?></li>
5757
<li><?php echo wp_kses_post( __( 'a shortcode: <code>[acm-tag id="tag_id"]</code>', 'ad-code-manager' ) ); ?></li>
5858
<li><?php esc_html_e( 'or using a widget.', 'ad-code-manager' ); ?></li>
5959
</ul>
@@ -63,13 +63,13 @@ public function render( WP_Screen $screen ): void {
6363
ob_start();
6464
?>
6565
<p><?php esc_html_e( 'In the fields below, you can choose which conditionals you want. Some can take a value (i.e. define a specific category) in the second field.', 'ad-code-manager' ); ?></p>
66-
<p><?php esc_html_e( 'Here\'s an overview of the conditionals - they work the same as the functions of the same name in WordPress.', 'ad-code-manager' ); ?></p>
66+
<p><?php esc_html_e( 'Here\'s an overview of the conditionals; they work the same as the functions of the same name in WordPress.', 'ad-code-manager' ); ?></p>
6767
<dl>
6868
<dt><a href="https://developer.wordpress.org/reference/functions/is_home/">is_home</a></dt>
69-
<dd><?php echo wp_kses_post( __( 'When the main blog page is being displayed. This is the page which shows the time based blog content of your site, so if you\'ve set a static Page for the Front Page (see below), then this will only be true on the Page which you set as the "Posts page" in <i>Settings &gt; Reading</i>.', 'ad-code-manager' ) ); ?></dd>
69+
<dd><?php echo wp_kses_post( __( 'When the main blog page is being displayed. This is the page which shows the time-based blog content of your site, so if you\'ve set a static Page for the Front Page (see below), then this will only be true on the Page which you set as the "Posts page" in <i>Settings &gt; Reading</i>.', 'ad-code-manager' ) ); ?></dd>
7070

7171
<dt><a href="https://developer.wordpress.org/reference/functions/is_front_page">is_front_page</a></dt>
72-
<dd><?php echo wp_kses_post( __( 'When the front of the site is displayed, whether it is posts or a Page. Returns true when the main blog page is being displayed and the <i>Settings &gt; Reading &gt; Front page displays</i> is set to "Your latest posts", <b>or</b> when <i>Settings</a> &gt; Reading &gt; Front page displays</i> is set to "A static page" and the "Front Page" value is the current Page being displayed.', 'ad-code-manager' ) ); ?></dd>
72+
<dd><?php echo wp_kses_post( __( 'When the front of the site is displayed, whether it is posts or a Page. Returns true when the main blog page is being displayed and the <i>Settings &gt; Reading &gt; Front page displays</i> is set to "Your latest posts", <b>or</b> when <i>Settings</a> &gt; Reading &gt; Front page displays</i> is set to "A static page" and the "Front Page" value is the current page displayed.', 'ad-code-manager' ) ); ?></dd>
7373

7474
<dt><a href="https://developer.wordpress.org/reference/functions/is_category">is_category</a></dt>
7575
<dd><?php esc_html_e( 'When any Category archive page is being displayed.', 'ad-code-manager' ); ?></dd>

0 commit comments

Comments
 (0)