[ Index ]

PHP Cross Reference of GlotPress




/gp-includes/things/ -> original.php (summary)

Things: GP_Original class

File Size: 588 lines (18 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

GP_Original:: (15 methods):

Class: GP_Original  - X-Ref

Core class used to implement the originals.

restrict_fields( $rules )   X-Ref
Sets restriction rules for fields.

since: 1.0.0
param: GP_Validation_Rules $rules The validation rules instance.

normalize_fields( $args )   X-Ref
Normalizes an array with key-value pairs representing
a GP_Original object.

since: 1.0.0
return: array Normalized arguments for a GP_Original object.
param: array $args Arguments for a GP_Original object.

by_project_id( $project_id )   X-Ref
No description

count_by_project_id( $project_id, $type = 'total' )   X-Ref
Retrieves the number of originals for a project.

since: 1.0.0
since: 2.1.0 Added the `$type` parameter.
return: object|int Object when `$type` is 'all', non-negative integer in all other cases.
param: int    $project_id The ID of a project.
param: string $type       The return type. 'total' for public and hidden counts, 'hidden'

by_project_id_and_entry( $project_id, $entry, $status = null )   X-Ref
No description

import_for_project( $project, $translations )   X-Ref
No description

set_translations_for_original_to_fuzzy( $original_id )   X-Ref
No description

is_different_from( $data, $original = null )   X-Ref
No description

priority_by_name( $name )   X-Ref
No description

closest_original( $input, $other_strings )   X-Ref
No description

get_matching_originals_in_other_projects()   X-Ref
No description

delete()   X-Ref
Deletes an original and all of its translations.

since: 3.0.0
return: bool

after_create()   X-Ref
Executes after creating an original.

since: 1.0.0
return: bool

after_save( $original_before )   X-Ref
Executes after saving an original.

since: 2.0.0
since: 3.0.0 Added the `$original_before` parameter.
return: bool
param: GP_Original $original_before Original before the update.

after_delete()   X-Ref
Executes after deleting an original.

since: 2.0.0
return: bool

Generated: Tue May 28 01:01:19 2024 Cross-referenced by PHPXref 0.7.1