بزرگترین جشنواره سال راکت! ۵۰ درصد تخفیف شگفت انگیز!
کلیک کن!سلام ، من یه قالبی طراحی کردم میخوام در سایت راست چین بزارمش برای فروش ، الان در قسمت لایسنس گذاری گیر کردم نمیدونم چطور باید لایسنس رو بزارم داخل قالب داخل کدوم پوشه یه کدی هم داده بهم راست چین :
// --------------------------------------------------------------------------------------------------- Start RTL License
$rtlLicenseClassName = 'RTL_License_1263edd811337b89';
$rtlLicenseFilePath = DIR . DIRECTORY_SEPARATOR . $rtlLicenseClassName . '.php';
$rtlLicenseFileHash = @sha1_file($rtlLicenseFilePath);
if ( $rtlLicenseFileHash === '79b21339e1b1269f22c982a33a7c4c5525413633' && file_exists($rtlLicenseFilePath) ) {
require_once $rtlLicenseFilePath;
if ( class_exists($rtlLicenseClassName) && method_exists($rtlLicenseClassName, 'isActive') ) {
$rtlLicenseClass = new $rtlLicenseClassName();
if ( $rtlLicenseClass->{'isActive'}() === true ) {
// Product is Active Now, Enable Pro Features
}
}
}
// ----------------------------------------------------------------------------------------------------- End RTL License
اینم نوشته دنبالش :
در قسمتی که نوشته شده //Product is Active Now, Enable Pro Features کدهایی که بعد از فعال سازی قالب باید اعمال شوند را وارد کنید، برای مثال کدهایی که باعث اضافه شدن بخش تنظیمات به قالب شما میشود.
لطفا کمک کنید من اینو باید چیکار کنم این کد روی چی باید اضافه کنم بهش و داخل کدوم پوشه باید قرارش بدم
wp-content/themes/my-theme/RTL_License_1263edd811337b89.php
functions.php=>
<?php
// --------------------------------------------------------------------------------------------------- Start RTL License
$rtlLicenseClassName = 'RTL_License_1263edd811337b89';
$rtlLicenseFilePath = __DIR__ . DIRECTORY_SEPARATOR . $rtlLicenseClassName . '.php'; // استفاده از __DIR__ به جای DIR
$rtlLicenseFileHash = @sha1_file($rtlLicenseFilePath);
if ( $rtlLicenseFileHash === '79b21339e1b1269f22c982a33a7c4c5525413633' && file_exists($rtlLicenseFilePath) ) {
require_once $rtlLicenseFilePath;
if ( class_exists($rtlLicenseClassName) && method_exists($rtlLicenseClassName, 'isActive') ) {
$rtlLicenseClass = new $rtlLicenseClassName();
if ( $rtlLicenseClass->{'isActive'}() === true ) {
// Product is Active Now, Enable Pro Features
// اینجا کدهایی که میخوای بعد از فعالسازی اجرا بشن رو بذار
add_action('admin_menu', 'my_theme_add_settings_menu'); // مثلاً اضافه کردن منوی تنظیمات
}
}
}
// ----------------------------------------------------------------------------------------------------- End RTL License
// مثال: تابع اضافه کردن منوی تنظیمات
function my_theme_add_settings_menu() {
add_menu_page(
'تنظیمات قالب من', // عنوان صفحه
'تنظیمات قالب', // عنوان منو
'manage_options', // دسترسی
'my-theme-settings', // slug
'my_theme_settings_page', // تابع صفحه
'dashicons-admin-generic' // آیکون
);
}
function my_theme_settings_page() {
echo '<h1>به تنظیمات قالب من خوش آمدید!</h1>';
// اینجا میتونی فرم تنظیمات یا هر چیزی که میخوای بذاری
}
?>```
سلام کل کدهات میزاری داخل بخش product is active not بعدش فایل رو داخل همون راستچین هش میکنی
هر فایلی که داخل functions باشه میتونی با این روش لایسنس بزاری
آیا مایل به ارسال نوتیفیکیشن و اخبار از طرف راکت هستید ؟