Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
makura-2025
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Raj Shah
makura-2025
Commits
70ff96ab
Commit
70ff96ab
authored
Jul 15, 2025
by
rajshah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: download count in resource detail v0.2
parent
0423911e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
script.js
assets/js/script.js
+1
-1
single-resource.php
single-resource.php
+2
-2
No files found.
assets/js/script.js
View file @
70ff96ab
...
...
@@ -343,7 +343,7 @@
})(
jQuery
);
// download count
jQuery
(
document
).
ready
(
function
(
$
)
{
$
(
'
.btn
-download'
).
on
(
'click'
,
function
()
{
$
(
'
#btn-resource
-download'
).
on
(
'click'
,
function
()
{
const
resourceId
=
$
(
this
).
data
(
'resource-id'
);
$
.
ajax
({
...
...
single-resource.php
View file @
70ff96ab
...
...
@@ -62,7 +62,7 @@ endif;
<p>
<?php
echo
get_the_excerpt
()
?:
wp_trim_words
(
get_the_content
(),
8
,
' [...]'
);
?>
</p>
<a
href=
"
<?php
echo
esc_url
(
$url
);
?>
"
target=
"_blank"
class=
"btn btn-primary btn-padding hover-up btn-start-project font-14 fw-500 btn-padding btn-submit text-light"
class=
"btn btn-primary btn-padding hover-up btn-start-project font-14 fw-500 btn-padding btn-submit text-light"
id=
"btn-resource-download"
download
>
Download
Now [
<?php
echo
$icon
;
?>
]
<svg
width=
"24"
height=
"24"
viewBox=
"0 0 24 24"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
...
...
@@ -122,7 +122,7 @@ endif;
<div
class=
"row"
>
<div
class=
"col-md-6 col-lg-4 order-md-2"
>
<a
href=
"
<?php
echo
esc_url
(
$url
);
?>
"
target=
"_blank"
class=
"btn btn-primary btn-padding hover-up btn-start-project font-14 fw-500 btn-padding btn-submit text-light"
class=
"btn btn-primary btn-padding hover-up btn-start-project font-14 fw-500 btn-padding btn-submit text-light"
id=
"btn-resource-download"
download
>
Download
Now [
<?php
echo
$icon
;
?>
]
</a>
</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