Changeset 1958327
- Timestamp:
- 10/17/2018 09:02:35 PM (7 years ago)
- Location:
- offsprout-template-sites
- Files:
-
- 3 edited
- 5 copied
-
tags/1.0.1 (copied) (copied from offsprout-template-sites/trunk)
-
tags/1.0.1/class-offsprout-template-site-api.php (copied) (copied from offsprout-template-sites/trunk/class-offsprout-template-site-api.php) (4 diffs)
-
tags/1.0.1/index.php (copied) (copied from offsprout-template-sites/trunk/index.php)
-
tags/1.0.1/offsprout-template-site.php (copied) (copied from offsprout-template-sites/trunk/offsprout-template-site.php) (1 diff)
-
tags/1.0.1/readme.txt (copied) (copied from offsprout-template-sites/trunk/readme.txt) (2 diffs)
-
trunk/class-offsprout-template-site-api.php (modified) (4 diffs)
-
trunk/offsprout-template-site.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
offsprout-template-sites/tags/1.0.1/class-offsprout-template-site-api.php
r1839514 r1958327 9 9 register_rest_route( $namespace . $version, '/templates', array( 10 10 array( 11 'methods' => WP_REST_Server::READABLE,11 'methods' => 'GET,POST,PUT', 12 12 'callback' => array( $this, 'get_templates' ), 13 13 'permission_callback' => array( $this, 'get_template_permissions_check' ) … … 17 17 register_rest_route( $namespace . $version, '/page_templates', array( 18 18 array( 19 'methods' => WP_REST_Server::READABLE,19 'methods' => 'GET,POST,PUT', 20 20 'callback' => array( $this, 'get_page_templates' ), 21 21 'permission_callback' => array( $this, 'get_template_permissions_check' ) … … 48 48 */ 49 49 public function get_templates( $request ){ 50 //$json_payload = $request->get_json_params();50 $json_payload = $request->get_json_params(); 51 51 52 //For now, let's just get all (or most) of the template posts 52 $number = isset( $json_payload['number'] ) ? (int) $json_payload['number'] : 1000; 53 $offset = isset( $json_payload['offset'] ) ? (int) $json_payload['offset'] : 0; 54 53 55 $return = get_posts( array( 54 56 'post_type' => 'ocb_template', 55 'numberposts' => 1000 57 'numberposts' => $number, 58 'offset' => $offset 56 59 ) ); 57 60 … … 102 105 */ 103 106 public function get_page_templates( $request ){ 104 //$json_payload = $request->get_json_params(); 107 $json_payload = $request->get_json_params(); 108 109 $number = isset( $json_payload['number'] ) ? (int) $json_payload['number'] : 1000; 110 $offset = isset( $json_payload['offset'] ) ? (int) $json_payload['offset'] : 0; 105 111 106 112 $return = get_posts( array( 107 113 'post_type' => 'ocb_tree_template', 108 'numberposts' => 1000 114 'numberposts' => $number, 115 'offset' => $offset 109 116 ) ); 110 117 -
offsprout-template-sites/tags/1.0.1/offsprout-template-site.php
r1839514 r1958327 5 5 Plugin URI: https://offsprout.com 6 6 Description: Gives you the ability to store all of your Offsprout page, section, and module templates in a single site and then use them on any Offsprout-powered site. 7 Version: 1.0 7 Version: 1.0.1 8 8 Author: Offsprout 9 9 License: GPL -
offsprout-template-sites/tags/1.0.1/readme.txt
r1839514 r1958327 4 4 Donate link: https://offsprout.com 5 5 Requires at least: 4.4 6 Tested up to: 4.9. 46 Tested up to: 4.9.8 7 7 Requires PHP: 5.2.4 8 8 Stable tag: trunk … … 47 47 == Changelog == 48 48 49 = 1.0.1 = 50 * Accept number and offset arguments 51 49 52 = 1.0 = 50 53 * Initial release -
offsprout-template-sites/trunk/class-offsprout-template-site-api.php
r1839514 r1958327 9 9 register_rest_route( $namespace . $version, '/templates', array( 10 10 array( 11 'methods' => WP_REST_Server::READABLE,11 'methods' => 'GET,POST,PUT', 12 12 'callback' => array( $this, 'get_templates' ), 13 13 'permission_callback' => array( $this, 'get_template_permissions_check' ) … … 17 17 register_rest_route( $namespace . $version, '/page_templates', array( 18 18 array( 19 'methods' => WP_REST_Server::READABLE,19 'methods' => 'GET,POST,PUT', 20 20 'callback' => array( $this, 'get_page_templates' ), 21 21 'permission_callback' => array( $this, 'get_template_permissions_check' ) … … 48 48 */ 49 49 public function get_templates( $request ){ 50 //$json_payload = $request->get_json_params();50 $json_payload = $request->get_json_params(); 51 51 52 //For now, let's just get all (or most) of the template posts 52 $number = isset( $json_payload['number'] ) ? (int) $json_payload['number'] : 1000; 53 $offset = isset( $json_payload['offset'] ) ? (int) $json_payload['offset'] : 0; 54 53 55 $return = get_posts( array( 54 56 'post_type' => 'ocb_template', 55 'numberposts' => 1000 57 'numberposts' => $number, 58 'offset' => $offset 56 59 ) ); 57 60 … … 102 105 */ 103 106 public function get_page_templates( $request ){ 104 //$json_payload = $request->get_json_params(); 107 $json_payload = $request->get_json_params(); 108 109 $number = isset( $json_payload['number'] ) ? (int) $json_payload['number'] : 1000; 110 $offset = isset( $json_payload['offset'] ) ? (int) $json_payload['offset'] : 0; 105 111 106 112 $return = get_posts( array( 107 113 'post_type' => 'ocb_tree_template', 108 'numberposts' => 1000 114 'numberposts' => $number, 115 'offset' => $offset 109 116 ) ); 110 117 -
offsprout-template-sites/trunk/offsprout-template-site.php
r1839514 r1958327 5 5 Plugin URI: https://offsprout.com 6 6 Description: Gives you the ability to store all of your Offsprout page, section, and module templates in a single site and then use them on any Offsprout-powered site. 7 Version: 1.0 7 Version: 1.0.1 8 8 Author: Offsprout 9 9 License: GPL -
offsprout-template-sites/trunk/readme.txt
r1839514 r1958327 4 4 Donate link: https://offsprout.com 5 5 Requires at least: 4.4 6 Tested up to: 4.9. 46 Tested up to: 4.9.8 7 7 Requires PHP: 5.2.4 8 8 Stable tag: trunk … … 47 47 == Changelog == 48 48 49 = 1.0.1 = 50 * Accept number and offset arguments 51 49 52 = 1.0 = 50 53 * Initial release
Note: See TracChangeset
for help on using the changeset viewer.