Changeset 1687406
- Timestamp:
- 06/29/2017 01:29:40 AM (9 years ago)
- Location:
- wpapper/trunk
- Files:
-
- 6 edited
-
lib/common/template.inc.php (modified) (3 diffs)
-
lib/common/util.inc.php (modified) (1 diff)
-
lib/json/class-wp-json-customposttype.php (modified) (3 diffs)
-
lib/json/class-wp-json-media.php (modified) (3 diffs)
-
lib/json/class-wp-json-pages.php (modified) (1 diff)
-
wpapper.class.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wpapper/trunk/lib/common/template.inc.php
r1684956 r1687406 197 197 * @return void 198 198 */ 199 function Template($root = ".", $unknowns = "remove") {199 function __construc($root = ".", $unknowns = "remove") { 200 200 if ($this->debug & 4) { 201 201 echo "<p><b>Template:</b> root = $root, unknowns = $unknowns</p>\n"; … … 205 205 } 206 206 207 function Template($root = ".", $unknowns = "remove") { 208 self::__construc($root, $unknowns); 209 } 207 210 208 211 /****************************************************************************** … … 221 224 */ 222 225 function set_root($root) { 223 if(preg_match('/ $', $root)) {226 if(preg_match('/\/$/', $root)) { 224 227 $root = substr($root, 0, -1); 225 228 } -
wpapper/trunk/lib/common/util.inc.php
r1685328 r1687406 337 337 */ 338 338 function wpapper_get_image_avatar_by_id_or_email($id_or_email){ 339 $img_file_prix = wp_upload_dir().'/'; 340 $myavatar_prix = wp_upload_dir().'/'; 339 $upload_dir = wp_upload_dir(); 340 $img_file_prix = $upload_dir['basedir'].'/'; 341 $myavatar_prix = $upload_dir['basedir'].'/'; 341 342 $mymd5 = wpapper_sign64($id_or_email); 342 343 if ( ! file_exists($img_file_prix.$mymd5.'.jpg')){ -
wpapper/trunk/lib/json/class-wp-json-customposttype.php
r1683889 r1687406 107 107 * @see WP_JSON_Posts::get_posts() 108 108 */ 109 public function get_posts( $filter = array(), $context = 'view', $type = null, $page = 1 ) {109 public function get_posts( $filter = array(), $context = 'view', $type = null, $page = 1, $offline=false ) { 110 110 if ( ! empty( $type ) && $type !== $this->type ) { 111 111 wpapper_json_error(BigAppErr::$post['code'],BigAppErr::$post['msg'],""); … … 120 120 * @see WP_JSON_Posts::get_post() 121 121 */ 122 public function get_post( $id, $context = 'view' ) {122 public function get_post( $id, $context = 'view', $is_featured_image=false ) { 123 123 $id = (int) $id; 124 124 … … 189 189 * @return array The prepared post data 190 190 */ 191 protected function prepare_post( $post, $context = 'view' ) {191 protected function prepare_post( $post, $context = 'view', $show_type= 'row' ) { 192 192 $_post = parent::prepare_post( $post, $context ); 193 193 if ( is_wp_error( $_post ) ) { -
wpapper/trunk/lib/json/class-wp-json-media.php
r1683889 r1687406 31 31 * @see WP_JSON_Posts::get_posts() 32 32 */ 33 public function get_posts( $filter = array(), $context = 'view', $type = 'attachment', $page = 1 ) {33 public function get_posts( $filter = array(), $context = 'view', $type = 'attachment', $page = 1, $offline=false ) { 34 34 if ( $type !== 'attachment' ) { 35 35 wpapper_json_error(BigAppErr::$post['code'],BigAppErr::$post['msg'],""); … … 66 66 * @see WP_JSON_Posts::get_post() 67 67 */ 68 public function get_post( $id, $context = 'view' ) {68 public function get_post( $id, $context = 'view', $is_featured_image=false ) { 69 69 $id = (int) $id; 70 70 … … 88 88 * @return array 89 89 */ 90 protected function prepare_post( $post, $context = 'single' ) {90 protected function prepare_post( $post, $context = 'single', $show_type= 'row' ) { 91 91 $data = parent::prepare_post( $post, $context ); 92 92 -
wpapper/trunk/lib/json/class-wp-json-pages.php
r1683889 r1687406 119 119 * @return array The prepared post data 120 120 */ 121 protected function prepare_post( $post, $context = 'view' ) {121 protected function prepare_post( $post, $context = 'view', $show_type= 'row' ) { 122 122 $_post = parent::prepare_post( $post, $context ); 123 123 -
wpapper/trunk/wpapper.class.php
r1684731 r1687406 497 497 $myavatar = wpapper_get_image_avatar_by_id_or_email($id_or_email); 498 498 $avatar = sprintf( 499 "<img alt='%s' src='%s' class='%s' height='%d' width='%d' %s/>",500 esc_attr( $args['alt'] ),499 "<img src='%s' class='%s' height='%d' width='%d' />", 500 //esc_attr( $args['alt'] ), 501 501 esc_url( $myavatar), 502 502 "class", 503 50,50 ,504 $args['extra_attr']503 50,50 504 //$args['extra_attr'] 505 505 ); 506 506 return apply_filters('bigapp_get_avatar_filter', $avatar, $id_or_email, $size, $default, $alt);
Note: See TracChangeset
for help on using the changeset viewer.