Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apex_micro_site
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Ali Arshad
apex_micro_site
Commits
59c4064d
Commit
59c4064d
authored
Feb 21, 2018
by
Muhammad Usman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sub category fix
parent
0ba0a1b0
Pipeline
#336
passed with stage
in 0 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
8 deletions
+21
-8
ct_max_meta.php
.../wp-content/plugins/apex_global_lms/admin/ct_max_meta.php
+10
-0
e-learning.php
...p-content/plugins/apex_global_lms/template/e-learning.php
+1
-0
it-course.php
...wp-content/plugins/apex_global_lms/template/it-course.php
+10
-8
No files found.
WWW_DATA/wp-content/plugins/apex_global_lms/admin/ct_max_meta.php
View file @
59c4064d
...
...
@@ -41,6 +41,8 @@ if ( ! class_exists( 'CT_TAX_META' ) ) {
<input
type=
"button"
class=
"button button-secondary ct_tax_media_button"
id=
"ct_tax_media_button"
name=
"ct_tax_media_button"
value=
"Add Image"
/>
<input
type=
"button"
class=
"button button-secondary ct_tax_media_remove"
id=
"ct_tax_media_remove"
name=
"ct_tax_media_remove"
value=
"Remove Image"
/>
</p>
<label
for=
""
>
Redirect Link:
</label>
<input
type=
"text"
class=
"form-control"
name=
"vq_course_ct_tax_redirect"
/>
</div>
<?php
}
...
...
@@ -52,7 +54,9 @@ if ( ! class_exists( 'CT_TAX_META' ) ) {
public
function
save_category_image
(
$term_id
,
$tt_id
)
{
if
(
isset
(
$_POST
[
'vq_course_taxonomy-image-id'
]
)
&&
''
!==
$_POST
[
'vq_course_taxonomy-image-id'
]
){
$image
=
$_POST
[
'vq_course_taxonomy-image-id'
];
$link
=
$_POST
[
'vq_course_ct_tax_redirect'
];
add_term_meta
(
$term_id
,
'vq_course_taxonomy-image-id'
,
$image
,
true
);
add_term_meta
(
$term_id
,
'vq_course_ct_tax_redirect'
,
$link
,
true
);
}
}
...
...
@@ -77,6 +81,9 @@ if ( ! class_exists( 'CT_TAX_META' ) ) {
<input
type=
"button"
class=
"button button-secondary ct_tax_media_button"
id=
"ct_tax_media_button"
name=
"ct_tax_media_button"
value=
"Add Image"
/>
<input
type=
"button"
class=
"button button-secondary ct_tax_media_remove"
id=
"ct_tax_media_remove"
name=
"ct_tax_media_remove"
value=
"Remove Image"
/>
</p>
<?php
$link
=
get_term_meta
(
$term
->
term_id
,
'vq_course_ct_tax_redirect'
,
true
);
?>
<label
for=
""
>
Redirect Link:
</label>
<input
type=
"text"
class=
"form-control"
name=
"vq_course_ct_tax_redirect"
value=
"
<?php
echo
$link
;
?>
"
/>
</td>
</tr>
<?php
...
...
@@ -93,6 +100,9 @@ if ( ! class_exists( 'CT_TAX_META' ) ) {
}
else
{
update_term_meta
(
$term_id
,
'vq_course_taxonomy-image-id'
,
''
);
}
$link
=
$_POST
[
'vq_course_ct_tax_redirect'
];
update_term_meta
(
$term_id
,
'vq_course_ct_tax_redirect'
,
$link
);
}
/*
...
...
WWW_DATA/wp-content/plugins/apex_global_lms/template/e-learning.php
View file @
59c4064d
...
...
@@ -4,6 +4,7 @@ get_header();
$page
=
get_page_by_path
(
'lms'
);
$course_categories
=
get_terms
(
array
(
'taxonomy'
=>
'vq_course_taxonomy'
,
'parent'
=>
0
,
'hide_empty'
=>
false
,
));
...
...
WWW_DATA/wp-content/plugins/apex_global_lms/template/it-course.php
View file @
59c4064d
...
...
@@ -20,6 +20,8 @@ $args = array(
);
$courses
=
new
WP_Query
(
$args
);
$courses1
=
$courses
;
$children
=
get_term_children
(
$term
->
term_id
,
'vq_course_taxonomy'
);
$crsList
=
array
();
...
...
@@ -55,22 +57,22 @@ $page = get_page_by_path('lms-courses');
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-sm-8"
>
<?php
if
(
$courses
->
have_posts
()
){
?>
<?php
while
(
$courses
->
have_posts
())
{
$courses
->
the_post
();
?>
<?php
if
(
count
(
$children
)
>
0
){
?>
<?php
foreach
(
$children
as
$child
){
?>
<div
class=
"course-box"
>
<div
class=
"col-sm-3 col-padding"
style=
"line-height: 0;"
>
<
?php
the_post_thumbnail
(
'thumbnail'
)
?
>
<
img
src=
"
<?php
echo
wp_get_attachment_url
(
get_term_meta
(
$child
,
'vq_course_taxonomy-image-id'
,
true
))
?>
"
alt=
""
>
</div>
<div
class=
"col-sm-6 col-padding"
>
<div
class=
"course-heading"
>
<h3>
<?php
the_title
();
?>
</h3>
<
?php
the_content
();
?
>
<div
class=
"course-heading"
style=
"padding-left: 8px;"
>
<h3>
<?php
echo
get_term_name
(
$child
,
'vq_course_taxonomy'
)
?>
</h3>
<
p>
<?php
echo
get_term_field
(
'description'
,
$child
)
?>
</p
>
</div>
</div>
<div
class=
"col-sm-3 col-padding"
>
<div
class=
"download-course-box"
>
<div
class=
"course-heading"
>
<h4><a
href=
"
<?php
echo
'/download-all/?course='
.
get_the_ID
();
?>
"
>
Download
<br>
course list
</a></h4>
<div
class=
"course-heading"
>
<h4><a
href=
"
/
<?php
echo
get_term_meta
(
$child
,
'vq_course_ct_tax_redirect'
,
true
)
?>
"
>
Download
<br>
course list
</a></h4>
</div>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment