class-premium-beacon-setting.php
3.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?php
/**
* @package WPSEO\Admin
*/
/**
* Implements the suggestions for Yoast SEO Premium
*/
class WPSEO_Premium_Beacon_Setting implements Yoast_HelpScout_Beacon_Setting {
/**
* Returns a list of helpscout hashes to show the user for a certain page.
*
* @param string $page The current admin page we are on.
*
* @return array A list of suggestions for the beacon
*/
public function get_suggestions( $page ) {
switch ( $page ) {
case 'wpseo_dashboard':
return array(
'543752a7e4b01a27d3c00010',
// See: http://kb.yoast.com/article/164-how-to-connect-your-website-to-google-webmaster-tools.
'5469dc20e4b0f6394183a0a5',
// See: http://kb.yoast.com/article/183-microformats-and-schema-org.
);
case 'wpseo_titles':
return array(
'53a820b7e4b02b018b783607',
// See: http://kb.yoast.com/article/146-yoast-wordpress-seo-titles-metas-template-variables.
'537f0723e4b0fe61cc352111',
// See: http://kb.yoast.com/article/107-google-shows-different-titles-for-my-site.
'5375f937e4b0d833740d57ac',
// See: http://kb.yoast.com/article/75-im-not-seeing-a-meta-description-in-my-head-section.
);
case 'wpseo_social':
return array(
'54cc3f0de4b034c37ea8c722',
// See: http://kb.yoast.com/article/219-getting-open-graph-for-your-articles.
'556df3e2e4b01a224b428375',
// See: http://kb.yoast.com/article/254-gaining-access-to-facebook-insights.
'53c4f5a9e4b085fad945d02d',
// See: http://kb.yoast.com/article/147-setting-up-twitter-cards-in-wordpress-seo.
);
case 'wpseo_xml':
return array(
'5375e852e4b03c6512282d5a',
// See: http://kb.yoast.com/article/36-my-sitemap-is-blank-what-s-wrong.
'5375f58ce4b03c6512282d98',
// See: http://kb.yoast.com/article/58-xml-sitemap-error.
'5375f9b6e4b0d833740d57bc',
// See: http://kb.yoast.com/article/77-my-sitemap-index-is-giving-a-404-error-what-should-i-do.
);
case 'wpseo_advanced':
return array(
'55310094e4b0a2d7e23f5f13',
// See: http://kb.yoast.com/article/245-implement-wordpress-seo-breadcrumbs.
'55ace6bfe4b03e788eda48a4',
// See: http://kb.yoast.com/article/274-add-theme-support-for-yoast-seo-breadcrumbs.
);
case 'wpseo_tools':
return array(
'5632ca35c697910ae05ef6cd',
// See: http://kb.yoast.com/article/305-how-to-edit-htaccess-through-yoast-seo.
'55b8ef7ae4b01fdb81eae86a',
// See: http://kb.yoast.com/article/279-how-to-edit-robots-txt-through-yoast-seo.
'53a0a63de4b0aa24c5341503',
// See: http://kb.yoast.com/article/141-if-your-robots-txt-were-writeable-error.
);
case 'wpseo_search_console':
return array(
'5632d2adc697910ae05ef6da',
// See: http://kb.yoast.com/article/306-how-to-connect-and-retrieve-crawl-issues.
'53a1903fe4b0295576d0c7a0',
// See: http://kb.yoast.com/article/142-what-are-regex-redirects.
'5375f3f9e4b0d833740d5760',
// See: http://kb.yoast.com/article/51-import-redirects.
);
case 'wpseo_redirects':
return array( '5385c1c9e4b06542b1a212e2', '55c2b57ee4b01fdb81eb0de7' );
}
return array();
}
/**
* Returns a product for a a certain admin page.
*
* @param string $page The current admin page we are on.
*
* @return Yoast_Product[] A product to use for sending data to helpscout
*/
public function get_products( $page ) {
switch ( $page ) {
case 'wpseo_dashboard':
case 'wpseo_titles':
case 'wpseo_social':
case 'wpseo_xml':
case 'wpseo_advanced':
case 'wpseo_tools':
case 'wpseo_search_console':
return array( new WPSEO_Product_Premium() );
}
return array();
}
/**
* Returns a list of config values for a a certain admin page.
*
* @param string $page The current admin page we are on.
*
* @return array A list with configuration for the beacon
*/
public function get_config( $page ) {
return array( 'modal' => true );
}
}