@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | 13 | if ( ! defined( 'ABSPATH' ) ) { |
| 14 | - exit; |
|
| 14 | + exit; |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | /** |
@@ -21,292 +21,292 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | class Wordlift_Languages { |
| 23 | 23 | |
| 24 | - /** |
|
| 25 | - * An array that will contain language codes => language names pairs. It gets lazily loaded the first time by the |
|
| 26 | - * `get_languages` function. |
|
| 27 | - * |
|
| 28 | - * @since 3.9.0 |
|
| 29 | - * @var array|null An array of language codes => language names pairs or NULL if not initialized yet. |
|
| 30 | - */ |
|
| 31 | - private static $languages = null; |
|
| 24 | + /** |
|
| 25 | + * An array that will contain language codes => language names pairs. It gets lazily loaded the first time by the |
|
| 26 | + * `get_languages` function. |
|
| 27 | + * |
|
| 28 | + * @since 3.9.0 |
|
| 29 | + * @var array|null An array of language codes => language names pairs or NULL if not initialized yet. |
|
| 30 | + */ |
|
| 31 | + private static $languages = null; |
|
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * The list of supported language codes. |
|
| 35 | - * |
|
| 36 | - * @since 3.9.0 |
|
| 37 | - * |
|
| 38 | - * @var array An array of language codes. |
|
| 39 | - */ |
|
| 40 | - private static $codes = array( |
|
| 41 | - 'be', |
|
| 42 | - 'bg', |
|
| 43 | - 'ca', |
|
| 44 | - 'cs', |
|
| 45 | - 'da', |
|
| 46 | - 'de', |
|
| 47 | - 'en', |
|
| 48 | - 'es', |
|
| 49 | - 'et', |
|
| 50 | - 'fi', |
|
| 51 | - 'fr', |
|
| 52 | - 'hr', |
|
| 53 | - 'hu', |
|
| 54 | - 'id', |
|
| 55 | - 'is', |
|
| 56 | - 'it', |
|
| 57 | - 'lt', |
|
| 58 | - 'lv', |
|
| 59 | - 'nl', |
|
| 60 | - 'no', |
|
| 61 | - 'pl', |
|
| 62 | - 'pt', |
|
| 63 | - 'ro', |
|
| 64 | - 'ru', |
|
| 65 | - 'sk', |
|
| 66 | - 'sl', |
|
| 67 | - 'sq', |
|
| 68 | - 'sr', |
|
| 69 | - 'sv', |
|
| 70 | - 'tr', |
|
| 71 | - 'uk', |
|
| 72 | - 'zh', |
|
| 73 | - ); |
|
| 33 | + /** |
|
| 34 | + * The list of supported language codes. |
|
| 35 | + * |
|
| 36 | + * @since 3.9.0 |
|
| 37 | + * |
|
| 38 | + * @var array An array of language codes. |
|
| 39 | + */ |
|
| 40 | + private static $codes = array( |
|
| 41 | + 'be', |
|
| 42 | + 'bg', |
|
| 43 | + 'ca', |
|
| 44 | + 'cs', |
|
| 45 | + 'da', |
|
| 46 | + 'de', |
|
| 47 | + 'en', |
|
| 48 | + 'es', |
|
| 49 | + 'et', |
|
| 50 | + 'fi', |
|
| 51 | + 'fr', |
|
| 52 | + 'hr', |
|
| 53 | + 'hu', |
|
| 54 | + 'id', |
|
| 55 | + 'is', |
|
| 56 | + 'it', |
|
| 57 | + 'lt', |
|
| 58 | + 'lv', |
|
| 59 | + 'nl', |
|
| 60 | + 'no', |
|
| 61 | + 'pl', |
|
| 62 | + 'pt', |
|
| 63 | + 'ro', |
|
| 64 | + 'ru', |
|
| 65 | + 'sk', |
|
| 66 | + 'sl', |
|
| 67 | + 'sq', |
|
| 68 | + 'sr', |
|
| 69 | + 'sv', |
|
| 70 | + 'tr', |
|
| 71 | + 'uk', |
|
| 72 | + 'zh', |
|
| 73 | + ); |
|
| 74 | 74 | |
| 75 | - /** |
|
| 76 | - * Get the list of WordLift's supported languages in an array with language code => language name pairs. |
|
| 77 | - * |
|
| 78 | - * @since 3.9.0 |
|
| 79 | - * |
|
| 80 | - * @return array An array with language code => language name pairs. |
|
| 81 | - */ |
|
| 82 | - public static function get_languages() { |
|
| 75 | + /** |
|
| 76 | + * Get the list of WordLift's supported languages in an array with language code => language name pairs. |
|
| 77 | + * |
|
| 78 | + * @since 3.9.0 |
|
| 79 | + * |
|
| 80 | + * @return array An array with language code => language name pairs. |
|
| 81 | + */ |
|
| 82 | + public static function get_languages() { |
|
| 83 | 83 | |
| 84 | - // Lazily load the languages. |
|
| 85 | - if ( null === self::$languages ) { |
|
| 84 | + // Lazily load the languages. |
|
| 85 | + if ( null === self::$languages ) { |
|
| 86 | 86 | |
| 87 | - // Get the language names from WP's own (multisite) function. |
|
| 88 | - foreach ( self::$codes as $key ) { |
|
| 89 | - self::$languages[ $key ] = self::format_code_lang( $key ); |
|
| 90 | - } |
|
| 87 | + // Get the language names from WP's own (multisite) function. |
|
| 88 | + foreach ( self::$codes as $key ) { |
|
| 89 | + self::$languages[ $key ] = self::format_code_lang( $key ); |
|
| 90 | + } |
|
| 91 | 91 | |
| 92 | - // Sort by language name. |
|
| 93 | - asort( self::$languages ); |
|
| 94 | - } |
|
| 92 | + // Sort by language name. |
|
| 93 | + asort( self::$languages ); |
|
| 94 | + } |
|
| 95 | 95 | |
| 96 | - return self::$languages; |
|
| 97 | - } |
|
| 96 | + return self::$languages; |
|
| 97 | + } |
|
| 98 | 98 | |
| 99 | - /** |
|
| 100 | - * Returns the language for a language code. This function is a clone of WP's function provided in `ms.php`. |
|
| 101 | - * |
|
| 102 | - * @since 3.9.3 |
|
| 103 | - * |
|
| 104 | - * @param string $code Optional. The two-letter language code. Default empty. |
|
| 105 | - * |
|
| 106 | - * @return string The language corresponding to $code if it exists. If it does not exist, |
|
| 107 | - * then the first two letters of $code is returned. |
|
| 108 | - */ |
|
| 109 | - private static function format_code_lang( $code = '' ) { |
|
| 110 | - $code = strtolower( substr( $code, 0, 2 ) ); |
|
| 111 | - $lang_codes = array( |
|
| 112 | - 'aa' => 'Afar', |
|
| 113 | - 'ab' => 'Abkhazian', |
|
| 114 | - 'af' => 'Afrikaans', |
|
| 115 | - 'ak' => 'Akan', |
|
| 116 | - 'sq' => 'Albanian', |
|
| 117 | - 'am' => 'Amharic', |
|
| 118 | - 'ar' => 'Arabic', |
|
| 119 | - 'an' => 'Aragonese', |
|
| 120 | - 'hy' => 'Armenian', |
|
| 121 | - 'as' => 'Assamese', |
|
| 122 | - 'av' => 'Avaric', |
|
| 123 | - 'ae' => 'Avestan', |
|
| 124 | - 'ay' => 'Aymara', |
|
| 125 | - 'az' => 'Azerbaijani', |
|
| 126 | - 'ba' => 'Bashkir', |
|
| 127 | - 'bm' => 'Bambara', |
|
| 128 | - 'eu' => 'Basque', |
|
| 129 | - 'be' => 'Belarusian', |
|
| 130 | - 'bn' => 'Bengali', |
|
| 131 | - 'bh' => 'Bihari', |
|
| 132 | - 'bi' => 'Bislama', |
|
| 133 | - 'bs' => 'Bosnian', |
|
| 134 | - 'br' => 'Breton', |
|
| 135 | - 'bg' => 'Bulgarian', |
|
| 136 | - 'my' => 'Burmese', |
|
| 137 | - 'ca' => 'Catalan; Valencian', |
|
| 138 | - 'ch' => 'Chamorro', |
|
| 139 | - 'ce' => 'Chechen', |
|
| 140 | - 'zh' => 'Chinese', |
|
| 141 | - 'cu' => 'Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic', |
|
| 142 | - 'cv' => 'Chuvash', |
|
| 143 | - 'kw' => 'Cornish', |
|
| 144 | - 'co' => 'Corsican', |
|
| 145 | - 'cr' => 'Cree', |
|
| 146 | - 'cs' => 'Czech', |
|
| 147 | - 'da' => 'Danish', |
|
| 148 | - 'dv' => 'Divehi; Dhivehi; Maldivian', |
|
| 149 | - 'nl' => 'Dutch; Flemish', |
|
| 150 | - 'dz' => 'Dzongkha', |
|
| 151 | - 'en' => 'English', |
|
| 152 | - 'eo' => 'Esperanto', |
|
| 153 | - 'et' => 'Estonian', |
|
| 154 | - 'ee' => 'Ewe', |
|
| 155 | - 'fo' => 'Faroese', |
|
| 156 | - 'fj' => 'Fijjian', |
|
| 157 | - 'fi' => 'Finnish', |
|
| 158 | - 'fr' => 'French', |
|
| 159 | - 'fy' => 'Western Frisian', |
|
| 160 | - 'ff' => 'Fulah', |
|
| 161 | - 'ka' => 'Georgian', |
|
| 162 | - 'de' => 'German', |
|
| 163 | - 'gd' => 'Gaelic; Scottish Gaelic', |
|
| 164 | - 'ga' => 'Irish', |
|
| 165 | - 'gl' => 'Galician', |
|
| 166 | - 'gv' => 'Manx', |
|
| 167 | - 'el' => 'Greek, Modern', |
|
| 168 | - 'gn' => 'Guarani', |
|
| 169 | - 'gu' => 'Gujarati', |
|
| 170 | - 'ht' => 'Haitian; Haitian Creole', |
|
| 171 | - 'ha' => 'Hausa', |
|
| 172 | - 'he' => 'Hebrew', |
|
| 173 | - 'hz' => 'Herero', |
|
| 174 | - 'hi' => 'Hindi', |
|
| 175 | - 'ho' => 'Hiri Motu', |
|
| 176 | - 'hu' => 'Hungarian', |
|
| 177 | - 'ig' => 'Igbo', |
|
| 178 | - 'is' => 'Icelandic', |
|
| 179 | - 'io' => 'Ido', |
|
| 180 | - 'ii' => 'Sichuan Yi', |
|
| 181 | - 'iu' => 'Inuktitut', |
|
| 182 | - 'ie' => 'Interlingue', |
|
| 183 | - 'ia' => 'Interlingua (International Auxiliary Language Association)', |
|
| 184 | - 'id' => 'Indonesian', |
|
| 185 | - 'ik' => 'Inupiaq', |
|
| 186 | - 'it' => 'Italian', |
|
| 187 | - 'jv' => 'Javanese', |
|
| 188 | - 'ja' => 'Japanese', |
|
| 189 | - 'kl' => 'Kalaallisut; Greenlandic', |
|
| 190 | - 'kn' => 'Kannada', |
|
| 191 | - 'ks' => 'Kashmiri', |
|
| 192 | - 'kr' => 'Kanuri', |
|
| 193 | - 'kk' => 'Kazakh', |
|
| 194 | - 'km' => 'Central Khmer', |
|
| 195 | - 'ki' => 'Kikuyu; Gikuyu', |
|
| 196 | - 'rw' => 'Kinyarwanda', |
|
| 197 | - 'ky' => 'Kirghiz; Kyrgyz', |
|
| 198 | - 'kv' => 'Komi', |
|
| 199 | - 'kg' => 'Kongo', |
|
| 200 | - 'ko' => 'Korean', |
|
| 201 | - 'kj' => 'Kuanyama; Kwanyama', |
|
| 202 | - 'ku' => 'Kurdish', |
|
| 203 | - 'lo' => 'Lao', |
|
| 204 | - 'la' => 'Latin', |
|
| 205 | - 'lv' => 'Latvian', |
|
| 206 | - 'li' => 'Limburgan; Limburger; Limburgish', |
|
| 207 | - 'ln' => 'Lingala', |
|
| 208 | - 'lt' => 'Lithuanian', |
|
| 209 | - 'lb' => 'Luxembourgish; Letzeburgesch', |
|
| 210 | - 'lu' => 'Luba-Katanga', |
|
| 211 | - 'lg' => 'Ganda', |
|
| 212 | - 'mk' => 'Macedonian', |
|
| 213 | - 'mh' => 'Marshallese', |
|
| 214 | - 'ml' => 'Malayalam', |
|
| 215 | - 'mi' => 'Maori', |
|
| 216 | - 'mr' => 'Marathi', |
|
| 217 | - 'ms' => 'Malay', |
|
| 218 | - 'mg' => 'Malagasy', |
|
| 219 | - 'mt' => 'Maltese', |
|
| 220 | - 'mo' => 'Moldavian', |
|
| 221 | - 'mn' => 'Mongolian', |
|
| 222 | - 'na' => 'Nauru', |
|
| 223 | - 'nv' => 'Navajo; Navaho', |
|
| 224 | - 'nr' => 'Ndebele, South; South Ndebele', |
|
| 225 | - 'nd' => 'Ndebele, North; North Ndebele', |
|
| 226 | - 'ng' => 'Ndonga', |
|
| 227 | - 'ne' => 'Nepali', |
|
| 228 | - 'nn' => 'Norwegian Nynorsk; Nynorsk, Norwegian', |
|
| 229 | - 'nb' => 'Bokmål, Norwegian, Norwegian Bokmål', |
|
| 230 | - 'no' => 'Norwegian', |
|
| 231 | - 'ny' => 'Chichewa; Chewa; Nyanja', |
|
| 232 | - 'oc' => 'Occitan, Provençal', |
|
| 233 | - 'oj' => 'Ojibwa', |
|
| 234 | - 'or' => 'Oriya', |
|
| 235 | - 'om' => 'Oromo', |
|
| 236 | - 'os' => 'Ossetian; Ossetic', |
|
| 237 | - 'pa' => 'Panjabi; Punjabi', |
|
| 238 | - 'fa' => 'Persian', |
|
| 239 | - 'pi' => 'Pali', |
|
| 240 | - 'pl' => 'Polish', |
|
| 241 | - 'pt' => 'Portuguese', |
|
| 242 | - 'ps' => 'Pushto', |
|
| 243 | - 'qu' => 'Quechua', |
|
| 244 | - 'rm' => 'Romansh', |
|
| 245 | - 'ro' => 'Romanian', |
|
| 246 | - 'rn' => 'Rundi', |
|
| 247 | - 'ru' => 'Russian', |
|
| 248 | - 'sg' => 'Sango', |
|
| 249 | - 'sa' => 'Sanskrit', |
|
| 250 | - 'sr' => 'Serbian', |
|
| 251 | - 'hr' => 'Croatian', |
|
| 252 | - 'si' => 'Sinhala; Sinhalese', |
|
| 253 | - 'sk' => 'Slovak', |
|
| 254 | - 'sl' => 'Slovenian', |
|
| 255 | - 'se' => 'Northern Sami', |
|
| 256 | - 'sm' => 'Samoan', |
|
| 257 | - 'sn' => 'Shona', |
|
| 258 | - 'sd' => 'Sindhi', |
|
| 259 | - 'so' => 'Somali', |
|
| 260 | - 'st' => 'Sotho, Southern', |
|
| 261 | - 'es' => 'Spanish; Castilian', |
|
| 262 | - 'sc' => 'Sardinian', |
|
| 263 | - 'ss' => 'Swati', |
|
| 264 | - 'su' => 'Sundanese', |
|
| 265 | - 'sw' => 'Swahili', |
|
| 266 | - 'sv' => 'Swedish', |
|
| 267 | - 'ty' => 'Tahitian', |
|
| 268 | - 'ta' => 'Tamil', |
|
| 269 | - 'tt' => 'Tatar', |
|
| 270 | - 'te' => 'Telugu', |
|
| 271 | - 'tg' => 'Tajik', |
|
| 272 | - 'tl' => 'Tagalog', |
|
| 273 | - 'th' => 'Thai', |
|
| 274 | - 'bo' => 'Tibetan', |
|
| 275 | - 'ti' => 'Tigrinya', |
|
| 276 | - 'to' => 'Tonga (Tonga Islands)', |
|
| 277 | - 'tn' => 'Tswana', |
|
| 278 | - 'ts' => 'Tsonga', |
|
| 279 | - 'tk' => 'Turkmen', |
|
| 280 | - 'tr' => 'Turkish', |
|
| 281 | - 'tw' => 'Twi', |
|
| 282 | - 'ug' => 'Uighur; Uyghur', |
|
| 283 | - 'uk' => 'Ukrainian', |
|
| 284 | - 'ur' => 'Urdu', |
|
| 285 | - 'uz' => 'Uzbek', |
|
| 286 | - 've' => 'Venda', |
|
| 287 | - 'vi' => 'Vietnamese', |
|
| 288 | - 'vo' => 'Volapük', |
|
| 289 | - 'cy' => 'Welsh', |
|
| 290 | - 'wa' => 'Walloon', |
|
| 291 | - 'wo' => 'Wolof', |
|
| 292 | - 'xh' => 'Xhosa', |
|
| 293 | - 'yi' => 'Yiddish', |
|
| 294 | - 'yo' => 'Yoruba', |
|
| 295 | - 'za' => 'Zhuang; Chuang', |
|
| 296 | - 'zu' => 'Zulu' |
|
| 297 | - ); |
|
| 99 | + /** |
|
| 100 | + * Returns the language for a language code. This function is a clone of WP's function provided in `ms.php`. |
|
| 101 | + * |
|
| 102 | + * @since 3.9.3 |
|
| 103 | + * |
|
| 104 | + * @param string $code Optional. The two-letter language code. Default empty. |
|
| 105 | + * |
|
| 106 | + * @return string The language corresponding to $code if it exists. If it does not exist, |
|
| 107 | + * then the first two letters of $code is returned. |
|
| 108 | + */ |
|
| 109 | + private static function format_code_lang( $code = '' ) { |
|
| 110 | + $code = strtolower( substr( $code, 0, 2 ) ); |
|
| 111 | + $lang_codes = array( |
|
| 112 | + 'aa' => 'Afar', |
|
| 113 | + 'ab' => 'Abkhazian', |
|
| 114 | + 'af' => 'Afrikaans', |
|
| 115 | + 'ak' => 'Akan', |
|
| 116 | + 'sq' => 'Albanian', |
|
| 117 | + 'am' => 'Amharic', |
|
| 118 | + 'ar' => 'Arabic', |
|
| 119 | + 'an' => 'Aragonese', |
|
| 120 | + 'hy' => 'Armenian', |
|
| 121 | + 'as' => 'Assamese', |
|
| 122 | + 'av' => 'Avaric', |
|
| 123 | + 'ae' => 'Avestan', |
|
| 124 | + 'ay' => 'Aymara', |
|
| 125 | + 'az' => 'Azerbaijani', |
|
| 126 | + 'ba' => 'Bashkir', |
|
| 127 | + 'bm' => 'Bambara', |
|
| 128 | + 'eu' => 'Basque', |
|
| 129 | + 'be' => 'Belarusian', |
|
| 130 | + 'bn' => 'Bengali', |
|
| 131 | + 'bh' => 'Bihari', |
|
| 132 | + 'bi' => 'Bislama', |
|
| 133 | + 'bs' => 'Bosnian', |
|
| 134 | + 'br' => 'Breton', |
|
| 135 | + 'bg' => 'Bulgarian', |
|
| 136 | + 'my' => 'Burmese', |
|
| 137 | + 'ca' => 'Catalan; Valencian', |
|
| 138 | + 'ch' => 'Chamorro', |
|
| 139 | + 'ce' => 'Chechen', |
|
| 140 | + 'zh' => 'Chinese', |
|
| 141 | + 'cu' => 'Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic', |
|
| 142 | + 'cv' => 'Chuvash', |
|
| 143 | + 'kw' => 'Cornish', |
|
| 144 | + 'co' => 'Corsican', |
|
| 145 | + 'cr' => 'Cree', |
|
| 146 | + 'cs' => 'Czech', |
|
| 147 | + 'da' => 'Danish', |
|
| 148 | + 'dv' => 'Divehi; Dhivehi; Maldivian', |
|
| 149 | + 'nl' => 'Dutch; Flemish', |
|
| 150 | + 'dz' => 'Dzongkha', |
|
| 151 | + 'en' => 'English', |
|
| 152 | + 'eo' => 'Esperanto', |
|
| 153 | + 'et' => 'Estonian', |
|
| 154 | + 'ee' => 'Ewe', |
|
| 155 | + 'fo' => 'Faroese', |
|
| 156 | + 'fj' => 'Fijjian', |
|
| 157 | + 'fi' => 'Finnish', |
|
| 158 | + 'fr' => 'French', |
|
| 159 | + 'fy' => 'Western Frisian', |
|
| 160 | + 'ff' => 'Fulah', |
|
| 161 | + 'ka' => 'Georgian', |
|
| 162 | + 'de' => 'German', |
|
| 163 | + 'gd' => 'Gaelic; Scottish Gaelic', |
|
| 164 | + 'ga' => 'Irish', |
|
| 165 | + 'gl' => 'Galician', |
|
| 166 | + 'gv' => 'Manx', |
|
| 167 | + 'el' => 'Greek, Modern', |
|
| 168 | + 'gn' => 'Guarani', |
|
| 169 | + 'gu' => 'Gujarati', |
|
| 170 | + 'ht' => 'Haitian; Haitian Creole', |
|
| 171 | + 'ha' => 'Hausa', |
|
| 172 | + 'he' => 'Hebrew', |
|
| 173 | + 'hz' => 'Herero', |
|
| 174 | + 'hi' => 'Hindi', |
|
| 175 | + 'ho' => 'Hiri Motu', |
|
| 176 | + 'hu' => 'Hungarian', |
|
| 177 | + 'ig' => 'Igbo', |
|
| 178 | + 'is' => 'Icelandic', |
|
| 179 | + 'io' => 'Ido', |
|
| 180 | + 'ii' => 'Sichuan Yi', |
|
| 181 | + 'iu' => 'Inuktitut', |
|
| 182 | + 'ie' => 'Interlingue', |
|
| 183 | + 'ia' => 'Interlingua (International Auxiliary Language Association)', |
|
| 184 | + 'id' => 'Indonesian', |
|
| 185 | + 'ik' => 'Inupiaq', |
|
| 186 | + 'it' => 'Italian', |
|
| 187 | + 'jv' => 'Javanese', |
|
| 188 | + 'ja' => 'Japanese', |
|
| 189 | + 'kl' => 'Kalaallisut; Greenlandic', |
|
| 190 | + 'kn' => 'Kannada', |
|
| 191 | + 'ks' => 'Kashmiri', |
|
| 192 | + 'kr' => 'Kanuri', |
|
| 193 | + 'kk' => 'Kazakh', |
|
| 194 | + 'km' => 'Central Khmer', |
|
| 195 | + 'ki' => 'Kikuyu; Gikuyu', |
|
| 196 | + 'rw' => 'Kinyarwanda', |
|
| 197 | + 'ky' => 'Kirghiz; Kyrgyz', |
|
| 198 | + 'kv' => 'Komi', |
|
| 199 | + 'kg' => 'Kongo', |
|
| 200 | + 'ko' => 'Korean', |
|
| 201 | + 'kj' => 'Kuanyama; Kwanyama', |
|
| 202 | + 'ku' => 'Kurdish', |
|
| 203 | + 'lo' => 'Lao', |
|
| 204 | + 'la' => 'Latin', |
|
| 205 | + 'lv' => 'Latvian', |
|
| 206 | + 'li' => 'Limburgan; Limburger; Limburgish', |
|
| 207 | + 'ln' => 'Lingala', |
|
| 208 | + 'lt' => 'Lithuanian', |
|
| 209 | + 'lb' => 'Luxembourgish; Letzeburgesch', |
|
| 210 | + 'lu' => 'Luba-Katanga', |
|
| 211 | + 'lg' => 'Ganda', |
|
| 212 | + 'mk' => 'Macedonian', |
|
| 213 | + 'mh' => 'Marshallese', |
|
| 214 | + 'ml' => 'Malayalam', |
|
| 215 | + 'mi' => 'Maori', |
|
| 216 | + 'mr' => 'Marathi', |
|
| 217 | + 'ms' => 'Malay', |
|
| 218 | + 'mg' => 'Malagasy', |
|
| 219 | + 'mt' => 'Maltese', |
|
| 220 | + 'mo' => 'Moldavian', |
|
| 221 | + 'mn' => 'Mongolian', |
|
| 222 | + 'na' => 'Nauru', |
|
| 223 | + 'nv' => 'Navajo; Navaho', |
|
| 224 | + 'nr' => 'Ndebele, South; South Ndebele', |
|
| 225 | + 'nd' => 'Ndebele, North; North Ndebele', |
|
| 226 | + 'ng' => 'Ndonga', |
|
| 227 | + 'ne' => 'Nepali', |
|
| 228 | + 'nn' => 'Norwegian Nynorsk; Nynorsk, Norwegian', |
|
| 229 | + 'nb' => 'Bokmål, Norwegian, Norwegian Bokmål', |
|
| 230 | + 'no' => 'Norwegian', |
|
| 231 | + 'ny' => 'Chichewa; Chewa; Nyanja', |
|
| 232 | + 'oc' => 'Occitan, Provençal', |
|
| 233 | + 'oj' => 'Ojibwa', |
|
| 234 | + 'or' => 'Oriya', |
|
| 235 | + 'om' => 'Oromo', |
|
| 236 | + 'os' => 'Ossetian; Ossetic', |
|
| 237 | + 'pa' => 'Panjabi; Punjabi', |
|
| 238 | + 'fa' => 'Persian', |
|
| 239 | + 'pi' => 'Pali', |
|
| 240 | + 'pl' => 'Polish', |
|
| 241 | + 'pt' => 'Portuguese', |
|
| 242 | + 'ps' => 'Pushto', |
|
| 243 | + 'qu' => 'Quechua', |
|
| 244 | + 'rm' => 'Romansh', |
|
| 245 | + 'ro' => 'Romanian', |
|
| 246 | + 'rn' => 'Rundi', |
|
| 247 | + 'ru' => 'Russian', |
|
| 248 | + 'sg' => 'Sango', |
|
| 249 | + 'sa' => 'Sanskrit', |
|
| 250 | + 'sr' => 'Serbian', |
|
| 251 | + 'hr' => 'Croatian', |
|
| 252 | + 'si' => 'Sinhala; Sinhalese', |
|
| 253 | + 'sk' => 'Slovak', |
|
| 254 | + 'sl' => 'Slovenian', |
|
| 255 | + 'se' => 'Northern Sami', |
|
| 256 | + 'sm' => 'Samoan', |
|
| 257 | + 'sn' => 'Shona', |
|
| 258 | + 'sd' => 'Sindhi', |
|
| 259 | + 'so' => 'Somali', |
|
| 260 | + 'st' => 'Sotho, Southern', |
|
| 261 | + 'es' => 'Spanish; Castilian', |
|
| 262 | + 'sc' => 'Sardinian', |
|
| 263 | + 'ss' => 'Swati', |
|
| 264 | + 'su' => 'Sundanese', |
|
| 265 | + 'sw' => 'Swahili', |
|
| 266 | + 'sv' => 'Swedish', |
|
| 267 | + 'ty' => 'Tahitian', |
|
| 268 | + 'ta' => 'Tamil', |
|
| 269 | + 'tt' => 'Tatar', |
|
| 270 | + 'te' => 'Telugu', |
|
| 271 | + 'tg' => 'Tajik', |
|
| 272 | + 'tl' => 'Tagalog', |
|
| 273 | + 'th' => 'Thai', |
|
| 274 | + 'bo' => 'Tibetan', |
|
| 275 | + 'ti' => 'Tigrinya', |
|
| 276 | + 'to' => 'Tonga (Tonga Islands)', |
|
| 277 | + 'tn' => 'Tswana', |
|
| 278 | + 'ts' => 'Tsonga', |
|
| 279 | + 'tk' => 'Turkmen', |
|
| 280 | + 'tr' => 'Turkish', |
|
| 281 | + 'tw' => 'Twi', |
|
| 282 | + 'ug' => 'Uighur; Uyghur', |
|
| 283 | + 'uk' => 'Ukrainian', |
|
| 284 | + 'ur' => 'Urdu', |
|
| 285 | + 'uz' => 'Uzbek', |
|
| 286 | + 've' => 'Venda', |
|
| 287 | + 'vi' => 'Vietnamese', |
|
| 288 | + 'vo' => 'Volapük', |
|
| 289 | + 'cy' => 'Welsh', |
|
| 290 | + 'wa' => 'Walloon', |
|
| 291 | + 'wo' => 'Wolof', |
|
| 292 | + 'xh' => 'Xhosa', |
|
| 293 | + 'yi' => 'Yiddish', |
|
| 294 | + 'yo' => 'Yoruba', |
|
| 295 | + 'za' => 'Zhuang; Chuang', |
|
| 296 | + 'zu' => 'Zulu' |
|
| 297 | + ); |
|
| 298 | 298 | |
| 299 | - /** |
|
| 300 | - * Filters the language codes. |
|
| 301 | - * |
|
| 302 | - * @since MU |
|
| 303 | - * |
|
| 304 | - * @param array $lang_codes Key/value pair of language codes where key is the short version. |
|
| 305 | - * @param string $code A two-letter designation of the language. |
|
| 306 | - */ |
|
| 307 | - $lang_codes = apply_filters( 'lang_codes', $lang_codes, $code ); |
|
| 299 | + /** |
|
| 300 | + * Filters the language codes. |
|
| 301 | + * |
|
| 302 | + * @since MU |
|
| 303 | + * |
|
| 304 | + * @param array $lang_codes Key/value pair of language codes where key is the short version. |
|
| 305 | + * @param string $code A two-letter designation of the language. |
|
| 306 | + */ |
|
| 307 | + $lang_codes = apply_filters( 'lang_codes', $lang_codes, $code ); |
|
| 308 | 308 | |
| 309 | - return strtr( $code, $lang_codes ); |
|
| 310 | - } |
|
| 309 | + return strtr( $code, $lang_codes ); |
|
| 310 | + } |
|
| 311 | 311 | |
| 312 | 312 | } |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | * @since 3.9.0 |
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 13 | +if ( ! defined('ABSPATH')) { |
|
| 14 | 14 | exit; |
| 15 | 15 | } |
| 16 | 16 | |
@@ -82,15 +82,15 @@ discard block |
||
| 82 | 82 | public static function get_languages() { |
| 83 | 83 | |
| 84 | 84 | // Lazily load the languages. |
| 85 | - if ( null === self::$languages ) { |
|
| 85 | + if (null === self::$languages) { |
|
| 86 | 86 | |
| 87 | 87 | // Get the language names from WP's own (multisite) function. |
| 88 | - foreach ( self::$codes as $key ) { |
|
| 89 | - self::$languages[ $key ] = self::format_code_lang( $key ); |
|
| 88 | + foreach (self::$codes as $key) { |
|
| 89 | + self::$languages[$key] = self::format_code_lang($key); |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | // Sort by language name. |
| 93 | - asort( self::$languages ); |
|
| 93 | + asort(self::$languages); |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | return self::$languages; |
@@ -106,8 +106,8 @@ discard block |
||
| 106 | 106 | * @return string The language corresponding to $code if it exists. If it does not exist, |
| 107 | 107 | * then the first two letters of $code is returned. |
| 108 | 108 | */ |
| 109 | - private static function format_code_lang( $code = '' ) { |
|
| 110 | - $code = strtolower( substr( $code, 0, 2 ) ); |
|
| 109 | + private static function format_code_lang($code = '') { |
|
| 110 | + $code = strtolower(substr($code, 0, 2)); |
|
| 111 | 111 | $lang_codes = array( |
| 112 | 112 | 'aa' => 'Afar', |
| 113 | 113 | 'ab' => 'Abkhazian', |
@@ -304,9 +304,9 @@ discard block |
||
| 304 | 304 | * @param array $lang_codes Key/value pair of language codes where key is the short version. |
| 305 | 305 | * @param string $code A two-letter designation of the language. |
| 306 | 306 | */ |
| 307 | - $lang_codes = apply_filters( 'lang_codes', $lang_codes, $code ); |
|
| 307 | + $lang_codes = apply_filters('lang_codes', $lang_codes, $code); |
|
| 308 | 308 | |
| 309 | - return strtr( $code, $lang_codes ); |
|
| 309 | + return strtr($code, $lang_codes); |
|
| 310 | 310 | } |
| 311 | 311 | |
| 312 | 312 | } |
@@ -29,829 +29,829 @@ |
||
| 29 | 29 | */ |
| 30 | 30 | class Wordlift { |
| 31 | 31 | |
| 32 | - /** |
|
| 33 | - * The loader that's responsible for maintaining and registering all hooks that power |
|
| 34 | - * the plugin. |
|
| 35 | - * |
|
| 36 | - * @since 1.0.0 |
|
| 37 | - * @access protected |
|
| 38 | - * @var Wordlift_Loader $loader Maintains and registers all hooks for the plugin. |
|
| 39 | - */ |
|
| 40 | - protected $loader; |
|
| 41 | - |
|
| 42 | - /** |
|
| 43 | - * The unique identifier of this plugin. |
|
| 44 | - * |
|
| 45 | - * @since 1.0.0 |
|
| 46 | - * @access protected |
|
| 47 | - * @var string $plugin_name The string used to uniquely identify this plugin. |
|
| 48 | - */ |
|
| 49 | - protected $plugin_name; |
|
| 50 | - |
|
| 51 | - /** |
|
| 52 | - * The current version of the plugin. |
|
| 53 | - * |
|
| 54 | - * @since 1.0.0 |
|
| 55 | - * @access protected |
|
| 56 | - * @var string $version The current version of the plugin. |
|
| 57 | - */ |
|
| 58 | - protected $version; |
|
| 59 | - |
|
| 60 | - /** |
|
| 61 | - * The Thumbnail service. |
|
| 62 | - * |
|
| 63 | - * @since 3.1.5 |
|
| 64 | - * @access private |
|
| 65 | - * @var \Wordlift_Thumbnail_Service $thumbnail_service The Thumbnail service. |
|
| 66 | - */ |
|
| 67 | - private $thumbnail_service; |
|
| 68 | - |
|
| 69 | - /** |
|
| 70 | - * The UI service. |
|
| 71 | - * |
|
| 72 | - * @since 3.2.0 |
|
| 73 | - * @access private |
|
| 74 | - * @var \Wordlift_UI_Service $ui_service The UI service. |
|
| 75 | - */ |
|
| 76 | - private $ui_service; |
|
| 77 | - |
|
| 78 | - /** |
|
| 79 | - * The Schema service. |
|
| 80 | - * |
|
| 81 | - * @since 3.3.0 |
|
| 82 | - * @access private |
|
| 83 | - * @var \Wordlift_Schema_Service $schema_service The Schema service. |
|
| 84 | - */ |
|
| 85 | - private $schema_service; |
|
| 86 | - |
|
| 87 | - /** |
|
| 88 | - * The Entity service. |
|
| 89 | - * |
|
| 90 | - * @since 3.1.0 |
|
| 91 | - * @access private |
|
| 92 | - * @var \Wordlift_Entity_Service $entity_service The Entity service. |
|
| 93 | - */ |
|
| 94 | - private $entity_service; |
|
| 95 | - |
|
| 96 | - /** |
|
| 97 | - * The Topic Taxonomy service. |
|
| 98 | - * |
|
| 99 | - * @since 3.5.0 |
|
| 100 | - * @access private |
|
| 101 | - * @var \Wordlift_Topic_Taxonomy_Service The Topic Taxonomy service. |
|
| 102 | - */ |
|
| 103 | - private $topic_taxonomy_service; |
|
| 104 | - |
|
| 105 | - /** |
|
| 106 | - * The User service. |
|
| 107 | - * |
|
| 108 | - * @since 3.1.7 |
|
| 109 | - * @access private |
|
| 110 | - * @var \Wordlift_User_Service $user_service The User service. |
|
| 111 | - */ |
|
| 112 | - private $user_service; |
|
| 113 | - |
|
| 114 | - /** |
|
| 115 | - * The Timeline service. |
|
| 116 | - * |
|
| 117 | - * @since 3.1.0 |
|
| 118 | - * @access private |
|
| 119 | - * @var \Wordlift_Timeline_Service $timeline_service The Timeline service. |
|
| 120 | - */ |
|
| 121 | - private $timeline_service; |
|
| 122 | - |
|
| 123 | - /** |
|
| 124 | - * The Redirect service. |
|
| 125 | - * |
|
| 126 | - * @since 3.2.0 |
|
| 127 | - * @access private |
|
| 128 | - * @var \Wordlift_Redirect_Service $redirect_service The Redirect service. |
|
| 129 | - */ |
|
| 130 | - private $redirect_service; |
|
| 131 | - |
|
| 132 | - /** |
|
| 133 | - * The Notice service. |
|
| 134 | - * |
|
| 135 | - * @since 3.3.0 |
|
| 136 | - * @access private |
|
| 137 | - * @var \Wordlift_Notice_Service $notice_service The Notice service. |
|
| 138 | - */ |
|
| 139 | - private $notice_service; |
|
| 140 | - |
|
| 141 | - /** |
|
| 142 | - * The Entity list customization. |
|
| 143 | - * |
|
| 144 | - * @since 3.3.0 |
|
| 145 | - * @access private |
|
| 146 | - * @var \Wordlift_List_Service $entity_list_service The Entity list service. |
|
| 147 | - */ |
|
| 148 | - private $entity_list_service; |
|
| 149 | - |
|
| 150 | - /** |
|
| 151 | - * The Entity Types Taxonomy Walker. |
|
| 152 | - * |
|
| 153 | - * @since 3.1.0 |
|
| 154 | - * @access private |
|
| 155 | - * @var \Wordlift_Entity_Types_Taxonomy_Walker $entity_types_taxonomy_walker The Entity Types Taxonomy Walker |
|
| 156 | - */ |
|
| 157 | - private $entity_types_taxonomy_walker; |
|
| 158 | - |
|
| 159 | - /** |
|
| 160 | - * The ShareThis service. |
|
| 161 | - * |
|
| 162 | - * @since 3.2.0 |
|
| 163 | - * @access private |
|
| 164 | - * @var \Wordlift_ShareThis_Service $sharethis_service The ShareThis service. |
|
| 165 | - */ |
|
| 166 | - private $sharethis_service; |
|
| 167 | - |
|
| 168 | - /** |
|
| 169 | - * The PrimaShop adapter. |
|
| 170 | - * |
|
| 171 | - * @since 3.2.3 |
|
| 172 | - * @access private |
|
| 173 | - * @var \Wordlift_PrimaShop_Adapter $primashop_adapter The PrimaShop adapter. |
|
| 174 | - */ |
|
| 175 | - private $primashop_adapter; |
|
| 176 | - |
|
| 177 | - /** |
|
| 178 | - * The WordLift Dashboard adapter. |
|
| 179 | - * |
|
| 180 | - * @since 3.4.0 |
|
| 181 | - * @access private |
|
| 182 | - * @var \Wordlift_Dashboard_Service $dashboard_service The WordLift Dashboard service; |
|
| 183 | - */ |
|
| 184 | - private $dashboard_service; |
|
| 185 | - |
|
| 186 | - /** |
|
| 187 | - * The entity type service. |
|
| 188 | - * |
|
| 189 | - * @since 3.6.0 |
|
| 190 | - * @access private |
|
| 191 | - * @var \Wordlift_Entity_Post_Type_Service |
|
| 192 | - */ |
|
| 193 | - private $entity_post_type_service; |
|
| 194 | - |
|
| 195 | - /** |
|
| 196 | - * The entity link service used to mangle links to entities with a custom slug or even w/o a slug. |
|
| 197 | - * |
|
| 198 | - * @since 3.6.0 |
|
| 199 | - * @access private |
|
| 200 | - * @var \Wordlift_Entity_Link_Service |
|
| 201 | - */ |
|
| 202 | - private $entity_link_service; |
|
| 203 | - |
|
| 204 | - /** |
|
| 205 | - * The page service instance which processes the page output in order to insert schema.org microdata to export the |
|
| 206 | - * correct page title to Google+. |
|
| 207 | - * |
|
| 208 | - * @since 3.5.3 |
|
| 209 | - * @access private |
|
| 210 | - * @var \Wordlift_Page_Service |
|
| 211 | - */ |
|
| 212 | - private $page_service; |
|
| 213 | - |
|
| 214 | - /** |
|
| 215 | - * A {@link Wordlift_Sparql_Service} instance. |
|
| 216 | - * |
|
| 217 | - * @var 3.6.0 |
|
| 218 | - * @access private |
|
| 219 | - * @var \Wordlift_Sparql_Service $sparql_service A {@link Wordlift_Sparql_Service} instance. |
|
| 220 | - */ |
|
| 221 | - private $sparql_service; |
|
| 222 | - |
|
| 223 | - /** |
|
| 224 | - * A {@link Wordlift_Import_Service} instance. |
|
| 225 | - * |
|
| 226 | - * @since 3.6.0 |
|
| 227 | - * @access private |
|
| 228 | - * @var \Wordlift_Import_Service $import_service A {@link Wordlift_Import_Service} instance. |
|
| 229 | - */ |
|
| 230 | - private $import_service; |
|
| 231 | - |
|
| 232 | - /** |
|
| 233 | - * A {@link Wordlift_Rebuild_Service} instance. |
|
| 234 | - * |
|
| 235 | - * @since 3.6.0 |
|
| 236 | - * @access private |
|
| 237 | - * @var \Wordlift_Rebuild_Service $rebuild_service A {@link Wordlift_Rebuild_Service} instance. |
|
| 238 | - */ |
|
| 239 | - private $rebuild_service; |
|
| 240 | - |
|
| 241 | - /** |
|
| 242 | - * A {@link Wordlift_Jsonld_Service} instance. |
|
| 243 | - * |
|
| 244 | - * @since 3.7.0 |
|
| 245 | - * @access private |
|
| 246 | - * @var \Wordlift_Jsonld_Service $jsonld_service A {@link Wordlift_Jsonld_Service} instance. |
|
| 247 | - */ |
|
| 248 | - private $jsonld_service; |
|
| 249 | - |
|
| 250 | - /** |
|
| 251 | - * |
|
| 252 | - * @since 3.7.0 |
|
| 253 | - * @access private |
|
| 254 | - * @var \Wordlift_Property_Factory $property_factory |
|
| 255 | - */ |
|
| 256 | - private $property_factory; |
|
| 257 | - |
|
| 258 | - /** |
|
| 259 | - * The 'Download Your Data' page. |
|
| 260 | - * |
|
| 261 | - * @since 3.6.0 |
|
| 262 | - * @access private |
|
| 263 | - * @var \Wordlift_Admin_Download_Your_Data_Page $download_your_data_page The 'Download Your Data' page. |
|
| 264 | - */ |
|
| 265 | - private $download_your_data_page; |
|
| 266 | - |
|
| 267 | - /** |
|
| 268 | - * The install wizard page. |
|
| 269 | - * |
|
| 270 | - * @since 3.9.0 |
|
| 271 | - * @access private |
|
| 272 | - * @var \Wordlift_Admin_Setup $admin_setup The Install wizard. |
|
| 273 | - */ |
|
| 274 | - private $admin_setup; |
|
| 275 | - |
|
| 276 | - /** |
|
| 277 | - * The Content Filter Service hooks up to the 'the_content' filter and provides |
|
| 278 | - * linking of entities to their pages. |
|
| 279 | - * |
|
| 280 | - * @since 3.8.0 |
|
| 281 | - * @access private |
|
| 282 | - * @var \Wordlift_Content_Filter_Service $content_filter_service A {@link Wordlift_Content_Filter_Service} instance. |
|
| 283 | - */ |
|
| 284 | - private $content_filter_service; |
|
| 285 | - |
|
| 286 | - /** |
|
| 287 | - * A {@link Wordlift_Key_Validation_Service} instance. |
|
| 288 | - * |
|
| 289 | - * @since 3.9.0 |
|
| 290 | - * @access private |
|
| 291 | - * @var Wordlift_Key_Validation_Service $key_validation_service A {@link Wordlift_Key_Validation_Service} instance. |
|
| 292 | - */ |
|
| 293 | - private $key_validation_service; |
|
| 294 | - |
|
| 295 | - /** |
|
| 296 | - * Define the core functionality of the plugin. |
|
| 297 | - * |
|
| 298 | - * Set the plugin name and the plugin version that can be used throughout the plugin. |
|
| 299 | - * Load the dependencies, define the locale, and set the hooks for the admin area and |
|
| 300 | - * the public-facing side of the site. |
|
| 301 | - * |
|
| 302 | - * @since 1.0.0 |
|
| 303 | - */ |
|
| 304 | - public function __construct() { |
|
| 305 | - |
|
| 306 | - $this->plugin_name = 'wordlift'; |
|
| 307 | - $this->version = '3.9.3'; |
|
| 308 | - $this->load_dependencies(); |
|
| 309 | - $this->set_locale(); |
|
| 310 | - $this->define_admin_hooks(); |
|
| 311 | - $this->define_public_hooks(); |
|
| 312 | - |
|
| 313 | - } |
|
| 314 | - |
|
| 315 | - /** |
|
| 316 | - * Load the required dependencies for this plugin. |
|
| 317 | - * |
|
| 318 | - * Include the following files that make up the plugin: |
|
| 319 | - * |
|
| 320 | - * - Wordlift_Loader. Orchestrates the hooks of the plugin. |
|
| 321 | - * - Wordlift_i18n. Defines internationalization functionality. |
|
| 322 | - * - Wordlift_Admin. Defines all hooks for the admin area. |
|
| 323 | - * - Wordlift_Public. Defines all hooks for the public side of the site. |
|
| 324 | - * |
|
| 325 | - * Create an instance of the loader which will be used to register the hooks |
|
| 326 | - * with WordPress. |
|
| 327 | - * |
|
| 328 | - * @since 1.0.0 |
|
| 329 | - * @access private |
|
| 330 | - */ |
|
| 331 | - private function load_dependencies() { |
|
| 332 | - |
|
| 333 | - /** |
|
| 334 | - * The class responsible for orchestrating the actions and filters of the |
|
| 335 | - * core plugin. |
|
| 336 | - */ |
|
| 337 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-loader.php'; |
|
| 338 | - |
|
| 339 | - /** |
|
| 340 | - * The class responsible for defining internationalization functionality |
|
| 341 | - * of the plugin. |
|
| 342 | - */ |
|
| 343 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-i18n.php'; |
|
| 344 | - |
|
| 345 | - /** |
|
| 346 | - * WordLift's supported languages. |
|
| 347 | - */ |
|
| 348 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-languages.php'; |
|
| 349 | - |
|
| 350 | - /** |
|
| 351 | - * Provide support functions to sanitize data. |
|
| 352 | - */ |
|
| 353 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sanitizer.php'; |
|
| 354 | - |
|
| 355 | - /** |
|
| 356 | - * The Redirect service. |
|
| 357 | - */ |
|
| 358 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-redirect-service.php'; |
|
| 359 | - |
|
| 360 | - /** |
|
| 361 | - * The Log service. |
|
| 362 | - */ |
|
| 363 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-log-service.php'; |
|
| 364 | - |
|
| 365 | - /** |
|
| 366 | - * The configuration service. |
|
| 367 | - */ |
|
| 368 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-configuration-service.php'; |
|
| 369 | - |
|
| 370 | - /** |
|
| 371 | - * The entity post type service (this is the WordPress post type, not the entity schema type). |
|
| 372 | - */ |
|
| 373 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-type-service.php'; |
|
| 374 | - |
|
| 375 | - /** |
|
| 376 | - * The entity type service (i.e. the schema type). |
|
| 377 | - */ |
|
| 378 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-service.php'; |
|
| 379 | - |
|
| 380 | - /** |
|
| 381 | - * The entity link service. |
|
| 382 | - */ |
|
| 383 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-link-service.php'; |
|
| 384 | - |
|
| 385 | - /** |
|
| 386 | - * The Query builder. |
|
| 387 | - */ |
|
| 388 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-query-builder.php'; |
|
| 389 | - |
|
| 390 | - /** |
|
| 391 | - * The Schema service. |
|
| 392 | - */ |
|
| 393 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-service.php'; |
|
| 394 | - |
|
| 395 | - /** |
|
| 396 | - * The schema:url property service. |
|
| 397 | - */ |
|
| 398 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-service.php'; |
|
| 399 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-url-property-service.php'; |
|
| 400 | - |
|
| 401 | - /** |
|
| 402 | - * The UI service. |
|
| 403 | - */ |
|
| 404 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-ui-service.php'; |
|
| 405 | - |
|
| 406 | - /** |
|
| 407 | - * The Thumbnail service. |
|
| 408 | - */ |
|
| 409 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-thumbnail-service.php'; |
|
| 410 | - |
|
| 411 | - /** |
|
| 412 | - * The Entity Types Taxonomy service. |
|
| 413 | - */ |
|
| 414 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-types-taxonomy-service.php'; |
|
| 415 | - |
|
| 416 | - /** |
|
| 417 | - * The Entity service. |
|
| 418 | - */ |
|
| 419 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-service.php'; |
|
| 420 | - |
|
| 421 | - /** |
|
| 422 | - * The User service. |
|
| 423 | - */ |
|
| 424 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-user-service.php'; |
|
| 425 | - |
|
| 426 | - /** |
|
| 427 | - * The Timeline service. |
|
| 428 | - */ |
|
| 429 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-timeline-service.php'; |
|
| 430 | - |
|
| 431 | - /** |
|
| 432 | - * The Topic Taxonomy service. |
|
| 433 | - */ |
|
| 434 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-topic-taxonomy-service.php'; |
|
| 435 | - |
|
| 436 | - |
|
| 437 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-page-service.php'; |
|
| 438 | - |
|
| 439 | - /** |
|
| 440 | - * The SPARQL service. |
|
| 441 | - */ |
|
| 442 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sparql-service.php'; |
|
| 443 | - |
|
| 444 | - /** |
|
| 445 | - * The WordLift import service. |
|
| 446 | - */ |
|
| 447 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-import-service.php'; |
|
| 448 | - |
|
| 449 | - /** |
|
| 450 | - * The WordLift URI service. |
|
| 451 | - */ |
|
| 452 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-uri-service.php'; |
|
| 453 | - |
|
| 454 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-listable.php'; |
|
| 455 | - |
|
| 456 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-factory.php'; |
|
| 457 | - |
|
| 458 | - /** |
|
| 459 | - * The WordLift rebuild service, used to rebuild the remote dataset using the local data. |
|
| 460 | - */ |
|
| 461 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-rebuild-service.php'; |
|
| 462 | - |
|
| 463 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/properties/class-wordlift-property-getter-factory.php'; |
|
| 464 | - |
|
| 465 | - /** |
|
| 466 | - * Load the converters. |
|
| 467 | - */ |
|
| 468 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-to-jsonld-converter.php'; |
|
| 469 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-uri-to-jsonld-converter.php'; |
|
| 470 | - |
|
| 471 | - /** |
|
| 472 | - * Load the content filter. |
|
| 473 | - */ |
|
| 474 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-content-filter-service.php'; |
|
| 475 | - |
|
| 476 | - /** |
|
| 477 | - * Load the JSON-LD service to publish entities using JSON-LD.s |
|
| 478 | - * |
|
| 479 | - * @since 3.8.0 |
|
| 480 | - */ |
|
| 481 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-service.php'; |
|
| 482 | - |
|
| 483 | - /** |
|
| 484 | - * Load the WordLift key validation service. |
|
| 485 | - */ |
|
| 486 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-key-validation-service.php'; |
|
| 487 | - |
|
| 488 | - /** |
|
| 489 | - * The class responsible for defining all actions that occur in the admin area. |
|
| 490 | - */ |
|
| 491 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin.php'; |
|
| 492 | - |
|
| 493 | - /** |
|
| 494 | - * The class to customize the entity list admin page. |
|
| 495 | - */ |
|
| 496 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-list.php'; |
|
| 497 | - |
|
| 498 | - /** |
|
| 499 | - * The Entity Types Taxonomy Walker (transforms checkboxes into radios). |
|
| 500 | - */ |
|
| 501 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-types-taxonomy-walker.php'; |
|
| 502 | - |
|
| 503 | - /** |
|
| 504 | - * The Notice service. |
|
| 505 | - */ |
|
| 506 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-notice-service.php'; |
|
| 507 | - |
|
| 508 | - /** |
|
| 509 | - * The PrimaShop adapter. |
|
| 510 | - */ |
|
| 511 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-primashop-adapter.php'; |
|
| 512 | - |
|
| 513 | - /** |
|
| 514 | - * The WordLift Dashboard service. |
|
| 515 | - */ |
|
| 516 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-dashboard.php'; |
|
| 517 | - |
|
| 518 | - /** |
|
| 519 | - * The admin 'Install wizard' page. |
|
| 520 | - */ |
|
| 521 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-setup.php'; |
|
| 32 | + /** |
|
| 33 | + * The loader that's responsible for maintaining and registering all hooks that power |
|
| 34 | + * the plugin. |
|
| 35 | + * |
|
| 36 | + * @since 1.0.0 |
|
| 37 | + * @access protected |
|
| 38 | + * @var Wordlift_Loader $loader Maintains and registers all hooks for the plugin. |
|
| 39 | + */ |
|
| 40 | + protected $loader; |
|
| 41 | + |
|
| 42 | + /** |
|
| 43 | + * The unique identifier of this plugin. |
|
| 44 | + * |
|
| 45 | + * @since 1.0.0 |
|
| 46 | + * @access protected |
|
| 47 | + * @var string $plugin_name The string used to uniquely identify this plugin. |
|
| 48 | + */ |
|
| 49 | + protected $plugin_name; |
|
| 50 | + |
|
| 51 | + /** |
|
| 52 | + * The current version of the plugin. |
|
| 53 | + * |
|
| 54 | + * @since 1.0.0 |
|
| 55 | + * @access protected |
|
| 56 | + * @var string $version The current version of the plugin. |
|
| 57 | + */ |
|
| 58 | + protected $version; |
|
| 59 | + |
|
| 60 | + /** |
|
| 61 | + * The Thumbnail service. |
|
| 62 | + * |
|
| 63 | + * @since 3.1.5 |
|
| 64 | + * @access private |
|
| 65 | + * @var \Wordlift_Thumbnail_Service $thumbnail_service The Thumbnail service. |
|
| 66 | + */ |
|
| 67 | + private $thumbnail_service; |
|
| 68 | + |
|
| 69 | + /** |
|
| 70 | + * The UI service. |
|
| 71 | + * |
|
| 72 | + * @since 3.2.0 |
|
| 73 | + * @access private |
|
| 74 | + * @var \Wordlift_UI_Service $ui_service The UI service. |
|
| 75 | + */ |
|
| 76 | + private $ui_service; |
|
| 77 | + |
|
| 78 | + /** |
|
| 79 | + * The Schema service. |
|
| 80 | + * |
|
| 81 | + * @since 3.3.0 |
|
| 82 | + * @access private |
|
| 83 | + * @var \Wordlift_Schema_Service $schema_service The Schema service. |
|
| 84 | + */ |
|
| 85 | + private $schema_service; |
|
| 86 | + |
|
| 87 | + /** |
|
| 88 | + * The Entity service. |
|
| 89 | + * |
|
| 90 | + * @since 3.1.0 |
|
| 91 | + * @access private |
|
| 92 | + * @var \Wordlift_Entity_Service $entity_service The Entity service. |
|
| 93 | + */ |
|
| 94 | + private $entity_service; |
|
| 95 | + |
|
| 96 | + /** |
|
| 97 | + * The Topic Taxonomy service. |
|
| 98 | + * |
|
| 99 | + * @since 3.5.0 |
|
| 100 | + * @access private |
|
| 101 | + * @var \Wordlift_Topic_Taxonomy_Service The Topic Taxonomy service. |
|
| 102 | + */ |
|
| 103 | + private $topic_taxonomy_service; |
|
| 104 | + |
|
| 105 | + /** |
|
| 106 | + * The User service. |
|
| 107 | + * |
|
| 108 | + * @since 3.1.7 |
|
| 109 | + * @access private |
|
| 110 | + * @var \Wordlift_User_Service $user_service The User service. |
|
| 111 | + */ |
|
| 112 | + private $user_service; |
|
| 113 | + |
|
| 114 | + /** |
|
| 115 | + * The Timeline service. |
|
| 116 | + * |
|
| 117 | + * @since 3.1.0 |
|
| 118 | + * @access private |
|
| 119 | + * @var \Wordlift_Timeline_Service $timeline_service The Timeline service. |
|
| 120 | + */ |
|
| 121 | + private $timeline_service; |
|
| 122 | + |
|
| 123 | + /** |
|
| 124 | + * The Redirect service. |
|
| 125 | + * |
|
| 126 | + * @since 3.2.0 |
|
| 127 | + * @access private |
|
| 128 | + * @var \Wordlift_Redirect_Service $redirect_service The Redirect service. |
|
| 129 | + */ |
|
| 130 | + private $redirect_service; |
|
| 131 | + |
|
| 132 | + /** |
|
| 133 | + * The Notice service. |
|
| 134 | + * |
|
| 135 | + * @since 3.3.0 |
|
| 136 | + * @access private |
|
| 137 | + * @var \Wordlift_Notice_Service $notice_service The Notice service. |
|
| 138 | + */ |
|
| 139 | + private $notice_service; |
|
| 140 | + |
|
| 141 | + /** |
|
| 142 | + * The Entity list customization. |
|
| 143 | + * |
|
| 144 | + * @since 3.3.0 |
|
| 145 | + * @access private |
|
| 146 | + * @var \Wordlift_List_Service $entity_list_service The Entity list service. |
|
| 147 | + */ |
|
| 148 | + private $entity_list_service; |
|
| 149 | + |
|
| 150 | + /** |
|
| 151 | + * The Entity Types Taxonomy Walker. |
|
| 152 | + * |
|
| 153 | + * @since 3.1.0 |
|
| 154 | + * @access private |
|
| 155 | + * @var \Wordlift_Entity_Types_Taxonomy_Walker $entity_types_taxonomy_walker The Entity Types Taxonomy Walker |
|
| 156 | + */ |
|
| 157 | + private $entity_types_taxonomy_walker; |
|
| 158 | + |
|
| 159 | + /** |
|
| 160 | + * The ShareThis service. |
|
| 161 | + * |
|
| 162 | + * @since 3.2.0 |
|
| 163 | + * @access private |
|
| 164 | + * @var \Wordlift_ShareThis_Service $sharethis_service The ShareThis service. |
|
| 165 | + */ |
|
| 166 | + private $sharethis_service; |
|
| 167 | + |
|
| 168 | + /** |
|
| 169 | + * The PrimaShop adapter. |
|
| 170 | + * |
|
| 171 | + * @since 3.2.3 |
|
| 172 | + * @access private |
|
| 173 | + * @var \Wordlift_PrimaShop_Adapter $primashop_adapter The PrimaShop adapter. |
|
| 174 | + */ |
|
| 175 | + private $primashop_adapter; |
|
| 176 | + |
|
| 177 | + /** |
|
| 178 | + * The WordLift Dashboard adapter. |
|
| 179 | + * |
|
| 180 | + * @since 3.4.0 |
|
| 181 | + * @access private |
|
| 182 | + * @var \Wordlift_Dashboard_Service $dashboard_service The WordLift Dashboard service; |
|
| 183 | + */ |
|
| 184 | + private $dashboard_service; |
|
| 185 | + |
|
| 186 | + /** |
|
| 187 | + * The entity type service. |
|
| 188 | + * |
|
| 189 | + * @since 3.6.0 |
|
| 190 | + * @access private |
|
| 191 | + * @var \Wordlift_Entity_Post_Type_Service |
|
| 192 | + */ |
|
| 193 | + private $entity_post_type_service; |
|
| 194 | + |
|
| 195 | + /** |
|
| 196 | + * The entity link service used to mangle links to entities with a custom slug or even w/o a slug. |
|
| 197 | + * |
|
| 198 | + * @since 3.6.0 |
|
| 199 | + * @access private |
|
| 200 | + * @var \Wordlift_Entity_Link_Service |
|
| 201 | + */ |
|
| 202 | + private $entity_link_service; |
|
| 203 | + |
|
| 204 | + /** |
|
| 205 | + * The page service instance which processes the page output in order to insert schema.org microdata to export the |
|
| 206 | + * correct page title to Google+. |
|
| 207 | + * |
|
| 208 | + * @since 3.5.3 |
|
| 209 | + * @access private |
|
| 210 | + * @var \Wordlift_Page_Service |
|
| 211 | + */ |
|
| 212 | + private $page_service; |
|
| 213 | + |
|
| 214 | + /** |
|
| 215 | + * A {@link Wordlift_Sparql_Service} instance. |
|
| 216 | + * |
|
| 217 | + * @var 3.6.0 |
|
| 218 | + * @access private |
|
| 219 | + * @var \Wordlift_Sparql_Service $sparql_service A {@link Wordlift_Sparql_Service} instance. |
|
| 220 | + */ |
|
| 221 | + private $sparql_service; |
|
| 222 | + |
|
| 223 | + /** |
|
| 224 | + * A {@link Wordlift_Import_Service} instance. |
|
| 225 | + * |
|
| 226 | + * @since 3.6.0 |
|
| 227 | + * @access private |
|
| 228 | + * @var \Wordlift_Import_Service $import_service A {@link Wordlift_Import_Service} instance. |
|
| 229 | + */ |
|
| 230 | + private $import_service; |
|
| 231 | + |
|
| 232 | + /** |
|
| 233 | + * A {@link Wordlift_Rebuild_Service} instance. |
|
| 234 | + * |
|
| 235 | + * @since 3.6.0 |
|
| 236 | + * @access private |
|
| 237 | + * @var \Wordlift_Rebuild_Service $rebuild_service A {@link Wordlift_Rebuild_Service} instance. |
|
| 238 | + */ |
|
| 239 | + private $rebuild_service; |
|
| 240 | + |
|
| 241 | + /** |
|
| 242 | + * A {@link Wordlift_Jsonld_Service} instance. |
|
| 243 | + * |
|
| 244 | + * @since 3.7.0 |
|
| 245 | + * @access private |
|
| 246 | + * @var \Wordlift_Jsonld_Service $jsonld_service A {@link Wordlift_Jsonld_Service} instance. |
|
| 247 | + */ |
|
| 248 | + private $jsonld_service; |
|
| 249 | + |
|
| 250 | + /** |
|
| 251 | + * |
|
| 252 | + * @since 3.7.0 |
|
| 253 | + * @access private |
|
| 254 | + * @var \Wordlift_Property_Factory $property_factory |
|
| 255 | + */ |
|
| 256 | + private $property_factory; |
|
| 257 | + |
|
| 258 | + /** |
|
| 259 | + * The 'Download Your Data' page. |
|
| 260 | + * |
|
| 261 | + * @since 3.6.0 |
|
| 262 | + * @access private |
|
| 263 | + * @var \Wordlift_Admin_Download_Your_Data_Page $download_your_data_page The 'Download Your Data' page. |
|
| 264 | + */ |
|
| 265 | + private $download_your_data_page; |
|
| 266 | + |
|
| 267 | + /** |
|
| 268 | + * The install wizard page. |
|
| 269 | + * |
|
| 270 | + * @since 3.9.0 |
|
| 271 | + * @access private |
|
| 272 | + * @var \Wordlift_Admin_Setup $admin_setup The Install wizard. |
|
| 273 | + */ |
|
| 274 | + private $admin_setup; |
|
| 275 | + |
|
| 276 | + /** |
|
| 277 | + * The Content Filter Service hooks up to the 'the_content' filter and provides |
|
| 278 | + * linking of entities to their pages. |
|
| 279 | + * |
|
| 280 | + * @since 3.8.0 |
|
| 281 | + * @access private |
|
| 282 | + * @var \Wordlift_Content_Filter_Service $content_filter_service A {@link Wordlift_Content_Filter_Service} instance. |
|
| 283 | + */ |
|
| 284 | + private $content_filter_service; |
|
| 285 | + |
|
| 286 | + /** |
|
| 287 | + * A {@link Wordlift_Key_Validation_Service} instance. |
|
| 288 | + * |
|
| 289 | + * @since 3.9.0 |
|
| 290 | + * @access private |
|
| 291 | + * @var Wordlift_Key_Validation_Service $key_validation_service A {@link Wordlift_Key_Validation_Service} instance. |
|
| 292 | + */ |
|
| 293 | + private $key_validation_service; |
|
| 294 | + |
|
| 295 | + /** |
|
| 296 | + * Define the core functionality of the plugin. |
|
| 297 | + * |
|
| 298 | + * Set the plugin name and the plugin version that can be used throughout the plugin. |
|
| 299 | + * Load the dependencies, define the locale, and set the hooks for the admin area and |
|
| 300 | + * the public-facing side of the site. |
|
| 301 | + * |
|
| 302 | + * @since 1.0.0 |
|
| 303 | + */ |
|
| 304 | + public function __construct() { |
|
| 305 | + |
|
| 306 | + $this->plugin_name = 'wordlift'; |
|
| 307 | + $this->version = '3.9.3'; |
|
| 308 | + $this->load_dependencies(); |
|
| 309 | + $this->set_locale(); |
|
| 310 | + $this->define_admin_hooks(); |
|
| 311 | + $this->define_public_hooks(); |
|
| 312 | + |
|
| 313 | + } |
|
| 314 | + |
|
| 315 | + /** |
|
| 316 | + * Load the required dependencies for this plugin. |
|
| 317 | + * |
|
| 318 | + * Include the following files that make up the plugin: |
|
| 319 | + * |
|
| 320 | + * - Wordlift_Loader. Orchestrates the hooks of the plugin. |
|
| 321 | + * - Wordlift_i18n. Defines internationalization functionality. |
|
| 322 | + * - Wordlift_Admin. Defines all hooks for the admin area. |
|
| 323 | + * - Wordlift_Public. Defines all hooks for the public side of the site. |
|
| 324 | + * |
|
| 325 | + * Create an instance of the loader which will be used to register the hooks |
|
| 326 | + * with WordPress. |
|
| 327 | + * |
|
| 328 | + * @since 1.0.0 |
|
| 329 | + * @access private |
|
| 330 | + */ |
|
| 331 | + private function load_dependencies() { |
|
| 332 | + |
|
| 333 | + /** |
|
| 334 | + * The class responsible for orchestrating the actions and filters of the |
|
| 335 | + * core plugin. |
|
| 336 | + */ |
|
| 337 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-loader.php'; |
|
| 338 | + |
|
| 339 | + /** |
|
| 340 | + * The class responsible for defining internationalization functionality |
|
| 341 | + * of the plugin. |
|
| 342 | + */ |
|
| 343 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-i18n.php'; |
|
| 344 | + |
|
| 345 | + /** |
|
| 346 | + * WordLift's supported languages. |
|
| 347 | + */ |
|
| 348 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-languages.php'; |
|
| 349 | + |
|
| 350 | + /** |
|
| 351 | + * Provide support functions to sanitize data. |
|
| 352 | + */ |
|
| 353 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sanitizer.php'; |
|
| 354 | + |
|
| 355 | + /** |
|
| 356 | + * The Redirect service. |
|
| 357 | + */ |
|
| 358 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-redirect-service.php'; |
|
| 359 | + |
|
| 360 | + /** |
|
| 361 | + * The Log service. |
|
| 362 | + */ |
|
| 363 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-log-service.php'; |
|
| 364 | + |
|
| 365 | + /** |
|
| 366 | + * The configuration service. |
|
| 367 | + */ |
|
| 368 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-configuration-service.php'; |
|
| 369 | + |
|
| 370 | + /** |
|
| 371 | + * The entity post type service (this is the WordPress post type, not the entity schema type). |
|
| 372 | + */ |
|
| 373 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-type-service.php'; |
|
| 374 | + |
|
| 375 | + /** |
|
| 376 | + * The entity type service (i.e. the schema type). |
|
| 377 | + */ |
|
| 378 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-service.php'; |
|
| 379 | + |
|
| 380 | + /** |
|
| 381 | + * The entity link service. |
|
| 382 | + */ |
|
| 383 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-link-service.php'; |
|
| 384 | + |
|
| 385 | + /** |
|
| 386 | + * The Query builder. |
|
| 387 | + */ |
|
| 388 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-query-builder.php'; |
|
| 389 | + |
|
| 390 | + /** |
|
| 391 | + * The Schema service. |
|
| 392 | + */ |
|
| 393 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-service.php'; |
|
| 394 | + |
|
| 395 | + /** |
|
| 396 | + * The schema:url property service. |
|
| 397 | + */ |
|
| 398 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-service.php'; |
|
| 399 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-url-property-service.php'; |
|
| 400 | + |
|
| 401 | + /** |
|
| 402 | + * The UI service. |
|
| 403 | + */ |
|
| 404 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-ui-service.php'; |
|
| 405 | + |
|
| 406 | + /** |
|
| 407 | + * The Thumbnail service. |
|
| 408 | + */ |
|
| 409 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-thumbnail-service.php'; |
|
| 410 | + |
|
| 411 | + /** |
|
| 412 | + * The Entity Types Taxonomy service. |
|
| 413 | + */ |
|
| 414 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-types-taxonomy-service.php'; |
|
| 415 | + |
|
| 416 | + /** |
|
| 417 | + * The Entity service. |
|
| 418 | + */ |
|
| 419 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-service.php'; |
|
| 420 | + |
|
| 421 | + /** |
|
| 422 | + * The User service. |
|
| 423 | + */ |
|
| 424 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-user-service.php'; |
|
| 425 | + |
|
| 426 | + /** |
|
| 427 | + * The Timeline service. |
|
| 428 | + */ |
|
| 429 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-timeline-service.php'; |
|
| 430 | + |
|
| 431 | + /** |
|
| 432 | + * The Topic Taxonomy service. |
|
| 433 | + */ |
|
| 434 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-topic-taxonomy-service.php'; |
|
| 435 | + |
|
| 436 | + |
|
| 437 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-page-service.php'; |
|
| 438 | + |
|
| 439 | + /** |
|
| 440 | + * The SPARQL service. |
|
| 441 | + */ |
|
| 442 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sparql-service.php'; |
|
| 443 | + |
|
| 444 | + /** |
|
| 445 | + * The WordLift import service. |
|
| 446 | + */ |
|
| 447 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-import-service.php'; |
|
| 448 | + |
|
| 449 | + /** |
|
| 450 | + * The WordLift URI service. |
|
| 451 | + */ |
|
| 452 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-uri-service.php'; |
|
| 453 | + |
|
| 454 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-listable.php'; |
|
| 455 | + |
|
| 456 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-factory.php'; |
|
| 457 | + |
|
| 458 | + /** |
|
| 459 | + * The WordLift rebuild service, used to rebuild the remote dataset using the local data. |
|
| 460 | + */ |
|
| 461 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-rebuild-service.php'; |
|
| 462 | + |
|
| 463 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/properties/class-wordlift-property-getter-factory.php'; |
|
| 464 | + |
|
| 465 | + /** |
|
| 466 | + * Load the converters. |
|
| 467 | + */ |
|
| 468 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-to-jsonld-converter.php'; |
|
| 469 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-uri-to-jsonld-converter.php'; |
|
| 470 | + |
|
| 471 | + /** |
|
| 472 | + * Load the content filter. |
|
| 473 | + */ |
|
| 474 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-content-filter-service.php'; |
|
| 475 | + |
|
| 476 | + /** |
|
| 477 | + * Load the JSON-LD service to publish entities using JSON-LD.s |
|
| 478 | + * |
|
| 479 | + * @since 3.8.0 |
|
| 480 | + */ |
|
| 481 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-service.php'; |
|
| 482 | + |
|
| 483 | + /** |
|
| 484 | + * Load the WordLift key validation service. |
|
| 485 | + */ |
|
| 486 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-key-validation-service.php'; |
|
| 487 | + |
|
| 488 | + /** |
|
| 489 | + * The class responsible for defining all actions that occur in the admin area. |
|
| 490 | + */ |
|
| 491 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin.php'; |
|
| 492 | + |
|
| 493 | + /** |
|
| 494 | + * The class to customize the entity list admin page. |
|
| 495 | + */ |
|
| 496 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-list.php'; |
|
| 497 | + |
|
| 498 | + /** |
|
| 499 | + * The Entity Types Taxonomy Walker (transforms checkboxes into radios). |
|
| 500 | + */ |
|
| 501 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-types-taxonomy-walker.php'; |
|
| 502 | + |
|
| 503 | + /** |
|
| 504 | + * The Notice service. |
|
| 505 | + */ |
|
| 506 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-notice-service.php'; |
|
| 507 | + |
|
| 508 | + /** |
|
| 509 | + * The PrimaShop adapter. |
|
| 510 | + */ |
|
| 511 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-primashop-adapter.php'; |
|
| 512 | + |
|
| 513 | + /** |
|
| 514 | + * The WordLift Dashboard service. |
|
| 515 | + */ |
|
| 516 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-dashboard.php'; |
|
| 517 | + |
|
| 518 | + /** |
|
| 519 | + * The admin 'Install wizard' page. |
|
| 520 | + */ |
|
| 521 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-setup.php'; |
|
| 522 | 522 | |
| 523 | - /** |
|
| 524 | - * The admin 'Download Your Data' page. |
|
| 525 | - */ |
|
| 526 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-download-your-data-page.php'; |
|
| 523 | + /** |
|
| 524 | + * The admin 'Download Your Data' page. |
|
| 525 | + */ |
|
| 526 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-download-your-data-page.php'; |
|
| 527 | 527 | |
| 528 | - /** |
|
| 529 | - * The class responsible for defining all actions that occur in the public-facing |
|
| 530 | - * side of the site. |
|
| 531 | - */ |
|
| 532 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-public.php'; |
|
| 528 | + /** |
|
| 529 | + * The class responsible for defining all actions that occur in the public-facing |
|
| 530 | + * side of the site. |
|
| 531 | + */ |
|
| 532 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-public.php'; |
|
| 533 | 533 | |
| 534 | - /** |
|
| 535 | - * The shortcode abstract class. |
|
| 536 | - */ |
|
| 537 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-shortcode.php'; |
|
| 534 | + /** |
|
| 535 | + * The shortcode abstract class. |
|
| 536 | + */ |
|
| 537 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-shortcode.php'; |
|
| 538 | 538 | |
| 539 | - /** |
|
| 540 | - * The Timeline shortcode. |
|
| 541 | - */ |
|
| 542 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-timeline-shortcode.php'; |
|
| 539 | + /** |
|
| 540 | + * The Timeline shortcode. |
|
| 541 | + */ |
|
| 542 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-timeline-shortcode.php'; |
|
| 543 | 543 | |
| 544 | - /** |
|
| 545 | - * The Navigator shortcode. |
|
| 546 | - */ |
|
| 547 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-navigator-shortcode.php'; |
|
| 544 | + /** |
|
| 545 | + * The Navigator shortcode. |
|
| 546 | + */ |
|
| 547 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-navigator-shortcode.php'; |
|
| 548 | 548 | |
| 549 | - /** |
|
| 550 | - * The chord shortcode. |
|
| 551 | - */ |
|
| 552 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-chord-shortcode.php'; |
|
| 549 | + /** |
|
| 550 | + * The chord shortcode. |
|
| 551 | + */ |
|
| 552 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-chord-shortcode.php'; |
|
| 553 | 553 | |
| 554 | - /** |
|
| 555 | - * The geomap shortcode. |
|
| 556 | - */ |
|
| 557 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-geomap-shortcode.php'; |
|
| 554 | + /** |
|
| 555 | + * The geomap shortcode. |
|
| 556 | + */ |
|
| 557 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-geomap-shortcode.php'; |
|
| 558 | 558 | |
| 559 | - /** |
|
| 560 | - * The ShareThis service. |
|
| 561 | - */ |
|
| 562 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-sharethis-service.php'; |
|
| 559 | + /** |
|
| 560 | + * The ShareThis service. |
|
| 561 | + */ |
|
| 562 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-sharethis-service.php'; |
|
| 563 | 563 | |
| 564 | - $this->loader = new Wordlift_Loader(); |
|
| 564 | + $this->loader = new Wordlift_Loader(); |
|
| 565 | 565 | |
| 566 | - // Instantiate a global logger. |
|
| 567 | - global $wl_logger; |
|
| 568 | - $wl_logger = Wordlift_Log_Service::get_logger( 'WordLift' ); |
|
| 566 | + // Instantiate a global logger. |
|
| 567 | + global $wl_logger; |
|
| 568 | + $wl_logger = Wordlift_Log_Service::get_logger( 'WordLift' ); |
|
| 569 | 569 | |
| 570 | - // Create the configuration service. |
|
| 571 | - $configuration_service = new Wordlift_Configuration_Service(); |
|
| 570 | + // Create the configuration service. |
|
| 571 | + $configuration_service = new Wordlift_Configuration_Service(); |
|
| 572 | 572 | |
| 573 | - // Create an entity type service instance. It'll be later bound to the init action. |
|
| 574 | - $this->entity_post_type_service = new Wordlift_Entity_Post_Type_Service( Wordlift_Entity_Service::TYPE_NAME, $configuration_service->get_entity_base_path() ); |
|
| 573 | + // Create an entity type service instance. It'll be later bound to the init action. |
|
| 574 | + $this->entity_post_type_service = new Wordlift_Entity_Post_Type_Service( Wordlift_Entity_Service::TYPE_NAME, $configuration_service->get_entity_base_path() ); |
|
| 575 | 575 | |
| 576 | - // Create an entity link service instance. It'll be later bound to the post_type_link and pre_get_posts actions. |
|
| 577 | - $this->entity_link_service = new Wordlift_Entity_Link_Service( $this->entity_post_type_service, $configuration_service->get_entity_base_path() ); |
|
| 576 | + // Create an entity link service instance. It'll be later bound to the post_type_link and pre_get_posts actions. |
|
| 577 | + $this->entity_link_service = new Wordlift_Entity_Link_Service( $this->entity_post_type_service, $configuration_service->get_entity_base_path() ); |
|
| 578 | 578 | |
| 579 | - // Create an instance of the UI service. |
|
| 580 | - $this->ui_service = new Wordlift_UI_Service(); |
|
| 579 | + // Create an instance of the UI service. |
|
| 580 | + $this->ui_service = new Wordlift_UI_Service(); |
|
| 581 | 581 | |
| 582 | - // Create an instance of the Thumbnail service. Later it'll be hooked to post meta events. |
|
| 583 | - $this->thumbnail_service = new Wordlift_Thumbnail_Service(); |
|
| 582 | + // Create an instance of the Thumbnail service. Later it'll be hooked to post meta events. |
|
| 583 | + $this->thumbnail_service = new Wordlift_Thumbnail_Service(); |
|
| 584 | 584 | |
| 585 | - $this->sparql_service = new Wordlift_Sparql_Service(); |
|
| 585 | + $this->sparql_service = new Wordlift_Sparql_Service(); |
|
| 586 | 586 | |
| 587 | - // Create an instance of the Schema service. |
|
| 588 | - $schema_url_property_service = new Wordlift_Schema_Url_Property_Service( $this->sparql_service ); |
|
| 589 | - $this->schema_service = new Wordlift_Schema_Service(); |
|
| 587 | + // Create an instance of the Schema service. |
|
| 588 | + $schema_url_property_service = new Wordlift_Schema_Url_Property_Service( $this->sparql_service ); |
|
| 589 | + $this->schema_service = new Wordlift_Schema_Service(); |
|
| 590 | 590 | |
| 591 | - // Create an instance of the Notice service. |
|
| 592 | - $this->notice_service = new Wordlift_Notice_Service(); |
|
| 591 | + // Create an instance of the Notice service. |
|
| 592 | + $this->notice_service = new Wordlift_Notice_Service(); |
|
| 593 | 593 | |
| 594 | - // Create an instance of the Entity service, passing the UI service to draw parts of the Entity admin page. |
|
| 595 | - $this->entity_service = new Wordlift_Entity_Service( $this->ui_service, $this->schema_service, $this->notice_service ); |
|
| 594 | + // Create an instance of the Entity service, passing the UI service to draw parts of the Entity admin page. |
|
| 595 | + $this->entity_service = new Wordlift_Entity_Service( $this->ui_service, $this->schema_service, $this->notice_service ); |
|
| 596 | 596 | |
| 597 | - // Create an instance of the User service. |
|
| 598 | - $this->user_service = new Wordlift_User_Service(); |
|
| 597 | + // Create an instance of the User service. |
|
| 598 | + $this->user_service = new Wordlift_User_Service(); |
|
| 599 | 599 | |
| 600 | - // Create a new instance of the Timeline service and Timeline shortcode. |
|
| 601 | - $this->timeline_service = new Wordlift_Timeline_Service( $this->entity_service ); |
|
| 600 | + // Create a new instance of the Timeline service and Timeline shortcode. |
|
| 601 | + $this->timeline_service = new Wordlift_Timeline_Service( $this->entity_service ); |
|
| 602 | 602 | |
| 603 | - // Create a new instance of the Redirect service. |
|
| 604 | - $this->redirect_service = new Wordlift_Redirect_Service( $this->entity_service ); |
|
| 603 | + // Create a new instance of the Redirect service. |
|
| 604 | + $this->redirect_service = new Wordlift_Redirect_Service( $this->entity_service ); |
|
| 605 | 605 | |
| 606 | - // Create a new instance of the Redirect service. |
|
| 607 | - $this->dashboard_service = new Wordlift_Dashboard_Service( $this->entity_service ); |
|
| 606 | + // Create a new instance of the Redirect service. |
|
| 607 | + $this->dashboard_service = new Wordlift_Dashboard_Service( $this->entity_service ); |
|
| 608 | 608 | |
| 609 | - // Initialize the shortcodes. |
|
| 610 | - new Wordlift_Navigator_Shortcode(); |
|
| 611 | - new Wordlift_Chord_Shortcode(); |
|
| 612 | - new Wordlift_Geomap_Shortcode(); |
|
| 613 | - new Wordlift_Timeline_Shortcode(); |
|
| 609 | + // Initialize the shortcodes. |
|
| 610 | + new Wordlift_Navigator_Shortcode(); |
|
| 611 | + new Wordlift_Chord_Shortcode(); |
|
| 612 | + new Wordlift_Geomap_Shortcode(); |
|
| 613 | + new Wordlift_Timeline_Shortcode(); |
|
| 614 | 614 | |
| 615 | - // Create entity list customization (wp-admin/edit.php) |
|
| 616 | - $this->entity_list_service = new Wordlift_Entity_List_Service( $this->entity_service ); |
|
| 615 | + // Create entity list customization (wp-admin/edit.php) |
|
| 616 | + $this->entity_list_service = new Wordlift_Entity_List_Service( $this->entity_service ); |
|
| 617 | 617 | |
| 618 | - $this->entity_types_taxonomy_walker = new Wordlift_Entity_Types_Taxonomy_Walker(); |
|
| 618 | + $this->entity_types_taxonomy_walker = new Wordlift_Entity_Types_Taxonomy_Walker(); |
|
| 619 | 619 | |
| 620 | - $this->topic_taxonomy_service = new Wordlift_Topic_Taxonomy_Service(); |
|
| 620 | + $this->topic_taxonomy_service = new Wordlift_Topic_Taxonomy_Service(); |
|
| 621 | 621 | |
| 622 | - // Create an instance of the ShareThis service, later we hook it to the_content and the_excerpt filters. |
|
| 623 | - $this->sharethis_service = new Wordlift_ShareThis_Service(); |
|
| 622 | + // Create an instance of the ShareThis service, later we hook it to the_content and the_excerpt filters. |
|
| 623 | + $this->sharethis_service = new Wordlift_ShareThis_Service(); |
|
| 624 | 624 | |
| 625 | - // Create an instance of the PrimaShop adapter. |
|
| 626 | - $this->primashop_adapter = new Wordlift_PrimaShop_Adapter(); |
|
| 625 | + // Create an instance of the PrimaShop adapter. |
|
| 626 | + $this->primashop_adapter = new Wordlift_PrimaShop_Adapter(); |
|
| 627 | 627 | |
| 628 | - $this->page_service = new Wordlift_Page_Service(); |
|
| 628 | + $this->page_service = new Wordlift_Page_Service(); |
|
| 629 | 629 | |
| 630 | - // Create an import service instance to hook later to WP's import function. |
|
| 631 | - $this->import_service = new Wordlift_Import_Service( $this->entity_post_type_service, $this->entity_service, $this->schema_service, $this->sparql_service, wl_configuration_get_redlink_dataset_uri() ); |
|
| 630 | + // Create an import service instance to hook later to WP's import function. |
|
| 631 | + $this->import_service = new Wordlift_Import_Service( $this->entity_post_type_service, $this->entity_service, $this->schema_service, $this->sparql_service, wl_configuration_get_redlink_dataset_uri() ); |
|
| 632 | 632 | |
| 633 | - $uri_service = new Wordlift_Uri_Service( $GLOBALS['wpdb'] ); |
|
| 633 | + $uri_service = new Wordlift_Uri_Service( $GLOBALS['wpdb'] ); |
|
| 634 | 634 | |
| 635 | - // Create a Rebuild Service instance, which we'll later bound to an ajax call. |
|
| 636 | - $this->rebuild_service = new Wordlift_Rebuild_Service( $this->sparql_service, $uri_service ); |
|
| 635 | + // Create a Rebuild Service instance, which we'll later bound to an ajax call. |
|
| 636 | + $this->rebuild_service = new Wordlift_Rebuild_Service( $this->sparql_service, $uri_service ); |
|
| 637 | 637 | |
| 638 | - $entity_type_service = new Wordlift_Entity_Type_Service( $this->schema_service ); |
|
| 638 | + $entity_type_service = new Wordlift_Entity_Type_Service( $this->schema_service ); |
|
| 639 | 639 | |
| 640 | - $this->property_factory = new Wordlift_Property_Factory( $schema_url_property_service ); |
|
| 641 | - $this->property_factory->register( Wordlift_Schema_Url_Property_Service::META_KEY, $schema_url_property_service ); |
|
| 640 | + $this->property_factory = new Wordlift_Property_Factory( $schema_url_property_service ); |
|
| 641 | + $this->property_factory->register( Wordlift_Schema_Url_Property_Service::META_KEY, $schema_url_property_service ); |
|
| 642 | 642 | |
| 643 | - // Instantiate the JSON-LD service. |
|
| 644 | - $property_getter = Wordlift_Property_Getter_Factory::create( $this->entity_service ); |
|
| 645 | - $entity_uri_to_jsonld_converter = new Wordlift_Entity_Uri_To_Jsonld_Converter( $entity_type_service, $this->entity_service, $property_getter ); |
|
| 646 | - $this->jsonld_service = new Wordlift_Jsonld_Service( $this->entity_service, $entity_uri_to_jsonld_converter ); |
|
| 643 | + // Instantiate the JSON-LD service. |
|
| 644 | + $property_getter = Wordlift_Property_Getter_Factory::create( $this->entity_service ); |
|
| 645 | + $entity_uri_to_jsonld_converter = new Wordlift_Entity_Uri_To_Jsonld_Converter( $entity_type_service, $this->entity_service, $property_getter ); |
|
| 646 | + $this->jsonld_service = new Wordlift_Jsonld_Service( $this->entity_service, $entity_uri_to_jsonld_converter ); |
|
| 647 | 647 | |
| 648 | - // Create an instance of the Key Validation service. This service is later hooked to provide an AJAX call (only for admins). |
|
| 649 | - $this->key_validation_service = new Wordlift_Key_Validation_Service(); |
|
| 648 | + // Create an instance of the Key Validation service. This service is later hooked to provide an AJAX call (only for admins). |
|
| 649 | + $this->key_validation_service = new Wordlift_Key_Validation_Service(); |
|
| 650 | 650 | |
| 651 | - //** WordPress Admin */ |
|
| 652 | - $this->download_your_data_page = new Wordlift_Admin_Download_Your_Data_Page(); |
|
| 651 | + //** WordPress Admin */ |
|
| 652 | + $this->download_your_data_page = new Wordlift_Admin_Download_Your_Data_Page(); |
|
| 653 | 653 | |
| 654 | - // Create an instance of the install wizard. |
|
| 655 | - $this->admin_setup = new Wordlift_Admin_Setup( $configuration_service, $this->key_validation_service, $this->entity_service ); |
|
| 654 | + // Create an instance of the install wizard. |
|
| 655 | + $this->admin_setup = new Wordlift_Admin_Setup( $configuration_service, $this->key_validation_service, $this->entity_service ); |
|
| 656 | 656 | |
| 657 | - // Create an instance of the content filter service. |
|
| 658 | - $this->content_filter_service = new Wordlift_Content_Filter_Service( $this->entity_service ); |
|
| 657 | + // Create an instance of the content filter service. |
|
| 658 | + $this->content_filter_service = new Wordlift_Content_Filter_Service( $this->entity_service ); |
|
| 659 | 659 | |
| 660 | - // Load the debug service if WP is in debug mode. |
|
| 661 | - if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { |
|
| 662 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-debug-service.php'; |
|
| 663 | - new Wordlift_Debug_Service( $this->entity_service ); |
|
| 664 | - } |
|
| 660 | + // Load the debug service if WP is in debug mode. |
|
| 661 | + if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { |
|
| 662 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-debug-service.php'; |
|
| 663 | + new Wordlift_Debug_Service( $this->entity_service ); |
|
| 664 | + } |
|
| 665 | 665 | |
| 666 | - } |
|
| 666 | + } |
|
| 667 | 667 | |
| 668 | - /** |
|
| 669 | - * Define the locale for this plugin for internationalization. |
|
| 670 | - * |
|
| 671 | - * Uses the Wordlift_i18n class in order to set the domain and to register the hook |
|
| 672 | - * with WordPress. |
|
| 673 | - * |
|
| 674 | - * @since 1.0.0 |
|
| 675 | - * @access private |
|
| 676 | - */ |
|
| 677 | - private function set_locale() { |
|
| 668 | + /** |
|
| 669 | + * Define the locale for this plugin for internationalization. |
|
| 670 | + * |
|
| 671 | + * Uses the Wordlift_i18n class in order to set the domain and to register the hook |
|
| 672 | + * with WordPress. |
|
| 673 | + * |
|
| 674 | + * @since 1.0.0 |
|
| 675 | + * @access private |
|
| 676 | + */ |
|
| 677 | + private function set_locale() { |
|
| 678 | 678 | |
| 679 | - $plugin_i18n = new Wordlift_i18n(); |
|
| 680 | - $plugin_i18n->set_domain( $this->get_plugin_name() ); |
|
| 679 | + $plugin_i18n = new Wordlift_i18n(); |
|
| 680 | + $plugin_i18n->set_domain( $this->get_plugin_name() ); |
|
| 681 | 681 | |
| 682 | - $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' ); |
|
| 682 | + $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' ); |
|
| 683 | 683 | |
| 684 | - } |
|
| 684 | + } |
|
| 685 | 685 | |
| 686 | - /** |
|
| 687 | - * Register all of the hooks related to the admin area functionality |
|
| 688 | - * of the plugin. |
|
| 689 | - * |
|
| 690 | - * @since 1.0.0 |
|
| 691 | - * @access private |
|
| 692 | - */ |
|
| 693 | - private function define_admin_hooks() { |
|
| 686 | + /** |
|
| 687 | + * Register all of the hooks related to the admin area functionality |
|
| 688 | + * of the plugin. |
|
| 689 | + * |
|
| 690 | + * @since 1.0.0 |
|
| 691 | + * @access private |
|
| 692 | + */ |
|
| 693 | + private function define_admin_hooks() { |
|
| 694 | 694 | |
| 695 | - $plugin_admin = new Wordlift_Admin( $this->get_plugin_name(), $this->get_version() ); |
|
| 695 | + $plugin_admin = new Wordlift_Admin( $this->get_plugin_name(), $this->get_version() ); |
|
| 696 | 696 | |
| 697 | - $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' ); |
|
| 698 | - $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' ); |
|
| 697 | + $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' ); |
|
| 698 | + $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' ); |
|
| 699 | 699 | |
| 700 | - // Hook the init action to the Topic Taxonomy service. |
|
| 701 | - $this->loader->add_action( 'init', $this->topic_taxonomy_service, 'init', 0 ); |
|
| 700 | + // Hook the init action to the Topic Taxonomy service. |
|
| 701 | + $this->loader->add_action( 'init', $this->topic_taxonomy_service, 'init', 0 ); |
|
| 702 | 702 | |
| 703 | - // Hook the deleted_post_meta action to the Thumbnail service. |
|
| 704 | - $this->loader->add_action( 'deleted_post_meta', $this->thumbnail_service, 'deleted_post_meta', 10, 4 ); |
|
| 703 | + // Hook the deleted_post_meta action to the Thumbnail service. |
|
| 704 | + $this->loader->add_action( 'deleted_post_meta', $this->thumbnail_service, 'deleted_post_meta', 10, 4 ); |
|
| 705 | 705 | |
| 706 | - // Hook the added_post_meta action to the Thumbnail service. |
|
| 707 | - $this->loader->add_action( 'added_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 ); |
|
| 706 | + // Hook the added_post_meta action to the Thumbnail service. |
|
| 707 | + $this->loader->add_action( 'added_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 ); |
|
| 708 | 708 | |
| 709 | - // Hook the updated_post_meta action to the Thumbnail service. |
|
| 710 | - $this->loader->add_action( 'updated_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 ); |
|
| 709 | + // Hook the updated_post_meta action to the Thumbnail service. |
|
| 710 | + $this->loader->add_action( 'updated_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 ); |
|
| 711 | 711 | |
| 712 | - // Hook posts inserts (or updates) to the user service. |
|
| 713 | - $this->loader->add_action( 'wp_insert_post', $this->user_service, 'wp_insert_post', 10, 3 ); |
|
| 712 | + // Hook posts inserts (or updates) to the user service. |
|
| 713 | + $this->loader->add_action( 'wp_insert_post', $this->user_service, 'wp_insert_post', 10, 3 ); |
|
| 714 | 714 | |
| 715 | - // Hook the AJAX wl_timeline action to the Timeline service. |
|
| 716 | - $this->loader->add_action( 'wp_ajax_wl_timeline', $this->timeline_service, 'ajax_timeline' ); |
|
| 715 | + // Hook the AJAX wl_timeline action to the Timeline service. |
|
| 716 | + $this->loader->add_action( 'wp_ajax_wl_timeline', $this->timeline_service, 'ajax_timeline' ); |
|
| 717 | 717 | |
| 718 | - // Register custom allowed redirect hosts. |
|
| 719 | - $this->loader->add_filter( 'allowed_redirect_hosts', $this->redirect_service, 'allowed_redirect_hosts' ); |
|
| 720 | - // Hook the AJAX wordlift_redirect action to the Redirect service. |
|
| 721 | - $this->loader->add_action( 'wp_ajax_wordlift_redirect', $this->redirect_service, 'ajax_redirect' ); |
|
| 722 | - // Hook the AJAX wordlift_redirect action to the Redirect service. |
|
| 723 | - $this->loader->add_action( 'wp_ajax_wordlift_get_stats', $this->dashboard_service, 'ajax_get_stats' ); |
|
| 724 | - // Hook the AJAX wordlift_redirect action to the Redirect service. |
|
| 725 | - $this->loader->add_action( 'wp_dashboard_setup', $this->dashboard_service, 'add_dashboard_widgets' ); |
|
| 718 | + // Register custom allowed redirect hosts. |
|
| 719 | + $this->loader->add_filter( 'allowed_redirect_hosts', $this->redirect_service, 'allowed_redirect_hosts' ); |
|
| 720 | + // Hook the AJAX wordlift_redirect action to the Redirect service. |
|
| 721 | + $this->loader->add_action( 'wp_ajax_wordlift_redirect', $this->redirect_service, 'ajax_redirect' ); |
|
| 722 | + // Hook the AJAX wordlift_redirect action to the Redirect service. |
|
| 723 | + $this->loader->add_action( 'wp_ajax_wordlift_get_stats', $this->dashboard_service, 'ajax_get_stats' ); |
|
| 724 | + // Hook the AJAX wordlift_redirect action to the Redirect service. |
|
| 725 | + $this->loader->add_action( 'wp_dashboard_setup', $this->dashboard_service, 'add_dashboard_widgets' ); |
|
| 726 | 726 | |
| 727 | - // Hook save_post to the entity service to update custom fields (such as alternate labels). |
|
| 728 | - // We have a priority of 9 because we want to be executed before data is sent to Redlink. |
|
| 729 | - $this->loader->add_action( 'save_post', $this->entity_service, 'save_post', 9, 3 ); |
|
| 730 | - $this->loader->add_action( 'save_post_entity', $this->entity_service, 'set_rating_for', 10, 1 ); |
|
| 727 | + // Hook save_post to the entity service to update custom fields (such as alternate labels). |
|
| 728 | + // We have a priority of 9 because we want to be executed before data is sent to Redlink. |
|
| 729 | + $this->loader->add_action( 'save_post', $this->entity_service, 'save_post', 9, 3 ); |
|
| 730 | + $this->loader->add_action( 'save_post_entity', $this->entity_service, 'set_rating_for', 10, 1 ); |
|
| 731 | 731 | |
| 732 | - $this->loader->add_action( 'edit_form_before_permalink', $this->entity_service, 'edit_form_before_permalink', 10, 1 ); |
|
| 733 | - $this->loader->add_action( 'in_admin_header', $this->entity_service, 'in_admin_header' ); |
|
| 732 | + $this->loader->add_action( 'edit_form_before_permalink', $this->entity_service, 'edit_form_before_permalink', 10, 1 ); |
|
| 733 | + $this->loader->add_action( 'in_admin_header', $this->entity_service, 'in_admin_header' ); |
|
| 734 | 734 | |
| 735 | - // Entity listing customization (wp-admin/edit.php) |
|
| 736 | - // Add custom columns |
|
| 737 | - $this->loader->add_filter( 'manage_entity_posts_columns', $this->entity_list_service, 'register_custom_columns' ); |
|
| 738 | - $this->loader->add_filter( 'manage_entity_posts_custom_column', $this->entity_list_service, 'render_custom_columns', 10, 2 ); |
|
| 739 | - // Add 4W selection |
|
| 740 | - $this->loader->add_action( 'restrict_manage_posts', $this->entity_list_service, 'restrict_manage_posts_classification_scope' ); |
|
| 741 | - $this->loader->add_filter( 'posts_clauses', $this->entity_list_service, 'posts_clauses_classification_scope' ); |
|
| 742 | - |
|
| 743 | - $this->loader->add_filter( 'wp_terms_checklist_args', $this->entity_types_taxonomy_walker, 'terms_checklist_args' ); |
|
| 744 | - |
|
| 745 | - // Hook the PrimaShop adapter to <em>prima_metabox_entity_header_args</em> in order to add header support for |
|
| 746 | - // entities. |
|
| 747 | - $this->loader->add_filter( 'prima_metabox_entity_header_args', $this->primashop_adapter, 'prima_metabox_entity_header_args', 10, 2 ); |
|
| 748 | - |
|
| 749 | - // Filter imported post meta. |
|
| 750 | - $this->loader->add_filter( 'wp_import_post_meta', $this->import_service, 'wp_import_post_meta', 10, 3 ); |
|
| 751 | - |
|
| 752 | - // Notify the import service when an import starts and ends. |
|
| 753 | - $this->loader->add_action( 'import_start', $this->import_service, 'import_start', 10, 0 ); |
|
| 754 | - $this->loader->add_action( 'import_end', $this->import_service, 'import_end', 10, 0 ); |
|
| 755 | - |
|
| 756 | - // Hook the AJAX wl_rebuild action to the Rebuild Service. |
|
| 757 | - $this->loader->add_action( 'wp_ajax_wl_rebuild', $this->rebuild_service, 'rebuild' ); |
|
| 758 | - |
|
| 759 | - // Hook the menu to the Download Your Data page. |
|
| 760 | - $this->loader->add_action( 'admin_menu', $this->download_your_data_page, 'admin_menu', 100, 0 ); |
|
| 761 | - |
|
| 762 | - // Hook the admin-ajax.php?action=wl_download_your_data&out=xyz links. |
|
| 763 | - $this->loader->add_action( 'wp_ajax_wl_download_your_data', $this->download_your_data_page, 'download_your_data', 10 ); |
|
| 764 | - |
|
| 765 | - // Hook the AJAX wl_jsonld action to the JSON-LD service. |
|
| 766 | - $this->loader->add_action( 'wp_ajax_wl_jsonld', $this->jsonld_service, 'get' ); |
|
| 767 | - |
|
| 768 | - // Hook the AJAX wl_validate_key action to the Key Validation service. |
|
| 769 | - $this->loader->add_action( 'wp_ajax_wl_validate_key', $this->key_validation_service, 'validate_key' ); |
|
| 770 | - |
|
| 771 | - // Hook the `admin_init` function to the Admin Setup. |
|
| 772 | - $this->loader->add_action( 'admin_init', $this->admin_setup, 'admin_init' ); |
|
| 773 | - |
|
| 774 | - } |
|
| 775 | - |
|
| 776 | - /** |
|
| 777 | - * Register all of the hooks related to the public-facing functionality |
|
| 778 | - * of the plugin. |
|
| 779 | - * |
|
| 780 | - * @since 1.0.0 |
|
| 781 | - * @access private |
|
| 782 | - */ |
|
| 783 | - private function define_public_hooks() { |
|
| 784 | - |
|
| 785 | - $plugin_public = new Wordlift_Public( $this->get_plugin_name(), $this->get_version() ); |
|
| 786 | - |
|
| 787 | - // Register the entity post type. |
|
| 788 | - $this->loader->add_action( 'init', $this->entity_post_type_service, 'register' ); |
|
| 789 | - |
|
| 790 | - // Bind the link generation and handling hooks to the entity link service. |
|
| 791 | - $this->loader->add_filter( 'post_type_link', $this->entity_link_service, 'post_type_link', 10, 4 ); |
|
| 792 | - $this->loader->add_action( 'pre_get_posts', $this->entity_link_service, 'pre_get_posts', 10, 1 ); |
|
| 793 | - $this->loader->add_filter( 'wp_unique_post_slug_is_bad_flat_slug', $this->entity_link_service, 'wp_unique_post_slug_is_bad_flat_slug', 10, 3 ); |
|
| 794 | - $this->loader->add_filter( 'wp_unique_post_slug_is_bad_hierarchical_slug', $this->entity_link_service, 'wp_unique_post_slug_is_bad_hierarchical_slug', 10, 4 ); |
|
| 795 | - |
|
| 796 | - $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' ); |
|
| 797 | - $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' ); |
|
| 798 | - |
|
| 799 | - // Hook the content filter service to add entity links. |
|
| 800 | - $this->loader->add_filter( 'the_content', $this->content_filter_service, 'the_content' ); |
|
| 801 | - |
|
| 802 | - // Hook the AJAX wl_timeline action to the Timeline service. |
|
| 803 | - $this->loader->add_action( 'wp_ajax_nopriv_wl_timeline', $this->timeline_service, 'ajax_timeline' ); |
|
| 804 | - |
|
| 805 | - // Hook the ShareThis service. |
|
| 806 | - $this->loader->add_filter( 'the_content', $this->sharethis_service, 'the_content', 99 ); |
|
| 807 | - $this->loader->add_filter( 'the_excerpt', $this->sharethis_service, 'the_excerpt', 99 ); |
|
| 808 | - |
|
| 809 | - $this->loader->add_action( 'wp_head', $this->page_service, 'wp_head', PHP_INT_MAX ); |
|
| 810 | - $this->loader->add_action( 'wp_footer', $this->page_service, 'wp_head', - PHP_INT_MAX ); |
|
| 811 | - |
|
| 812 | - // Hook the AJAX wl_jsonld action to the JSON-LD service. |
|
| 813 | - $this->loader->add_action( 'wp_ajax_nopriv_wl_jsonld', $this->jsonld_service, 'get' ); |
|
| 814 | - |
|
| 815 | - } |
|
| 816 | - |
|
| 817 | - /** |
|
| 818 | - * Run the loader to execute all of the hooks with WordPress. |
|
| 819 | - * |
|
| 820 | - * @since 1.0.0 |
|
| 821 | - */ |
|
| 822 | - public function run() { |
|
| 823 | - $this->loader->run(); |
|
| 824 | - } |
|
| 825 | - |
|
| 826 | - /** |
|
| 827 | - * The name of the plugin used to uniquely identify it within the context of |
|
| 828 | - * WordPress and to define internationalization functionality. |
|
| 829 | - * |
|
| 830 | - * @since 1.0.0 |
|
| 831 | - * @return string The name of the plugin. |
|
| 832 | - */ |
|
| 833 | - public function get_plugin_name() { |
|
| 834 | - return $this->plugin_name; |
|
| 835 | - } |
|
| 836 | - |
|
| 837 | - /** |
|
| 838 | - * The reference to the class that orchestrates the hooks with the plugin. |
|
| 839 | - * |
|
| 840 | - * @since 1.0.0 |
|
| 841 | - * @return Wordlift_Loader Orchestrates the hooks of the plugin. |
|
| 842 | - */ |
|
| 843 | - public function get_loader() { |
|
| 844 | - return $this->loader; |
|
| 845 | - } |
|
| 846 | - |
|
| 847 | - /** |
|
| 848 | - * Retrieve the version number of the plugin. |
|
| 849 | - * |
|
| 850 | - * @since 1.0.0 |
|
| 851 | - * @return string The version number of the plugin. |
|
| 852 | - */ |
|
| 853 | - public function get_version() { |
|
| 854 | - return $this->version; |
|
| 855 | - } |
|
| 735 | + // Entity listing customization (wp-admin/edit.php) |
|
| 736 | + // Add custom columns |
|
| 737 | + $this->loader->add_filter( 'manage_entity_posts_columns', $this->entity_list_service, 'register_custom_columns' ); |
|
| 738 | + $this->loader->add_filter( 'manage_entity_posts_custom_column', $this->entity_list_service, 'render_custom_columns', 10, 2 ); |
|
| 739 | + // Add 4W selection |
|
| 740 | + $this->loader->add_action( 'restrict_manage_posts', $this->entity_list_service, 'restrict_manage_posts_classification_scope' ); |
|
| 741 | + $this->loader->add_filter( 'posts_clauses', $this->entity_list_service, 'posts_clauses_classification_scope' ); |
|
| 742 | + |
|
| 743 | + $this->loader->add_filter( 'wp_terms_checklist_args', $this->entity_types_taxonomy_walker, 'terms_checklist_args' ); |
|
| 744 | + |
|
| 745 | + // Hook the PrimaShop adapter to <em>prima_metabox_entity_header_args</em> in order to add header support for |
|
| 746 | + // entities. |
|
| 747 | + $this->loader->add_filter( 'prima_metabox_entity_header_args', $this->primashop_adapter, 'prima_metabox_entity_header_args', 10, 2 ); |
|
| 748 | + |
|
| 749 | + // Filter imported post meta. |
|
| 750 | + $this->loader->add_filter( 'wp_import_post_meta', $this->import_service, 'wp_import_post_meta', 10, 3 ); |
|
| 751 | + |
|
| 752 | + // Notify the import service when an import starts and ends. |
|
| 753 | + $this->loader->add_action( 'import_start', $this->import_service, 'import_start', 10, 0 ); |
|
| 754 | + $this->loader->add_action( 'import_end', $this->import_service, 'import_end', 10, 0 ); |
|
| 755 | + |
|
| 756 | + // Hook the AJAX wl_rebuild action to the Rebuild Service. |
|
| 757 | + $this->loader->add_action( 'wp_ajax_wl_rebuild', $this->rebuild_service, 'rebuild' ); |
|
| 758 | + |
|
| 759 | + // Hook the menu to the Download Your Data page. |
|
| 760 | + $this->loader->add_action( 'admin_menu', $this->download_your_data_page, 'admin_menu', 100, 0 ); |
|
| 761 | + |
|
| 762 | + // Hook the admin-ajax.php?action=wl_download_your_data&out=xyz links. |
|
| 763 | + $this->loader->add_action( 'wp_ajax_wl_download_your_data', $this->download_your_data_page, 'download_your_data', 10 ); |
|
| 764 | + |
|
| 765 | + // Hook the AJAX wl_jsonld action to the JSON-LD service. |
|
| 766 | + $this->loader->add_action( 'wp_ajax_wl_jsonld', $this->jsonld_service, 'get' ); |
|
| 767 | + |
|
| 768 | + // Hook the AJAX wl_validate_key action to the Key Validation service. |
|
| 769 | + $this->loader->add_action( 'wp_ajax_wl_validate_key', $this->key_validation_service, 'validate_key' ); |
|
| 770 | + |
|
| 771 | + // Hook the `admin_init` function to the Admin Setup. |
|
| 772 | + $this->loader->add_action( 'admin_init', $this->admin_setup, 'admin_init' ); |
|
| 773 | + |
|
| 774 | + } |
|
| 775 | + |
|
| 776 | + /** |
|
| 777 | + * Register all of the hooks related to the public-facing functionality |
|
| 778 | + * of the plugin. |
|
| 779 | + * |
|
| 780 | + * @since 1.0.0 |
|
| 781 | + * @access private |
|
| 782 | + */ |
|
| 783 | + private function define_public_hooks() { |
|
| 784 | + |
|
| 785 | + $plugin_public = new Wordlift_Public( $this->get_plugin_name(), $this->get_version() ); |
|
| 786 | + |
|
| 787 | + // Register the entity post type. |
|
| 788 | + $this->loader->add_action( 'init', $this->entity_post_type_service, 'register' ); |
|
| 789 | + |
|
| 790 | + // Bind the link generation and handling hooks to the entity link service. |
|
| 791 | + $this->loader->add_filter( 'post_type_link', $this->entity_link_service, 'post_type_link', 10, 4 ); |
|
| 792 | + $this->loader->add_action( 'pre_get_posts', $this->entity_link_service, 'pre_get_posts', 10, 1 ); |
|
| 793 | + $this->loader->add_filter( 'wp_unique_post_slug_is_bad_flat_slug', $this->entity_link_service, 'wp_unique_post_slug_is_bad_flat_slug', 10, 3 ); |
|
| 794 | + $this->loader->add_filter( 'wp_unique_post_slug_is_bad_hierarchical_slug', $this->entity_link_service, 'wp_unique_post_slug_is_bad_hierarchical_slug', 10, 4 ); |
|
| 795 | + |
|
| 796 | + $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' ); |
|
| 797 | + $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' ); |
|
| 798 | + |
|
| 799 | + // Hook the content filter service to add entity links. |
|
| 800 | + $this->loader->add_filter( 'the_content', $this->content_filter_service, 'the_content' ); |
|
| 801 | + |
|
| 802 | + // Hook the AJAX wl_timeline action to the Timeline service. |
|
| 803 | + $this->loader->add_action( 'wp_ajax_nopriv_wl_timeline', $this->timeline_service, 'ajax_timeline' ); |
|
| 804 | + |
|
| 805 | + // Hook the ShareThis service. |
|
| 806 | + $this->loader->add_filter( 'the_content', $this->sharethis_service, 'the_content', 99 ); |
|
| 807 | + $this->loader->add_filter( 'the_excerpt', $this->sharethis_service, 'the_excerpt', 99 ); |
|
| 808 | + |
|
| 809 | + $this->loader->add_action( 'wp_head', $this->page_service, 'wp_head', PHP_INT_MAX ); |
|
| 810 | + $this->loader->add_action( 'wp_footer', $this->page_service, 'wp_head', - PHP_INT_MAX ); |
|
| 811 | + |
|
| 812 | + // Hook the AJAX wl_jsonld action to the JSON-LD service. |
|
| 813 | + $this->loader->add_action( 'wp_ajax_nopriv_wl_jsonld', $this->jsonld_service, 'get' ); |
|
| 814 | + |
|
| 815 | + } |
|
| 816 | + |
|
| 817 | + /** |
|
| 818 | + * Run the loader to execute all of the hooks with WordPress. |
|
| 819 | + * |
|
| 820 | + * @since 1.0.0 |
|
| 821 | + */ |
|
| 822 | + public function run() { |
|
| 823 | + $this->loader->run(); |
|
| 824 | + } |
|
| 825 | + |
|
| 826 | + /** |
|
| 827 | + * The name of the plugin used to uniquely identify it within the context of |
|
| 828 | + * WordPress and to define internationalization functionality. |
|
| 829 | + * |
|
| 830 | + * @since 1.0.0 |
|
| 831 | + * @return string The name of the plugin. |
|
| 832 | + */ |
|
| 833 | + public function get_plugin_name() { |
|
| 834 | + return $this->plugin_name; |
|
| 835 | + } |
|
| 836 | + |
|
| 837 | + /** |
|
| 838 | + * The reference to the class that orchestrates the hooks with the plugin. |
|
| 839 | + * |
|
| 840 | + * @since 1.0.0 |
|
| 841 | + * @return Wordlift_Loader Orchestrates the hooks of the plugin. |
|
| 842 | + */ |
|
| 843 | + public function get_loader() { |
|
| 844 | + return $this->loader; |
|
| 845 | + } |
|
| 846 | + |
|
| 847 | + /** |
|
| 848 | + * Retrieve the version number of the plugin. |
|
| 849 | + * |
|
| 850 | + * @since 1.0.0 |
|
| 851 | + * @return string The version number of the plugin. |
|
| 852 | + */ |
|
| 853 | + public function get_version() { |
|
| 854 | + return $this->version; |
|
| 855 | + } |
|
| 856 | 856 | |
| 857 | 857 | } |
@@ -16,34 +16,34 @@ discard block |
||
| 16 | 16 | |
| 17 | 17 | <?php |
| 18 | 18 | |
| 19 | - // Enqueue wp.media functions. |
|
| 20 | - wp_enqueue_media(); |
|
| 21 | - |
|
| 22 | - // Enqueue styles and scripts. |
|
| 23 | - wp_enqueue_style( 'wl-font-awesome', plugin_dir_url( dirname( dirname( __FILE__ ) ) ) . 'css/font-awesome.min.css' ); |
|
| 24 | - wp_enqueue_style( 'wordlift-admin-setup', plugin_dir_url( dirname( __FILE__ ) ) . 'css/wordlift-admin-setup.css', array( |
|
| 25 | - 'wp-admin', |
|
| 26 | - 'wl-font-awesome', |
|
| 27 | - ) ); |
|
| 28 | - wp_enqueue_script( 'wordlift-admin-setup', plugin_dir_url( dirname( __FILE__ ) ) . 'js/wordlift-admin-setup.js', array( 'jquery' ) ); |
|
| 29 | - |
|
| 30 | - // Set configuration settings. |
|
| 31 | - wp_localize_script( 'wordlift-admin-setup', '_wlAdminSetup', array( |
|
| 32 | - 'ajaxUrl' => parse_url( self_admin_url( 'admin-ajax.php' ), PHP_URL_PATH ), |
|
| 33 | - 'action' => 'wl_validate_key', |
|
| 34 | - 'media' => array( |
|
| 35 | - 'title' => __( 'WordLift Choose Logo', 'wordlift' ), |
|
| 36 | - 'button' => array( 'text' => __( 'Choose Logo', 'wordlift' ) ), |
|
| 37 | - ), |
|
| 38 | - ) ); |
|
| 39 | - |
|
| 40 | - // Finally print styles and scripts. |
|
| 41 | - wp_print_styles(); |
|
| 42 | - wp_print_scripts(); |
|
| 43 | - // do_action( 'admin_print_styles' ); |
|
| 44 | - // do_action( 'admin_print_scripts' ); |
|
| 45 | - |
|
| 46 | - ?> |
|
| 19 | + // Enqueue wp.media functions. |
|
| 20 | + wp_enqueue_media(); |
|
| 21 | + |
|
| 22 | + // Enqueue styles and scripts. |
|
| 23 | + wp_enqueue_style( 'wl-font-awesome', plugin_dir_url( dirname( dirname( __FILE__ ) ) ) . 'css/font-awesome.min.css' ); |
|
| 24 | + wp_enqueue_style( 'wordlift-admin-setup', plugin_dir_url( dirname( __FILE__ ) ) . 'css/wordlift-admin-setup.css', array( |
|
| 25 | + 'wp-admin', |
|
| 26 | + 'wl-font-awesome', |
|
| 27 | + ) ); |
|
| 28 | + wp_enqueue_script( 'wordlift-admin-setup', plugin_dir_url( dirname( __FILE__ ) ) . 'js/wordlift-admin-setup.js', array( 'jquery' ) ); |
|
| 29 | + |
|
| 30 | + // Set configuration settings. |
|
| 31 | + wp_localize_script( 'wordlift-admin-setup', '_wlAdminSetup', array( |
|
| 32 | + 'ajaxUrl' => parse_url( self_admin_url( 'admin-ajax.php' ), PHP_URL_PATH ), |
|
| 33 | + 'action' => 'wl_validate_key', |
|
| 34 | + 'media' => array( |
|
| 35 | + 'title' => __( 'WordLift Choose Logo', 'wordlift' ), |
|
| 36 | + 'button' => array( 'text' => __( 'Choose Logo', 'wordlift' ) ), |
|
| 37 | + ), |
|
| 38 | + ) ); |
|
| 39 | + |
|
| 40 | + // Finally print styles and scripts. |
|
| 41 | + wp_print_styles(); |
|
| 42 | + wp_print_scripts(); |
|
| 43 | + // do_action( 'admin_print_styles' ); |
|
| 44 | + // do_action( 'admin_print_scripts' ); |
|
| 45 | + |
|
| 46 | + ?> |
|
| 47 | 47 | |
| 48 | 48 | <!-- Pane 1 content --> |
| 49 | 49 | <script type="text/html" id="page-0"> |
@@ -133,20 +133,20 @@ discard block |
||
| 133 | 133 | <select id="language" name="language" placeholder="<?php esc_attr_e( 'Choose your language', 'wordlift' ); ?>"> |
| 134 | 134 | <?php |
| 135 | 135 | |
| 136 | - // Get WordLift's supported languages. |
|
| 137 | - $languages = Wordlift_Languages::get_languages(); |
|
| 136 | + // Get WordLift's supported languages. |
|
| 137 | + $languages = Wordlift_Languages::get_languages(); |
|
| 138 | 138 | |
| 139 | - // Get WP's locale. |
|
| 140 | - $locale = get_locale(); |
|
| 139 | + // Get WP's locale. |
|
| 140 | + $locale = get_locale(); |
|
| 141 | 141 | |
| 142 | - // Get the language locale part. |
|
| 143 | - $parts = explode( '_', $locale ); |
|
| 142 | + // Get the language locale part. |
|
| 143 | + $parts = explode( '_', $locale ); |
|
| 144 | 144 | |
| 145 | - // If we support WP's configured language, then use that, otherwise use English by default. |
|
| 146 | - $language = isset( $languages[ $parts[0] ] ) ? $parts[0] : 'en'; |
|
| 145 | + // If we support WP's configured language, then use that, otherwise use English by default. |
|
| 146 | + $language = isset( $languages[ $parts[0] ] ) ? $parts[0] : 'en'; |
|
| 147 | 147 | |
| 148 | - // Print all the supported language, preselecting the one configured in WP (or English if not supported). |
|
| 149 | - foreach ( $languages as $code => $label ) { ?> |
|
| 148 | + // Print all the supported language, preselecting the one configured in WP (or English if not supported). |
|
| 149 | + foreach ( $languages as $code => $label ) { ?> |
|
| 150 | 150 | <option |
| 151 | 151 | value="<?php esc_attr_e( $code ) ?>" <?php echo selected( $code, $language, FALSE ) ?>><?php esc_html_e( $label ) ?></option> |
| 152 | 152 | <?php } ?> |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | <!-- Defining responsive ambient. --> |
| 13 | 13 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 14 | 14 | |
| 15 | - <title><?php esc_html_e( 'WordLift Setup', 'wordlift' ); ?></title> |
|
| 15 | + <title><?php esc_html_e('WordLift Setup', 'wordlift'); ?></title> |
|
| 16 | 16 | |
| 17 | 17 | <?php |
| 18 | 18 | |
@@ -20,22 +20,22 @@ discard block |
||
| 20 | 20 | wp_enqueue_media(); |
| 21 | 21 | |
| 22 | 22 | // Enqueue styles and scripts. |
| 23 | - wp_enqueue_style( 'wl-font-awesome', plugin_dir_url( dirname( dirname( __FILE__ ) ) ) . 'css/font-awesome.min.css' ); |
|
| 24 | - wp_enqueue_style( 'wordlift-admin-setup', plugin_dir_url( dirname( __FILE__ ) ) . 'css/wordlift-admin-setup.css', array( |
|
| 23 | + wp_enqueue_style('wl-font-awesome', plugin_dir_url(dirname(dirname(__FILE__))).'css/font-awesome.min.css'); |
|
| 24 | + wp_enqueue_style('wordlift-admin-setup', plugin_dir_url(dirname(__FILE__)).'css/wordlift-admin-setup.css', array( |
|
| 25 | 25 | 'wp-admin', |
| 26 | 26 | 'wl-font-awesome', |
| 27 | - ) ); |
|
| 28 | - wp_enqueue_script( 'wordlift-admin-setup', plugin_dir_url( dirname( __FILE__ ) ) . 'js/wordlift-admin-setup.js', array( 'jquery' ) ); |
|
| 27 | + )); |
|
| 28 | + wp_enqueue_script('wordlift-admin-setup', plugin_dir_url(dirname(__FILE__)).'js/wordlift-admin-setup.js', array('jquery')); |
|
| 29 | 29 | |
| 30 | 30 | // Set configuration settings. |
| 31 | - wp_localize_script( 'wordlift-admin-setup', '_wlAdminSetup', array( |
|
| 32 | - 'ajaxUrl' => parse_url( self_admin_url( 'admin-ajax.php' ), PHP_URL_PATH ), |
|
| 31 | + wp_localize_script('wordlift-admin-setup', '_wlAdminSetup', array( |
|
| 32 | + 'ajaxUrl' => parse_url(self_admin_url('admin-ajax.php'), PHP_URL_PATH), |
|
| 33 | 33 | 'action' => 'wl_validate_key', |
| 34 | 34 | 'media' => array( |
| 35 | - 'title' => __( 'WordLift Choose Logo', 'wordlift' ), |
|
| 36 | - 'button' => array( 'text' => __( 'Choose Logo', 'wordlift' ) ), |
|
| 35 | + 'title' => __('WordLift Choose Logo', 'wordlift'), |
|
| 36 | + 'button' => array('text' => __('Choose Logo', 'wordlift')), |
|
| 37 | 37 | ), |
| 38 | - ) ); |
|
| 38 | + )); |
|
| 39 | 39 | |
| 40 | 40 | // Finally print styles and scripts. |
| 41 | 41 | wp_print_styles(); |
@@ -47,90 +47,90 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | <!-- Pane 1 content --> |
| 49 | 49 | <script type="text/html" id="page-0"> |
| 50 | - <h2 class="page-title"><?php esc_html_e( 'Welcome', 'wordlift' ); ?></h2> |
|
| 50 | + <h2 class="page-title"><?php esc_html_e('Welcome', 'wordlift'); ?></h2> |
|
| 51 | 51 | <p class="page-txt"> |
| 52 | - <?php esc_html_e( 'Thank you for downloading WordLift. Now you can boost your website with a double-digit growth. WordLift helps you with:', 'wordlift' ); ?> |
|
| 52 | + <?php esc_html_e('Thank you for downloading WordLift. Now you can boost your website with a double-digit growth. WordLift helps you with:', 'wordlift'); ?> |
|
| 53 | 53 | </p> |
| 54 | 54 | <ul class="page-list"> |
| 55 | 55 | <li> |
| 56 | 56 | <span class="fa fa-university"></span> |
| 57 | - <?php esc_html_e( 'Trustworthiness', 'wordlift' ); ?> |
|
| 57 | + <?php esc_html_e('Trustworthiness', 'wordlift'); ?> |
|
| 58 | 58 | </li> |
| 59 | 59 | |
| 60 | 60 | <li> |
| 61 | 61 | <span class="fa fa-map-marker"></span> |
| 62 | - <?php esc_html_e( 'Enrichment', 'wordlift' ); ?> |
|
| 62 | + <?php esc_html_e('Enrichment', 'wordlift'); ?> |
|
| 63 | 63 | </li> |
| 64 | 64 | |
| 65 | 65 | <li> |
| 66 | 66 | <span class="fa fa-heart"></span> |
| 67 | - <?php esc_html_e( 'Engagement', 'wordlift' ); ?> |
|
| 67 | + <?php esc_html_e('Engagement', 'wordlift'); ?> |
|
| 68 | 68 | </li> |
| 69 | 69 | |
| 70 | 70 | <li> |
| 71 | 71 | <span class="fa fa-hand-o-right"></span> |
| 72 | - <?php esc_html_e( 'Smart Navigation', 'wordlift' ); ?> |
|
| 72 | + <?php esc_html_e('Smart Navigation', 'wordlift'); ?> |
|
| 73 | 73 | </li> |
| 74 | 74 | |
| 75 | 75 | <li> |
| 76 | 76 | <span class="fa fa-google"></span> |
| 77 | - <?php esc_html_e( 'SEO Optimization', 'wordlift' ); ?> |
|
| 77 | + <?php esc_html_e('SEO Optimization', 'wordlift'); ?> |
|
| 78 | 78 | </li> |
| 79 | 79 | |
| 80 | 80 | <li> |
| 81 | 81 | <span class="fa fa-group"></span> |
| 82 | - <?php esc_html_e( 'Content Marketing', 'wordlift' ); ?> |
|
| 82 | + <?php esc_html_e('Content Marketing', 'wordlift'); ?> |
|
| 83 | 83 | </li> |
| 84 | 84 | </ul> |
| 85 | 85 | <div class="btn-wrapper"> |
| 86 | 86 | <a href="https://wordlift.io/blogger/?utm_campaign=wl_activation_learn_more" target="_tab" |
| 87 | - class="button"><?php esc_html_e( 'Learn More', 'wordlift' ); ?></a> |
|
| 87 | + class="button"><?php esc_html_e('Learn More', 'wordlift'); ?></a> |
|
| 88 | 88 | <input type="button" data-wl-next="wl-next" class="wl-default-action" |
| 89 | - value="<?php esc_attr_e( 'Next', 'wordlift' ); ?>"> |
|
| 89 | + value="<?php esc_attr_e('Next', 'wordlift'); ?>"> |
|
| 90 | 90 | </div> |
| 91 | 91 | </script> |
| 92 | 92 | |
| 93 | 93 | <!-- Pane 2 content --> |
| 94 | 94 | <script type="text/html" id="page-1"> |
| 95 | - <h2 class="page-title"><?php esc_html_e( 'License Key', 'wordlift' ); ?></h2> |
|
| 95 | + <h2 class="page-title"><?php esc_html_e('License Key', 'wordlift'); ?></h2> |
|
| 96 | 96 | <p class="page-txt"> |
| 97 | - <?php esc_html_e( 'If you already puchased a plan, check your email, get the activation key from your inbox and insert it in the field below. Otherwise ....', 'wordlift' ); ?> |
|
| 97 | + <?php esc_html_e('If you already puchased a plan, check your email, get the activation key from your inbox and insert it in the field below. Otherwise ....', 'wordlift'); ?> |
|
| 98 | 98 | </p> |
| 99 | 99 | <input type="text" data-wl-key="wl-key" class="invalid untouched" id="key" name="key" value="" |
| 100 | 100 | autocomplete="off" placeholder="Activation Key"> |
| 101 | 101 | <div class="btn-wrapper"> |
| 102 | 102 | <a |
| 103 | 103 | href="https://wordlift.io/?utm_campaign=wl_activation_grab_the_key#plan-and-price" target="_tab" |
| 104 | - class="button"><?php esc_html_e( 'Grab a Key!', 'wordlift' ); ?></a><input |
|
| 104 | + class="button"><?php esc_html_e('Grab a Key!', 'wordlift'); ?></a><input |
|
| 105 | 105 | type="button" data-wl-next="wl-next" class="wl-default-action" |
| 106 | - value="<?php esc_attr_e( 'Next', 'wordlift' ); ?>"> |
|
| 106 | + value="<?php esc_attr_e('Next', 'wordlift'); ?>"> |
|
| 107 | 107 | </div> |
| 108 | 108 | </script> |
| 109 | 109 | |
| 110 | 110 | <!-- Pane 3 content --> |
| 111 | 111 | <script type="text/html" id="page-2"> |
| 112 | - <h2 class="page-title"><?php esc_html_e( 'Vocabulary', 'wordlift' ); ?></h2> |
|
| 112 | + <h2 class="page-title"><?php esc_html_e('Vocabulary', 'wordlift'); ?></h2> |
|
| 113 | 113 | <p class="page-txt"> |
| 114 | - <?php esc_html_e( 'All new pages created with WordLift, will be stored inside your internal vocabulary. You can customize the url pattern of these pages in the field below. Check our FAQs if you need more info.', 'wordlift' ); ?> |
|
| 114 | + <?php esc_html_e('All new pages created with WordLift, will be stored inside your internal vocabulary. You can customize the url pattern of these pages in the field below. Check our FAQs if you need more info.', 'wordlift'); ?> |
|
| 115 | 115 | </p> |
| 116 | 116 | <input type="text" id="vocabulary" name="vocabulary" autocomplete="off" value="vocabulary" |
| 117 | 117 | class="valid untouched" data-wl-vocabulary="wl-vocabulary"> |
| 118 | 118 | <p class="page-det"> |
| 119 | - <?php esc_html_e( 'Leave it empty to place your entities in the root folder of your website', 'wordlift' ); ?> |
|
| 119 | + <?php esc_html_e('Leave it empty to place your entities in the root folder of your website', 'wordlift'); ?> |
|
| 120 | 120 | </p> |
| 121 | 121 | <div class="btn-wrapper"> |
| 122 | 122 | <input type="button" data-wl-next="wl-next" class="wl-default-action" |
| 123 | - value="<?php esc_attr_e( 'Next', 'wordlift' ); ?>"> |
|
| 123 | + value="<?php esc_attr_e('Next', 'wordlift'); ?>"> |
|
| 124 | 124 | </div> |
| 125 | 125 | </script> |
| 126 | 126 | |
| 127 | 127 | <!-- Pane 4 content --> |
| 128 | 128 | <script type="text/html" id="page-3"> |
| 129 | - <h2 class="page-title"><?php esc_html_e( 'Language', 'wordlift' ); ?></h2> |
|
| 129 | + <h2 class="page-title"><?php esc_html_e('Language', 'wordlift'); ?></h2> |
|
| 130 | 130 | <p class="page-txt"> |
| 131 | - <?php esc_html_e( 'Each WordLift key can be used only in one language. Pick yours.', 'wordlift' ); ?> |
|
| 131 | + <?php esc_html_e('Each WordLift key can be used only in one language. Pick yours.', 'wordlift'); ?> |
|
| 132 | 132 | </p> |
| 133 | - <select id="language" name="language" placeholder="<?php esc_attr_e( 'Choose your language', 'wordlift' ); ?>"> |
|
| 133 | + <select id="language" name="language" placeholder="<?php esc_attr_e('Choose your language', 'wordlift'); ?>"> |
|
| 134 | 134 | <?php |
| 135 | 135 | |
| 136 | 136 | // Get WordLift's supported languages. |
@@ -140,45 +140,45 @@ discard block |
||
| 140 | 140 | $locale = get_locale(); |
| 141 | 141 | |
| 142 | 142 | // Get the language locale part. |
| 143 | - $parts = explode( '_', $locale ); |
|
| 143 | + $parts = explode('_', $locale); |
|
| 144 | 144 | |
| 145 | 145 | // If we support WP's configured language, then use that, otherwise use English by default. |
| 146 | - $language = isset( $languages[ $parts[0] ] ) ? $parts[0] : 'en'; |
|
| 146 | + $language = isset($languages[$parts[0]]) ? $parts[0] : 'en'; |
|
| 147 | 147 | |
| 148 | 148 | // Print all the supported language, preselecting the one configured in WP (or English if not supported). |
| 149 | - foreach ( $languages as $code => $label ) { ?> |
|
| 149 | + foreach ($languages as $code => $label) { ?> |
|
| 150 | 150 | <option |
| 151 | - value="<?php esc_attr_e( $code ) ?>" <?php echo selected( $code, $language, FALSE ) ?>><?php esc_html_e( $label ) ?></option> |
|
| 151 | + value="<?php esc_attr_e($code) ?>" <?php echo selected($code, $language, FALSE) ?>><?php esc_html_e($label) ?></option> |
|
| 152 | 152 | <?php } ?> |
| 153 | 153 | </select> |
| 154 | 154 | |
| 155 | 155 | <div class="btn-wrapper"> |
| 156 | 156 | <input type="button" data-wl-next="wl-next" class="wl-default-action" |
| 157 | - value="<?php esc_attr_e( 'Next', 'wordlift' ); ?>"> |
|
| 157 | + value="<?php esc_attr_e('Next', 'wordlift'); ?>"> |
|
| 158 | 158 | </div> |
| 159 | 159 | </script> |
| 160 | 160 | |
| 161 | 161 | <!-- Pane 5 content --> |
| 162 | 162 | <script type="text/html" id="page-4"> |
| 163 | - <h2 class="page-title"><?php esc_html_e( 'Publisher', 'wordlift' ); ?></h2> |
|
| 163 | + <h2 class="page-title"><?php esc_html_e('Publisher', 'wordlift'); ?></h2> |
|
| 164 | 164 | <p class="page-txt"> |
| 165 | - <?php esc_html_e( 'Are you going to publish as an individual or as a company?', 'wordlift' ); ?> |
|
| 165 | + <?php esc_html_e('Are you going to publish as an individual or as a company?', 'wordlift'); ?> |
|
| 166 | 166 | </p> |
| 167 | 167 | <div class="radio-wrapper"> |
| 168 | 168 | <label for="personal"> |
| 169 | 169 | <input id="personal" type="radio" name="user_type" value="person" checked> |
| 170 | 170 | <span class="radio"><span class="check"></span></span> |
| 171 | - <span class="label"><?php esc_html_e( 'Personal', 'wordlift' ); ?></span> |
|
| 171 | + <span class="label"><?php esc_html_e('Personal', 'wordlift'); ?></span> |
|
| 172 | 172 | </label> |
| 173 | 173 | <label for="company"> |
| 174 | 174 | <input id="company" type="radio" name="user_type" value="organization"> |
| 175 | 175 | <span class="radio"><span class="check"></span></span> |
| 176 | - <span class="label"><?php esc_html_e( 'Company', 'wordlift' ); ?></span> |
|
| 176 | + <span class="label"><?php esc_html_e('Company', 'wordlift'); ?></span> |
|
| 177 | 177 | </label> |
| 178 | 178 | </div> |
| 179 | 179 | <input type="text" id="name" name="name" data-wl-name="wl-name" value="" autocomplete="off" |
| 180 | 180 | class="untouched invalid" |
| 181 | - placeholder="<?php esc_attr_e( "What's your name?", 'wordlift' ); ?>"> |
|
| 181 | + placeholder="<?php esc_attr_e("What's your name?", 'wordlift'); ?>"> |
|
| 182 | 182 | |
| 183 | 183 | <div data-wl-logo="wl-logo"> |
| 184 | 184 | <input type="hidden" name="logo"/> |
@@ -186,12 +186,12 @@ discard block |
||
| 186 | 186 | <a data-wl-remove-logo="wl-remove-logo" href="javascript:void(0);" class="fa fa-times"></a> |
| 187 | 187 | </div> |
| 188 | 188 | <a data-wl-add-logo="wl-add-logo" class="add-logo" href="javascript:void(0);"> |
| 189 | - <?php esc_html_e( 'Add your logo', 'wordlift' ); ?> |
|
| 189 | + <?php esc_html_e('Add your logo', 'wordlift'); ?> |
|
| 190 | 190 | </a> |
| 191 | 191 | </div> |
| 192 | 192 | <div class="btn-wrapper"> |
| 193 | 193 | <input type="submit" id="btn-finish" class="wl-default-action" |
| 194 | - value="<?php esc_attr_e( 'Finish', 'wordlift' ); ?>"> |
|
| 194 | + value="<?php esc_attr_e('Finish', 'wordlift'); ?>"> |
|
| 195 | 195 | </div> |
| 196 | 196 | </script> |
| 197 | 197 | |
@@ -200,23 +200,23 @@ discard block |
||
| 200 | 200 | |
| 201 | 201 | <div class="wl-container"> |
| 202 | 202 | |
| 203 | - <a href="<?php echo esc_url( admin_url() ); ?> " class="fa fa-times wl-close"></a> |
|
| 203 | + <a href="<?php echo esc_url(admin_url()); ?> " class="fa fa-times wl-close"></a> |
|
| 204 | 204 | |
| 205 | 205 | <header> |
| 206 | 206 | <h1><strong>Word</strong>Lift</h1> |
| 207 | - <img src="<?php echo plugin_dir_url( dirname( dirname( __FILE__ ) ) ) . 'images/shapes.png'; ?>"/> |
|
| 207 | + <img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__))).'images/shapes.png'; ?>"/> |
|
| 208 | 208 | </header> |
| 209 | 209 | |
| 210 | 210 | |
| 211 | 211 | <form method="post"> |
| 212 | - <?php wp_nonce_field( 'wl-save-configuration' ); ?> |
|
| 212 | + <?php wp_nonce_field('wl-save-configuration'); ?> |
|
| 213 | 213 | <input type="hidden" name="action" value="wl-save-configuration"/> |
| 214 | 214 | <div class="viewport"></div> |
| 215 | 215 | </form> |
| 216 | 216 | |
| 217 | 217 | </div> |
| 218 | 218 | |
| 219 | -<?php do_action( 'admin_footer' ); ?> |
|
| 219 | +<?php do_action('admin_footer'); ?> |
|
| 220 | 220 | |
| 221 | 221 | </body> |
| 222 | 222 | </html> |
| 223 | 223 | \ No newline at end of file |