رفتن به مطلب

نصب اتوماتیک پلاکین ها


پست های پیشنهاد شده

سلام دوستان

من دارم یه پوسته طراحی می کنم ، یه سوال دارم ، میخوام وقتی پوسته نصب میشه، همزمان پیامی مبنی بر نصب پلاگین ها دیده بشه و با کلیک روی این پیام نصب پلاگین ها شروع بشه . البته نمی خوام از افزونه استفاده کنم و به کد نیاز دارم . ممنون

لینک به ارسال

سلام از این کد در فانکشن استفاده کن وقتی اون پلاگین هایی که توش مشخص کردی نصب نباشه یه پیغام از نوع ارور میاره که باید فلان پلاگین نصب باشه لینکشم که راحت میتونی بهش بدی

add_action('admin_notices', 'javad');
function javad(){
$plugin_messages = array();
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
// Download the Yoast WordPress SEO plugin
if(!is_plugin_active( 'wordpress-seo/wp-seo.php' )){
$plugin_messages[] = 'محمد جواد خلیلی';
}
if(!is_plugin_active( 'wordpress-popular-posts/wordpress-popular-posts.php' )){
$plugin_messages[] = 'پوسته جدید نیازمند نصب افزونه مطالب محبوب می باشد.';
}
if(count($plugin_messages) > 0){
echo '<div id="message" class="error ronakweb rkianoosh">';
echo "<br><strong>افزونه های زیر را نصب کنید</strong><br>";
foreach($plugin_messages as $message){
echo '<p>'.$message.'</p>';
}
echo '</div>';
}
}

لینک به ارسال

ببخشید تقصیر من بود این رو تست کنید!:

<?php

add_action('admin_notices', 'RonakwebRezaKianoosh');
function RonakwebRezaKianoosh(){
$plugin_messages = array();
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
// Download the Yoast WordPress SEO plugin
if(!is_plugin_active( 'wp-polls/wp-polls.php' )){
$plugin_messages[] = 'پلاگین نظرسنجی را نصب کنید(wp-polls)';
}
if(!is_plugin_active( 'wp-parsi-iran-weather/wp-parsi-iran-weather.php' )){
$plugin_messages[] = 'پلاگین آب و هوا را باید نصب کنید(wp-parsi-iran-weather).';
}
if(count($plugin_messages) > 0){
echo '<div id="message" class="error ronakweb rkianoosh">';
echo "<br><strong>افزونه های زیر را نصب کنید</strong><br>";
foreach($plugin_messages as $message){
echo '<p>'.$message.'</p>';
}
echo '</div>';
}
}
?>

لینک به ارسال

سلام

بفرمایید دوست عزیز .

خط اول رو فارسی کردم براتون که از روش متوجه بشید .

هم ارور میده و هم به سمت لینک پلاگین هدایت میکنه . 

خدمت شما . به اخر فایل function.php موجود در پوستتون اضاف کنید :

 

<?php
function showAdminMessages()
{
    $plugin_messages = array();
    include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
    // Download the Yoast WordPress SEO plugin
    if(!is_plugin_active( 'wordpress-seo/wp-seo.php' ))
    {
        $plugin_messages[] = 'این قالب نیاز به نصب افزونه  advanced caustom filed  دارد, <a href="http://wordpress.org/extend/plugins/wordpress-seo/">اکنون دانلود و نصب کنید</a>.';
    }
    // Download the Disqus comment system
    if(!is_plugin_active( 'disqus-comment-system/disqus.php' ))
    {
        $plugin_messages[] = 'This theme requires you to install the Disqus comment system plugin, <a href="http://wordpress.org/extend/plugins/disqus-comment-system/">download it from here</a>.';
    }
    // Download the WordPress popular posts plugin
    if(!is_plugin_active( 'wordpress-popular-posts/wordpress-popular-posts.php' ))
    {
        $plugin_messages[] = 'This theme requires you to install the WordPress Popular Post plugin, <a href="http://wordpress.org/extend/plugins/wordpress-popular-posts/">download it from here</a>.';
    }
    if(count($plugin_messages) > 0)
    {
        echo '<div id="message" class="error">';
            foreach($plugin_messages as $message)
            {
                echo '<p><strong>'.$message.'</strong></p>';
            }
        echo '</div>';
    }
}
?>

 

 

 

 

 

