MyListing, Theme Editor 경로 리스트 및 Tip!

테마를 수정하기 전 참고 사항.

1. 아래의 경로값 속 파일을 수정하기 전, 백업은 필수.

2. MyListing 2.0 및 최신 버전 2.1 의 경로값이 뒤섞여 있음.

3. 없는 경로는 구글 크롬의 ‘페이지 소스 보기’ 를 사용해 응용 할 것.

로그인 

Partials -> account -> login-form.php 수정 

<?php if (!class_exists('WooCommerce')) return; ?>

<div class="sign-in-box element">
	<div class="title-style-1">
		<i class="material-icons user-area-icon">person</i>
		<h5><?php _e( '로그인', 'my-listing' ) ?></h5>
	</div>
	<form class="sign-in-form woocomerce-form woocommerce-form-login login" method="POST" action="<?php echo esc_url( wc_get_page_permalink('myaccount') ) ?>">

		<?php do_action( 'woocommerce_login_form_start' ); ?>

		<div class="form-group">
			<input type="text" name="username" id="username" value="<?php if ( ! empty( $_POST['username'] ) ) echo esc_attr( $_POST['username'] ); ?>" placeholder="<?php esc_attr_e( '이메일 주소', 'my-listing' ) ?>">
		</div>

		<div class="form-group">
			<input type="password" name="password" id="password" placeholder="<?php esc_attr_e( '비밀번호', 'my-listing' ) ?>">
		</div>

		<?php do_action( 'woocommerce_login_form' ); ?>

		<?php wp_nonce_field( 'woocommerce-login', 'woocommerce-login-nonce' ); ?>

		<div class="form-group">
			<button type="submit" class="buttons button-2 full-width" name="login" value="Login">
				<?php _e( '로그인', 'my-listing' ) ?>
			</button>
		</div>

		<div class="form-info">
			<div class="md-checkbox">
				<input type="checkbox" name="rememberme" type="checkbox" id="rememberme" value="forever">
				<label for="rememberme" class=""><?php _e( '아이디 저장', 'my-listing' ) ?></label>
			</div>
			
		</div>

		<?php if ( ! empty( $_GET['redirect_to'] ) ): ?>
			<input type="hidden" name="redirect" value="<?php echo esc_url( $_GET['redirect_to'] ) ?>">
		<?php endif ?>

		<?php do_action( 'woocommerce_login_form_end' ); ?>

		<?php if ( get_option( 'woocommerce_enable_myaccount_registration' ) === 'yes' ) : ?>
			<a href="#" class="c27-open-modal" data-target="#sign-up-modal"><i class="material-icons user-area-icon">person</i><?php _e( '어썸맵스 회원이 아니세요?', 'my-listing' ) ?></a>
		<?php endif ?>
		<div class="forgot-password">
		<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><i class="material-icons">lock</i><?php _e( '비밀번호 찾기', 'my-listing' ); ?></a>
		</div>
	</form>

	<?php c27()->get_partial( 'spinner', [
		'color' => '#777',
		'classes' => 'center-vh',
		'size' => 24,
		'width' => 2.5,
	] ) ?>
</div>


Partials -> account -> register-form.php 수정

<?php if (!class_exists('WooCommerce')) return; ?>

<div class="sign-in-box element">
	<div class="title-style-1">
		<i class="material-icons user-area-icon">person</i>
		<h5><?php _e( '회원가입', 'my-listing' ) ?></h5>
	</div>
	<form class="sign-in-form register" method="POST" action="<?php echo esc_url( wc_get_page_permalink('myaccount') ) ?>">

		<?php do_action( 'woocommerce_register_form_start' ); ?>

		<?php if ( 'no' === get_option( 'woocommerce_registration_generate_username' ) ) : ?>
			<div class="form-group">
				<input type="text" name="username" id="reg_username" value="<?php if ( ! empty( $_POST['username'] ) ) echo esc_attr( $_POST['username'] ); ?>" placeholder="<?php esc_attr_e( 'Username', 'my-listing' ) ?>">
			</div>
		<?php endif; ?>

		<div class="form-group">
			<input type="email" name="email" id="reg_email" value="<?php if ( ! empty( $_POST['email'] ) ) echo esc_attr( $_POST['email'] ); ?>" placeholder="<?php esc_attr_e( '이메일 주소', 'my-listing' ) ?>">
		</div>

		<?php if ( 'no' === get_option( 'woocommerce_registration_generate_password' ) ) : ?>
			<div class="form-group">
				<input type="password" name="password" id="reg_password" placeholder="<?php esc_attr_e( '비밀번호', 'my-listing' ) ?>">
			</div>
		<?php endif; ?>

		<!-- Spam Trap -->
		<div style="<?php echo ( ( is_rtl() ) ? 'right' : 'left' ); ?>: -999em; position: absolute;"><label for="trap"><?php _e( 'Anti-spam', 'my-listing' ); ?></label><input type="text" name="email_2" id="trap" tabindex="-1" autocomplete="off" /></div>

		<?php do_action( 'woocommerce_register_form' ); ?>

		<!-- <div class="form-info">
			<div class="md-checkbox">
				<input id="i2" type="checkbox">
				<label for="i2" class="">I agree to the <a href="#">Terms and Conditions</a></label>
			</div>
		</div> -->

		<div class="form-group">
			<?php wp_nonce_field( 'woocommerce-register', 'woocommerce-register-nonce' ); ?>
			<button type="submit" class="buttons button-2 full-width" name="register" value="Register">
				<?php _e( '회원가입', 'my-listing' ) ?>
			</button>
		</div>

		<?php if ( ! empty( $_GET['redirect_to'] ) ): ?>
			<input type="hidden" name="redirect" value="<?php echo esc_url( $_GET['redirect_to'] ) ?>">
		<?php endif ?>

		<?php do_action( 'woocommerce_register_form_end' ); ?>

		<a href="#" class="c27-open-modal" data-target="#sign-in-modal"><?php _e( '어썸맵스 회원이라면?!', 'my-listing' ) ?></a>

	</form>

	<?php c27()->get_partial( 'spinner', [
		'color' => '#777',
		'classes' => 'center-vh',
		'size' => 24,
		'width' => 2.5,
	] ); ?>
</div>
Sections -> headers.php 에서 “or Register” 삭제 또는 login 문구 변경
 

Includes -> extensions -> social login -> social login.php 에서 “Or connect with” 삭제

검색창

Partials -> quick-search.php 에서 

<?php
$data = c27()->merge_options([
	'instance-id' => 'quick-search--' . uniqid(),
	'placeholder' => _x( 'Search...', 'Quicksearch placeholder', 'my-listing' ),
	'ref' => '',
	'align' => 'center',
	'style' => 'light',
	'focus' => 'default',
], $data);

$featured_categories = c27()->get_setting('header_search_form_featured_categories', []);
?>
<div class="quick-search-instance <?php echo esc_attr( 'text-' . $data['align'] ) ?>" id="<?php echo esc_attr( $data['instance-id'] ) ?>" data-focus="<?php echo esc_attr( $data['focus'] ) ?>">
	<form action="<?php echo esc_url( c27()->get_setting('general_explore_listings_page') ) ?>" method="GET">
		<div class="dark-forms header-search <?php echo $data['ref'] == 'shortcode' ? 'search-shortcode' : '' ?> search-shortcode-<?php echo esc_attr( $data['style'] ) ?>">
			<i class="mi search"></i>
			<input type="search" placeholder="<?php echo esc_attr( $data['placeholder'] ) ?>" name="search_keywords" autocomplete="off">
			<div class="instant-results">
				<ul class="instant-results-list ajax-results"></ul>
				<button type="submit" class="buttons full-width button-5 search view-all-results all-results">
					<i class="mi search"></i><?php _e( '전체보기', 'my-listing' ) ?>
				</button>
				<button type="submit" class="buttons full-width button-5 search view-all-results no-results">
					<i class="mi search"></i><?php _e( '검색결과 없음', 'my-listing' ) ?>
				</button>
				<div class="loader-bg">
					<?php c27()->get_partial( 'spinner', [
						'color' => '#777',
						'classes' => 'center-vh',
						'size' => 24,
						'width' => 2.5,
					] ) ?>
				</div>

				<?php if ( ! is_wp_error( $featured_categories ) && is_array( $featured_categories ) ): ?>
					<ul class="instant-results-list default-results">
        				<li class="ir-cat"><?php _e( '추천', 'my-listing' ) ?></li>

						<?php foreach ($featured_categories as $category):
							if ( ! $category instanceof \WP_Term ) {
								continue;
							}
							$term = new MyListing\Src\Term( $category );
							?>
							<li>
								<a href="<?php echo esc_url( $term->get_link() ) ?>">
									<span class="cat-icon" style="background-color: <?php echo esc_attr( $term->get_color() ) ?>;">
                                        <?php echo $term->get_icon([ 'background' => false ]) ?>
									</span>
									<span class="category-name"><?php echo esc_html( $term->get_name() ) ?></span>
								</a>
							</li>
						<?php endforeach ?>

					</ul>
				<?php endif ?>
			</div>
		</div>
	</form>
</div>

“View all results” 를 “전체보기” 로, 

“No results” 를 “검색결과 없음” 으로

“Featured” 를 “추천” 으로 변경

Partials -> search-form.php 에서 

“Search” 를 “검색” 으로 변경

