| Server IP : 85.112.90.236 / Your IP : 192.168.1.26 Web Server : Apache System : Linux 85-112-90-236.cprapid.com 6.12.0-211.7.3.el10_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 19 12:46:58 EDT 2026 x86_64 User : ftechme ( 1002) PHP Version : 8.2.32 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/ftechme/backups/ |
Upload File : |
<?php
/**
* Plugin Name: Faisal Technology Protected Gallery
* Description: Visual polish, WebP gallery layout, and casual download protection for ftech.me photography.
* Version: 1.0.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
add_action(
'wp_enqueue_scripts',
function () {
wp_register_style( 'ftech-gallery-protection', false, array(), '1.0.0' );
wp_enqueue_style( 'ftech-gallery-protection' );
wp_add_inline_style(
'ftech-gallery-protection',
<<<'CSS'
.ft-site h1,
.ftech-photo-story h1 {
text-wrap: balance;
}
.ft-page-hero h1 {
font-size: clamp(2.4rem, 5.2vw, 4.9rem);
max-width: 1040px;
}
.ft-page-hero p {
color: #405365;
}
.ftech-photo-story {
width: min(1180px, calc(100% - 40px));
margin: 0 auto 90px;
color: var(--ft-ink, #071B2C);
}
.ftech-photo-story__hero {
padding: 88px 0 34px;
}
.ftech-photo-story__kicker {
margin: 0 0 14px;
color: var(--ft-forest, #176F64);
font-size: 0.84rem;
font-weight: 850;
letter-spacing: 0.15em;
text-transform: uppercase;
}
.ftech-photo-story h1 {
margin: 0;
max-width: 980px;
font-size: clamp(2.3rem, 5vw, 4.7rem);
line-height: 1.05;
letter-spacing: 0;
}
.ftech-photo-story__lead {
max-width: 780px;
margin: 22px 0 0;
color: #4E6072;
font-size: 1.14rem;
line-height: 1.75;
}
.ftech-photo-meta {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 14px;
margin: 30px 0 44px;
}
.ftech-photo-meta div {
padding: 18px 20px;
border: 1px solid rgba(7, 27, 44, 0.1);
border-radius: 8px;
background: linear-gradient(135deg, #fff, #F2F7F5);
box-shadow: 0 10px 28px rgba(7, 27, 44, 0.055);
}
.ftech-photo-meta span {
display: block;
margin-bottom: 5px;
color: var(--ft-forest, #176F64);
font-size: 0.78rem;
font-weight: 850;
letter-spacing: 0.11em;
text-transform: uppercase;
}
.ftech-photo-meta strong {
color: var(--ft-ink, #071B2C);
font-size: 1.05rem;
}
.ftech-protected-gallery {
display: grid;
grid-template-columns: repeat(12, 1fr);
gap: 16px;
margin: 0;
padding: 0;
list-style: none;
-webkit-user-select: none;
user-select: none;
}
.ftech-protected-gallery figure {
position: relative;
grid-column: span 4;
min-height: 390px;
margin: 0;
overflow: hidden;
border-radius: 8px;
background: #071B2C;
box-shadow: 0 18px 46px rgba(7, 27, 44, 0.18);
}
.ftech-protected-gallery figure:nth-child(1),
.ftech-protected-gallery figure:nth-child(6) {
grid-column: span 6;
min-height: 520px;
}
.ftech-protected-gallery figure:nth-child(4),
.ftech-protected-gallery figure:nth-child(9) {
grid-column: span 5;
}
.ftech-protected-gallery figure:nth-child(5),
.ftech-protected-gallery figure:nth-child(10) {
grid-column: span 7;
}
.ftech-protected-photo {
position: absolute;
inset: 0;
background-position: center;
background-size: cover;
transform: scale(1.01);
transition: transform 700ms ease, filter 700ms ease;
pointer-events: none;
}
.ftech-protected-gallery figure:hover .ftech-protected-photo {
transform: scale(1.045);
filter: saturate(1.06) contrast(1.02);
}
.ftech-protected-gallery figure::before {
content: "";
position: absolute;
inset: 0;
z-index: 1;
background:
linear-gradient(180deg, rgba(7, 27, 44, 0.03), rgba(7, 27, 44, 0.66)),
radial-gradient(circle at 20% 12%, rgba(53, 214, 196, 0.16), transparent 28%);
pointer-events: none;
}
.ftech-protected-gallery figure::after {
content: "Faisal Technology";
position: absolute;
right: 16px;
top: 16px;
z-index: 2;
padding: 7px 10px;
border: 1px solid rgba(255, 255, 255, 0.28);
border-radius: 999px;
background: rgba(7, 27, 44, 0.42);
color: rgba(255, 255, 255, 0.82);
font-size: 0.72rem;
font-weight: 800;
letter-spacing: 0.08em;
text-transform: uppercase;
backdrop-filter: blur(10px);
}
.ftech-protected-gallery figcaption {
position: absolute;
left: 0;
right: 0;
bottom: 0;
z-index: 2;
padding: 54px 22px 20px;
background: linear-gradient(180deg, transparent, rgba(7, 27, 44, 0.78));
color: #fff;
font-size: 0.96rem;
font-weight: 650;
line-height: 1.45;
text-shadow: 0 1px 18px rgba(0, 0, 0, 0.3);
}
.ftech-gallery-note {
max-width: 760px;
margin: 26px 0 0;
color: #526477;
font-size: 0.98rem;
}
.ftech-ar .ftech-photo-story,
.ftech-ar .ftech-photo-story__lead,
.ftech-ar .ftech-gallery-note {
direction: rtl;
text-align: right;
}
.ftech-ar .ftech-protected-gallery figure::after {
right: auto;
left: 16px;
content: "Faisal Technology";
}
@media (max-width: 900px) {
.ftech-photo-story {
width: min(100% - 32px, 760px);
margin-bottom: 64px;
}
.ftech-photo-story__hero {
padding-top: 58px;
}
.ftech-photo-meta {
grid-template-columns: 1fr;
}
.ftech-protected-gallery {
grid-template-columns: 1fr;
gap: 14px;
}
.ftech-protected-gallery figure,
.ftech-protected-gallery figure:nth-child(1),
.ftech-protected-gallery figure:nth-child(4),
.ftech-protected-gallery figure:nth-child(5),
.ftech-protected-gallery figure:nth-child(6),
.ftech-protected-gallery figure:nth-child(9),
.ftech-protected-gallery figure:nth-child(10) {
grid-column: auto;
min-height: 430px;
}
}
@media (max-width: 560px) {
.ft-page-hero h1,
.ftech-photo-story h1 {
font-size: clamp(2.05rem, 11vw, 3.05rem);
line-height: 1.08;
}
.ftech-photo-story__lead {
font-size: 1rem;
}
.ftech-protected-gallery figure,
.ftech-protected-gallery figure:nth-child(1),
.ftech-protected-gallery figure:nth-child(4),
.ftech-protected-gallery figure:nth-child(5),
.ftech-protected-gallery figure:nth-child(6),
.ftech-protected-gallery figure:nth-child(9),
.ftech-protected-gallery figure:nth-child(10) {
min-height: 370px;
}
.ftech-protected-gallery figcaption {
padding: 46px 18px 18px;
font-size: 0.9rem;
}
}
CSS
);
wp_register_script( 'ftech-gallery-protection', false, array(), '1.0.0', true );
wp_enqueue_script( 'ftech-gallery-protection' );
wp_add_inline_script(
'ftech-gallery-protection',
<<<'JS'
document.addEventListener('contextmenu', function (event) {
if (event.target.closest('.ftech-protected-gallery')) {
event.preventDefault();
}
});
document.addEventListener('dragstart', function (event) {
if (event.target.closest('.ftech-protected-gallery')) {
event.preventDefault();
}
});
document.addEventListener('keydown', function (event) {
if (!event.target.closest('.ftech-protected-gallery')) {
return;
}
var key = String(event.key || '').toLowerCase();
if ((event.ctrlKey || event.metaKey) && (key === 's' || key === 'u' || key === 'p')) {
event.preventDefault();
}
});
JS
);
},
35
);