Changeset 1525870
- Timestamp:
- 11/01/2016 11:00:24 AM (9 years ago)
- Location:
- thecartpress-frontend/trunk
- Files:
-
- 2 added
- 3 edited
-
FrontEnd.class.php (modified) (7 diffs)
-
admin/OrdersList.class.php (modified) (1 diff)
-
languages/tcp-fe-it_IT.mo (added)
-
languages/tcp-fe-it_IT.po (added)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
thecartpress-frontend/trunk/FrontEnd.class.php
r1261070 r1525870 4 4 Plugin URI: http://wordpress.org/extend/plugins/thecartpress-frontend/ 5 5 Description: Allows to set some admin panels in the front end 6 Version: 1. 56 Version: 1.6 7 7 Author: TheCartPress team 8 8 Author URI: http://thecartpress.com … … 28 28 */ 29 29 30 // Exit if accessed directly 31 if ( !defined( 'ABSPATH' ) ) exit; 32 33 if ( !class_exists( 'TCPFrontEnd' ) ) : 34 30 35 class TCPFrontEnd { 31 36 32 37 function __construct() { 33 add_action( 'tcp_init' , array( $this, 'init' ) ); 34 add_action( 'tcp_admin_init' , array( $this, 'admin_init' ) ); 35 add_action( 'tcp_author_profile_bottom' , array( $this, 'tcp_author_profile_bottom' ) ); 38 39 add_action( 'tcp_init' , array( $this, 'init' ) ); 40 add_action( 'tcp_admin_init' , array( $this, 'admin_init' ) ); 41 add_action( 'tcp_author_profile_bottom' , array( $this, 'tcp_author_profile_bottom' ) ); 36 42 37 43 add_filter( 'body_class' , array( $this, 'body_classes' ) ); … … 201 207 */ 202 208 function tcp_check_the_plugin( $warnings ) { 203 $page_id = get_option( 'tcp_my_account_page_id' );204 if ( ! $page_id || ! get_page( $page_id ) ) {205 $warnings[] = __( '<strong>My Account page</strong> has been deleted.', 'tcp-fe' );206 }209 //$page_id = get_option( 'tcp_my_account_page_id' ); 210 //if ( ! $page_id || ! get_page( $page_id ) ) { 211 // $warnings[] = __( '<strong>My Account page</strong> has been deleted.', 'tcp-fe' ); 212 //} 207 213 208 214 // if my addresses page exists … … 317 323 318 324 function body_classes( $classes ) { 325 319 326 if ( $this->is_page( get_option( 'tcp_my_account_page_id' ) ) ) { 320 327 $classes[] = 'tcp-store'; 321 328 $classes[] = 'tcp-my-account-page'; 329 322 330 } elseif ( $this->is_page( get_option( 'tcp_addresses_list_page_id' ) ) ) { 323 331 $classes[] = 'tcp-store'; 324 332 $classes[] = 'tcp-addresses-list-page'; 333 325 334 } elseif ( $this->is_page( get_option( 'tcp_address_edit_page_id' ) ) ) { 326 335 $classes[] = 'tcp-store'; 327 336 $classes[] = 'tcp-address-edit-page'; 337 328 338 } elseif ( $this->is_page( get_option( 'tcp_downloadable_list_page_id' ) ) ) { 329 339 $classes[] = 'tcp-store'; 330 340 $classes[] = 'tcp-downloadable-list-page'; 341 331 342 } elseif ( $this->is_page( get_option( 'tcp_orders_list_page_id' ) ) ) { 332 343 $classes[] = 'tcp-store'; … … 357 368 } 358 369 370 endif; 371 359 372 new TCPFrontEnd(); 360 373 361 // Template functions added by TheCartPress front end 362 374 // Template functions added by TheCartPress Front end plugin 375 376 /** 377 * Returns My Orders page URL 378 */ 363 379 function tcp_the_my_orders_url( $echo = true ) { 364 380 $url = get_permalink( tcp_get_current_id( get_option( 'tcp_orders_list_page_id' ), 'page' ) ); … … 367 383 } 368 384 385 /** 386 * Returns My Addresses page URL 387 */ 369 388 function tcp_the_my_addresses_url( $echo = true ) { 370 389 $url = get_permalink( tcp_get_current_id( get_option( 'tcp_addresses_list_page_id' ), 'page' ) ); … … 373 392 } 374 393 394 /** 395 * Returns My Downloads page URL 396 */ 375 397 function tcp_the_my_downloadables_url( $echo = true ) { 376 398 $url = get_permalink( tcp_get_current_id( get_option( 'tcp_downloadable_list_page_id' ), 'page' ) ); -
thecartpress-frontend/trunk/admin/OrdersList.class.php
r1261070 r1525870 24 24 25 25 class TCPOrdersList { 26 26 27 function show( $echo = true ) { 27 global $current_user; 28 get_currentuserinfo();28 29 $current_user = wp_get_current_user(); 29 30 if ( $current_user->ID == 0 ) { 30 31 ob_start(); ?> -
thecartpress-frontend/trunk/readme.txt
r1261071 r1525870 40 40 41 41 == Changelog == 42 = 1.6 = 43 Italian translation. thanks to Emanuele Persiani 44 42 45 = 1.5 = 43 46 * UI Improvements
Note: See TracChangeset
for help on using the changeset viewer.