includes/src/queries/quick-search.php 에서 “Categories” 를 “카테고리” 로 수정, REGION을 국가로 수정

리뷰

includes/extensions/reviews/reviews.php 에서 “Upload Images” 를  ‘이미지 업로드” 로 변경

댓글에서 변경

“No comments yet” -> “작성된 리뷰가 없습니다.”

“동의 내용 영문을” -> 나의 닉네임, 이메일 주소, 리뷰 내용을 저장합니다.

영업시간

Sections -> work-hours-block 에서 

<?php
	$data = c27()->merge_options([
			'icon' => '',
			'icon_style' => 1,
			'title' => '',
			'hours' => [],
			'wrapper_class' => 'grid-item',
			'wrapper_id' => '',
			'ref' => '',
		], $data);

	$unique_id = sprintf( 'work-hours--%s', MyListing\Utils\Random_Id::generate(8) );
	$schedule = new MyListing\Src\Work_Hours( $data['hours'] );

	if ( $schedule->is_empty() ) {
		return false;
	}
?>

<div class="<?php echo esc_attr( $data['wrapper_class'] ) ?>" <?php echo $data['wrapper_id'] ? sprintf( 'id="%s"', $data['wrapper_id'] ) : '' ?>>
	<div class="element work-hours-block">
		<div class="pf-head" data-toggle="collapse" data-target="#<?php echo esc_attr( $unique_id ) ?>">
			<div class="title-style-1">
				<?php echo c27()->get_icon_markup( $data['icon'] ) ?>
				<h5><span class="<?php echo esc_attr( $schedule->get_status() ) ?> work-hours-status"><?php echo esc_html( $schedule->get_message() ) ?></span></h5>
				<div class="timing-today">
					<?php echo $schedule->get_todays_schedule() ?>
					<span class="mi expand_more" data-toggle="tooltip" data-placement="top" title="<?php esc_attr_e( '영업시간 펼치기', 'my-listing' ) ?>"></span>
				</div>
			</div>
		</div>
		<div class="open-hours-wrapper pf-body collapse" id="<?php echo esc_attr( $unique_id ) ?>">
			<div id="open-hours">
				<ul class="extra-details">
					<?php foreach ( $schedule->get_schedule() as $weekday ): ?>
						<li>
							<p class="item-attr"><?php echo esc_html( $weekday['day_l10n'] ) ?></p>
							<p class="item-property"><?php echo $schedule->get_day_schedule( $weekday['day'] ) ?></p>
						</li>
					<?php endforeach ?>

					<?php if ( ! empty( $data['hours']['timezone'] ) ):
						$localTime = new DateTime( 'now', new DateTimeZone( $data['hours']['timezone'] ) );
						?>
						<p class="work-hours-timezone">
							<em><?php printf( __( '%s ,현지 시간', 'my-listing' ), date_i18n( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), strtotime( $localTime->format('Y-m-d H:i:s') ) ) ) ?></em>
						</p>
					<?php endif ?>
				</ul>
			</div>
		</div>
	</div>
</div>

“Toggle weekly schedule” -> “영업시간 펼치기” 로 변경, 

“Local time” -> “현지 시간” 으로 변경

Includes -> classes -> work-hours.php 에서 “open” 등등 변경

Explore

Partials -> advancesced-search.php 에서 

“Categories” -> “카테고리” 로 변경

“Filter” -> “필터” 으로 변경

“Search” -> “검색” 으로 변경

Sections -> explore.php 에서 

“search filter” 를 “검색 필터” 로 변경

“Map View” 를 “Map” 으로 변경

리스팅 등록

templates/add-listing/choose-type.php에서 “Choose type” 을 “리스팅 타입 선택” 으로 변경

/includes/integrations/wp-job-manager/templates/account-signin.php 에서 

add listing 위젯 안의 텍스트 변경

You must be logged in to post new listings -> 리스팅을 작성하려면 로그인을 해야합니다.

/includes/integrations/wp-job-manager/templates/job-submitted.php

리스팅 등록 뜨는 문구 변경

Includes -> integrations -> wp-job-manager -> /templates/form-fields/work-hours-field.php

에서 add 리스팅의 시간명 변경 “enter hour등”

리스팅

/includes/integrations/wp-job-manager/templates/content-no-jobs-found.php

에서 “There are no listings matching your search” 를 “등록된 리스팅이 없습니다.” 로 변경

추천 리스팅

templates/single-listing/similar-listings.php 에서 “You May Also Be Interested In” 주변의 추천 장소 변경

Total
0
Shares
0 Share
0 Tweet
0 Share
0 Share
0 Share
답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다

Previous Post

네이버 블로그 글쓰기 API로 워드프레스 글 자동 연동하기

Next Post

워드프레스 테마 편집기 수정 또는 업데이트가 안될 때