ویرایش شده توسط amirali.bk
لینک به ارسال
در 1 ساعت قبل، amirali.bk گفته است :

سلام

بفرمایید دوست عزیز .

خط اول رو فارسی کردم براتون که از روش متوجه بشید .

هم ارور میده و هم به سمت لینک پلاگین هدایت میکنه . 

خدمت شما . به اخر فایل function.php موجود در پوستتون اضاف کنید :

 


<?php
function showAdminMessages()
{
    $plugin_messages = array();
    include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
    // Download the Yoast WordPress SEO plugin
    if(!is_plugin_active( 'wordpress-seo/wp-seo.php' ))
    {
        $plugin_messages[] = 'این قالب نیاز به نصب افزونه  advanced caustom filed  دارد, <a href="http://wordpress.org/extend/plugins/wordpress-seo/">اکنون دانلود و نصب کنید</a>.';
    }
    // Download the Disqus comment system
    if(!is_plugin_active( 'disqus-comment-system/disqus.php' ))
    {
        $plugin_messages[] = 'This theme requires you to install the Disqus comment system plugin, <a href="http://wordpress.org/extend/plugins/disqus-comment-system/">download it from here</a>.';
    }
    // Download the WordPress popular posts plugin
    if(!is_plugin_active( 'wordpress-popular-posts/wordpress-popular-posts.php' ))
    {
        $plugin_messages[] = 'This theme requires you to install the WordPress Popular Post plugin, <a href="http://wordpress.org/extend/plugins/wordpress-popular-posts/">download it from here</a>.';
    }
    if(count($plugin_messages) > 0)
    {
        echo '<div id="message" class="error">';
            foreach($plugin_messages as $message)
            {
                echo '<p><strong>'.$message.'</strong></p>';
            }
        echo '</div>';
    }
}
?>

 

 

 

 

 

ممنون . ولی مشکل در اینه که من میخوام مستقیم دانلود و نصب کنه نه بره مخزن وردپرس.

 

البته TGM  که دوستمون amir khalaji mehr معرفی کرده فوق العاده است و تقریبا در بیشتر قالبای حرفه ای ازش استفاده شده ولی یکم باید روش کار بشه زمان بره! 

ویرایش شده توسط asareza
لینک به ارسال

سلام

همون اسکریپت tgm کارتون رو راه میندازه و بهترین گزینه برای اینکار هست

نقل قول

ممنون . ولی مشکل در اینه که من میخوام مستقیم دانلود و نصب کنه نه بره مخزن وردپرس.

tgm این قابلیت رو داره که یا افزونه رو به فایل قالب اتچ کنید یا اینکه از خود وردپرس دانلود و نصب کنه ...

بزودی در روناک وب اموزشش رو منتشر میکنم :)

لینک به ارسال
در 2 دقیقه قبل، rezakianoosh گفته است :

سلام

همون اسکریپت tgm کارتون رو راه میندازه و بهترین گزینه برای اینکار هست

tgm این قابلیت رو داره که یا افزونه رو به فایل قالب اتچ کنید یا اینکه از خود وردپرس دانلود و نصب کنه ...

بزودی در روناک وب اموزشش رو منتشر میکنم :)

البته آموزش انگلیسشو مطالعه کردم و لی متاسفانه با همه قالبها ست نمیشه و باید بعضی از قسمت های قالب رو تغییر داد. ولی شدیدا منتظر آموزش فارسیش از سایت خوب ماندگار وب می مونیم چون بهر حال آموزش با زبان شیرین فارسی یه چیزی دیگست و میتونه خیلی کمک کنه. 

لینک به ارسال

به گفتگو بپیوندید

هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .

مهمان
ارسال پاسخ به این موضوع ...

×   شما در حال چسباندن محتوایی با قالب بندی هستید.   حذف قالب بندی

  تنها استفاده از 75 اموجی مجاز می باشد.

×   لینک شما به صورت اتوماتیک جای گذاری شد.   نمایش به صورت لینک

×   محتوای قبلی شما بازگردانی شد.   پاک کردن محتوای ویرایشگر

×   شما مستقیما نمی توانید تصویر خود را قرار دهید. یا آن را اینجا بارگذاری کنید یا از یک URL قرار دهید.

×
×
  • اضافه کردن...