File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 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 */
2423class 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 ();
You can’t perform that action at this time.
0 commit comments