PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.8
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.8
4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 All 139 releases
← All changes | inc/jwt/rest-api/version1/class-lp-rest-posts-controller.php +14 -14 4.1.7 → 4.4.8 View file →
@@ -10,9 +10,9 @@
10 10
11 11 protected $hierarchical = false;
12 12
13 13 protected function get_object( $id ) {
14 - return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass.", 'learnpress' ), __METHOD__ ), array( 'status' => 405 ) );
14 + return new WP_Error( 'invalid-method', sprintf( __( "The method '%s' not implemented. It must be overridden in the subclass.", 'learnpress' ), __METHOD__ ), array( 'status' => 405 ) );
15 15 }
16 16
17 17 public function get_items_permissions_check( $request ) {
18 18 if ( ! lp_rest_check_post_permissions( $this->post_type, 'read' ) ) {
@@ -206,9 +206,9 @@
206 206 if ( isset( $request['id'] ) ) {
207 207 $existing_post = get_post( $id );
208 208
209 209 if ( empty( $existing_post ) || empty( $existing_post->ID ) || $this->post_type !== $existing_post->post_type ) {
210 - return new WP_Error( 'rest_invalid_course', __( 'Invalid Course' ), array( 'status' => 404 ) );
210 + return new WP_Error( 'rest_invalid_course', __( 'Invalid Course', 'learnpress' ), array( 'status' => 404 ) );
211 211 }
212 212
213 213 $prepared_post->ID = $existing_post->ID;
214 214 $current_status = $existing_post->post_status;
@@ -471,9 +471,9 @@
471 471 return true;
472 472 }
473 473
474 474 protected function prepare_object_for_response( $object, $request ) {
475 - return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass.", 'learnpress' ), __METHOD__ ), array( 'status' => 405 ) );
475 + return new WP_Error( 'invalid-method', sprintf( __( "The method '%s' not implemented. It must be overridden in the subclass.", 'learnpress' ), __METHOD__ ), array( 'status' => 405 ) );
476 476 }
477 477
478 478 protected function prepare_items_query( $prepared_args = array(), $request = null ) {
479 479 $query_args = array();
@@ -502,9 +502,9 @@
502 502 $params['context'] = $this->get_context_param();
503 503 $params['context']['default'] = 'view';
504 504
505 505 $params['page'] = array(
506 - 'description' => __( 'Current page of the collection.', 'learnpress' ),
506 + 'description' => __( 'The current page of the collection.', 'learnpress' ),
507 507 'type' => 'integer',
508 508 'default' => 1,
509 509 'sanitize_callback' => 'absint',
510 510 'validate_callback' => 'rest_validate_request_arg',
@@ -510,9 +510,9 @@
510 510 'validate_callback' => 'rest_validate_request_arg',
511 511 'minimum' => 1,
512 512 );
513 513 $params['per_page'] = array(
514 - 'description' => __( 'Maximum number of items to be returned in result set.', 'learnpress' ),
514 + 'description' => __( 'The maximum number of items to be returned in the result set.', 'learnpress' ),
515 515 'type' => 'integer',
516 516 'default' => 10,
517 517 'minimum' => 1,
518 518 'maximum' => 100,
@@ -537,9 +537,9 @@
537 537 'format' => 'date-time',
538 538 'validate_callback' => 'rest_validate_request_arg',
539 539 );
540 540 $params['exclude'] = array(
541 - 'description' => __( 'Ensure result set excludes specific IDs.', 'learnpress' ),
541 + 'description' => __( 'Ensure the result set excludes specific IDs.', 'learnpress' ),
542 542 'type' => 'array',
543 543 'items' => array(
544 544 'type' => 'integer',
545 545 ),
@@ -546,9 +546,9 @@
546 546 'default' => array(),
547 547 'sanitize_callback' => 'wp_parse_id_list',
548 548 );
549 549 $params['include'] = array(
550 - 'description' => __( 'Limit result set to specific ids.', 'learnpress' ),
550 + 'description' => __( 'Limit the result set to specific IDs.', 'learnpress' ),
551 551 'type' => 'array',
552 552 'items' => array(
553 553 'type' => 'integer',
554 554 ),
@@ -561,9 +561,9 @@
561 561 'sanitize_callback' => 'absint',
562 562 'validate_callback' => 'rest_validate_request_arg',
563 563 );
564 564 $params['order'] = array(
565 - 'description' => __( 'Order sort attribute ascending or descending.', 'learnpress' ),
565 + 'description' => __( 'Sorting attributes in ascending or descending order.', 'learnpress' ),
566 566 'type' => 'string',
567 567 'default' => 'desc',
568 568 'enum' => array( 'asc', 'desc' ),
569 569 'validate_callback' => 'rest_validate_request_arg',
@@ -568,9 +568,9 @@
568 568 'enum' => array( 'asc', 'desc' ),
569 569 'validate_callback' => 'rest_validate_request_arg',
570 570 );
571 571 $params['orderby'] = array(
572 - 'description' => __( 'Sort collection by object attribute.', 'learnpress' ),
572 + 'description' => __( 'Sort collections by the object attribute.', 'learnpress' ),
573 573 'type' => 'string',
574 574 'default' => 'date',
575 575 'enum' => array(
576 576 'date',
@@ -582,9 +582,9 @@
582 582 ),
583 583 'validate_callback' => 'rest_validate_request_arg',
584 584 );
585 585 $params['author'] = array(
586 - 'description' => __( 'Limit result set to posts assigned to specific authors.', 'learnpress' ),
586 + 'description' => __( 'Limit the result set to posts assigned to specific authors.', 'learnpress' ),
587 587 'type' => 'array',
588 588 'items' => array(
589 589 'type' => 'integer',
590 590 ),
@@ -590,9 +590,9 @@
590 590 ),
591 591 'default' => array(),
592 592 );
593 593 $params['author_exclude'] = array(
594 - 'description' => __( 'Ensure result set excludes posts assigned to specific authors.', 'learnpress' ),
594 + 'description' => __( 'Ensure the result set excludes posts assigned to specific authors.', 'learnpress' ),
595 595 'type' => 'array',
596 596 'items' => array(
597 597 'type' => 'integer',
598 598 ),
@@ -598,9 +598,9 @@
598 598 ),
599 599 'default' => array(),
600 600 );
601 601 $params['user'] = array(
602 - 'description' => __( 'Limit result set to posts assigned to specific authors.', 'learnpress' ),
602 + 'description' => __( 'Limit the result set to posts assigned to specific authors.', 'learnpress' ),
603 603 'type' => 'array',
604 604 'items' => array(
605 605 'type' => 'integer',
606 606 ),
@@ -614,9 +614,9 @@
614 614 );
615 615
616 616 if ( $this->hierarchical ) {
617 617 $params['parent'] = array(
618 - 'description' => __( 'Limit result set to those of particular parent IDs.', 'learnpress' ),
618 + 'description' => __( 'Limit the result set to those of particular parent IDs.', 'learnpress' ),
619 619 'type' => 'array',
620 620 'items' => array(
621 621 'type' => 'integer',
622 622 ),
@@ -623,9 +623,9 @@
623 623 'sanitize_callback' => 'wp_parse_id_list',
624 624 'default' => array(),
625 625 );
626 626 $params['parent_exclude'] = array(
627 - 'description' => __( 'Limit result set to all items except those of a particular parent ID.', 'learnpress' ),
627 + 'description' => __( 'Limit the result set to all items except those of a particular parent ID.', 'learnpress' ),
628 628 'type' => 'array',
629 629 'items' => array(
630 630 'type' => 'integer',
631 631 ),