Skip to content

Commit aff39d4

Browse files
committed
Remove descriptions of numeric scopes
1 parent 4b0a792 commit aff39d4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

php/class-snippet.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@
1111
* @property string $desc The formatted description
1212
* @property string $code The executable code
1313
* @property array $tags An array of the tags
14-
* @property int $scope The scope number
14+
* @property string $scope The scope name
1515
* @property int $priority Execution priority
1616
* @property bool $active The active status
1717
* @property bool $network true if is multisite-wide snippet, false if site-wide
1818
* @property bool $shared_network Whether the snippet is a shared network snippet
1919
*
2020
* @property-read array $tags_list The tags in string list format
21-
* @property-read string $scope_name The name of the scope
2221
* @property-read string $scope_icon The dashicon used to represent the current scope
2322
*/
2423
class Code_Snippet {
@@ -224,11 +223,11 @@ private function prepare_code( $code ) {
224223
}
225224

226225
/**
227-
* Prepare the scope by ensuring that it is a valid number
226+
* Prepare the scope by ensuring that it is a valid choice
228227
*
229-
* @param int $scope The field as provided
228+
* @param int|string $scope The field as provided
230229
*
231-
* @return int The field in the correct format
230+
* @return string The field in the correct format
232231
*/
233232
private function prepare_scope( $scope ) {
234233
$scopes = self::get_all_scopes();

0 commit comments

Comments
 (0)