Monica 322 ارسال شده در آذر 94 گزارش بازنشر ارسال شده در آذر 94 سلام دوستان من بدلیل اینکه قالبم برای ویدئو مناسب نیست تصمیم گرفتم از ی قالب مخصوص ویدیو در ساب دامین استفاده کنم ، میخوام ببینم راهی هست که وقتی نوشته ای درسایت ویدیو منتشر میشه توو آخرین مطالب سایت اصلی هم بیاد ؟؟؟ یعنی دسته بندی ها یکی بشه ؟؟؟ اگر راهی هست لطفا بگین دقیقا باید چیکار کنم مرسی نقل قول لینک به ارسال
imanfakhar 26231 ارسال شده در آذر 94 گزارش بازنشر ارسال شده در آذر 94 بستگی داره که ساب دامینتون رو چطوری درست کرده باشید اگه یک وردپرس مجزا با دیتابیس مجزا ریخته باشید کار مشکل می شه ولی اگه با استفاده از وردپرس شبکه ساخته باشید تابع داره در ضمن راه درست تره اینکار این بود که پست تایپ ویدئو تعریف کنید و قالب موردنظرتون رو برای اون پست تایپ لود کنید 2 نقل قول لینک به ارسال
Monica 322 ارسال شده در آذر 94 مالک گزارش بازنشر ارسال شده در آذر 94 بستگی داره که ساب دامینتون رو چطوری درست کرده باشید اگه یک وردپرس مجزا با دیتابیس مجزا ریخته باشید کار مشکل می شه ولی اگه با استفاده از وردپرس شبکه ساخته باشید تابع دارهدر ضمن راه درست تره اینکار این بود که پست تایپ ویدئو تعریف کنید و قالب موردنظرتون رو برای اون پست تایپ لود کنیدمن الآن هیچ کاری هنوز انجام ندادم و دارم تحقیق میکنم ، راهنمایی های شما برای من و تیممون خیلی مهمه ، مگه در پست تایپ میشه ی پوسته از پیش طراحی شده رو لود کرد ؟؟؟ من ی پست تایپ ایجاد کردم البته با کمک افزونه ولی نتونستم در بخش ایجاد ویدیو جدید مسائل مربوط به سئو رو بیارم ، مثلا آدرس صفحه تک نوشته ویدیو ی آدرس عجیب و غریب شد، (post_type?15&) ، برچسب ها هم توو بخش ایجاد ویدیو جدید نیومدن ولی بقیه موارد عالی بود ... تایپیک زدم کسی پاسخی نداد ، گفتم احتمالا راهی براش نیست ، نقل قول لینک به ارسال
setareh.h81 1 ارسال شده در آذر 94 گزارش بازنشر ارسال شده در آذر 94 با اجازه استاد عزیربدون افزونه فکر کنم بهتر باشه تو ماندگاروب روش ساخت پست تایپ توضیح داده شدهمن استفاده کردم مشکلات شما رو نداشتمhttp://mandegarweb.com/wordpress/wordpress-learning/%D8%A2%D9%85%D9%88%D8%B2%D8%B4-%D8%B3%D8%A7%D8%AE%D8%AA-%D9%81%D8%B1%D9%88%D8%B4%DA%AF%D8%A7%D9%87-%D8%A8%D8%A7-%D9%88%D8%B1%D8%AF%D9%BE%D8%B1%D8%B3/در ضمن بعد ساخت پست تایپ میتونی صفحه سینگل - کتگوری - تاکسونمی شخصی سازی کنی با هر استایلی که دوست داری نمایش داده بشه مثل یه قالب متفاوت بستگی داره که ساب دامینتون رو چطوری درست کرده باشید اگه یک وردپرس مجزا با دیتابیس مجزا ریخته باشید کار مشکل می شه ولی اگه با استفاده از وردپرس شبکه ساخته باشید تابع داره در ضمن راه درست تره اینکار این بود که پست تایپ ویدئو تعریف کنید و قالب موردنظرتون رو برای اون پست تایپ لود کنید من دارم از وردپرس شبکه استفاده میکنممیشه بگین با چه تابعی میتونم مطالب رو از یه ساب دامین تو صفحه اصلی نشون بدم؟ 1 نقل قول لینک به ارسال
imanfakhar 26231 ارسال شده در آذر 94 گزارش بازنشر ارسال شده در آذر 94 از افزونه استفاده کنید https://wordpress.org/plugins/network-posts-extended/https://wordpress.org/plugins/multisite-posts/ 3 نقل قول لینک به ارسال
imanfakhar 26231 ارسال شده در آذر 94 گزارش بازنشر ارسال شده در آذر 94 من الآن هیچ کاری هنوز انجام ندادم و دارم تحقیق میکنم ، راهنمایی های شما برای من و تیممون خیلی مهمه ، مگه در پست تایپ میشه ی پوسته از پیش طراحی شده رو لود کرد ؟؟؟من ی پست تایپ ایجاد کردم البته با کمک افزونه ولی نتونستم در بخش ایجاد ویدیو جدید مسائل مربوط به سئو رو بیارم ، مثلا آدرس صفحه تک نوشته ویدیو ی آدرس عجیب و غریب شد، (post_type?15&) ، برچسب ها هم توو بخش ایجاد ویدیو جدید نیومدن ولی بقیه موارد عالی بود ...تایپیک زدم کسی پاسخی نداد ، گفتم احتمالا راهی براش نیست ،کدهای پست تایپتون رو برای برچسب ها بگذارید اینجابرای پیوند یکتا باید بعد از ایجاد پست تایپ به پیشخوان - تنظیمات - پیوندهای یکتا برید و ساختار موجود رو یکبار دیگه ذخیره کنید 1 نقل قول لینک به ارسال
Monica 322 ارسال شده در آذر 94 مالک گزارش بازنشر ارسال شده در آذر 94 کدهای پست تایپتون رو برای برچسب ها بگذارید اینجابرای پیوند یکتا باید بعد از ایجاد پست تایپ به پیشخوان - تنظیمات - پیوندهای یکتا برید و ساختار موجود رو یکبار دیگه ذخیره کنیدضمن عرض سلام ، لطفا در نظر داشته باشید که پست تایپ رو به کمک افزونه ایجاد کردیم، برای درج ویدیو از کدهای زیر استفاده شده ... آیا راهی هست که دسته بندی های این پست تایپ رو به ابزارکی که بهم دادین اضافه کرد ؟؟؟ یعنی هم دسته بندی های وردپرس رو بخونه ، هم دسته بندی های این پست تایپ رو ؟؟؟<?php$page = $_GET['page'];$action = '?page=' . $page . '&action=save';?><div class="wrap yendif-player <?php echo $page; ?>"> <div class="yendif-player-header"> <h2 class="yendif-player-left"> <?php _e( 'Add New Media', YENDIF_PLAYER_PLUGIN_SLUG ); ?> </h2> <div class="yendif-player-right"> <a href="?page=<?php echo $page; ?>" class="yendif-player-backlink"> <?php _e( "← Return To Media Overview", YENDIF_PLAYER_PLUGIN_SLUG ); ?> </a> </div> <div class="yendif-player-clear"></div> <hr /> </div> <form enctype="multipart/form-data" method="post" action="<?php echo $action; ?>" class="<?php echo $page; ?>-form" id="yendif-player-form"> <input type="hidden" name="yendif-player-page" id="yendif-player-page" value="<?php echo $page; ?>" /> <?php wp_nonce_field('yendif-player-nonce'); ?> <div class="yendif-player-left-content"> <input type="text" name="title" class="required yendif-player-title" placeholder="<?php _e( 'Enter title here', YENDIF_PLAYER_PLUGIN_SLUG ); ?>" /> <div class="yendif-player-box"> <div class="yendif-player-box-header"> <?php echo Yendif_Player_Admin_Functions::radio( 'type', array( __( 'Video', YENDIF_PLAYER_PLUGIN_SLUG ), __( 'Youtube', YENDIF_PLAYER_PLUGIN_SLUG ), __( 'RTMP', YENDIF_PLAYER_PLUGIN_SLUG ), __( 'Audio', YENDIF_PLAYER_PLUGIN_SLUG ) ), array( 'video', 'youtube', 'rtmp', 'audio' ), 'video' ); ?> </div> <table class="yendif-player-form-table"> <tr valign="top" id="yendif-player-row-youtube"> <th scope="row"><?php _e( 'YouTube URL', YENDIF_PLAYER_PLUGIN_SLUG ); ?></th> <td> <input type="text" name="youtube" id="youtube" class="required yendif-player-wide" /> <p class="yendif-player-description"><?php _e( 'Example : http://youtu.be/dQw4w9WgXcQ', YENDIF_PLAYER_PLUGIN_SLUG ); ?></p> </td> </tr> <tr valign="top" id="yendif-player-row-rtmp"> <th scope="row"><?php _e( 'RTMP Server', YENDIF_PLAYER_PLUGIN_SLUG ); ?></th> <td> <input type="text" name="rtmp" id="rtmp" class="required yendif-player-wide" /> <p class="yendif-player-description"> <?php _e( 'Example : rtmp://server_ip_address/application/', YENDIF_PLAYER_PLUGIN_SLUG ); ?> </p> </td> </tr> <tr valign="top" id="yendif-player-row-flash"> <th scope="row"><?php _e( 'Stream Name', YENDIF_PLAYER_PLUGIN_SLUG ); ?></th> <td> <input type="text" name="flash" id="flash" class="required yendif-player-wide" /> <p class="yendif-player-description"> <?php _e( 'Example : stream.mp4', YENDIF_PLAYER_PLUGIN_SLUG ); ?> </p> </td> </tr> <tr valign="top" id="yendif-player-row-fallback"> <th scope="row"><?php _e( 'Mobile Fallback Video (optional)', YENDIF_PLAYER_PLUGIN_SLUG ); ?></th> <td> <?php echo Yendif_Player_Admin_Functions::uploader( 'fallback', YENDIF_PLAYER_PLUGIN_SLUG, 'video' ); ?> <p class="yendif-player-description"> <?php _e( 'MP4 | M4V | FLV | M3U8 formats', YENDIF_PLAYER_PLUGIN_SLUG ); ?> </p> <p class="yendif-player-description"> <?php _e( "It's always recommended using <strong>Mp4</strong> as it gives a complete cross browser support with the aid of Flash. This makes your video playable anywhere.", YENDIF_PLAYER_PLUGIN_SLUG ); ?> </p> </td> </tr> <tr valign="top" id="yendif-player-row-mp4"> <th scope="row"><?php _e( 'MP4 | M4V | FLV', YENDIF_PLAYER_PLUGIN_SLUG ); ?></th> <td> <?php echo Yendif_Player_Admin_Functions::uploader( 'mp4', YENDIF_PLAYER_PLUGIN_SLUG, 'video', '', 'required ' ); ?> <p class="yendif-player-description"> <?php _e( "It's always recommended using <strong>Mp4</strong> as it gives a complete cross browser support with the aid of Flash. This makes your video playable anywhere.", YENDIF_PLAYER_PLUGIN_SLUG ); ?> </p> </td> </tr> <tr valign="top" id="yendif-player-row-webm"> <th scope="row"><?php _e( 'WEBM (optional)', YENDIF_PLAYER_PLUGIN_SLUG ); ?></th> <td><?php echo Yendif_Player_Admin_Functions::uploader( 'webm', YENDIF_PLAYER_PLUGIN_SLUG, 'video' ); ?></td> </tr> <tr valign="top" id="yendif-player-row-mp3"> <th scope="row"><?php _e( 'MP3', YENDIF_PLAYER_PLUGIN_SLUG ); ?></th> <td><?php echo Yendif_Player_Admin_Functions::uploader( 'mp3', YENDIF_PLAYER_PLUGIN_SLUG, 'audio', '', 'required ' ); ?></td> </tr> <tr valign="top" id="yendif-player-row-wav"> <th scope="row"><?php _e( 'WAV (optional)', YENDIF_PLAYER_PLUGIN_SLUG ); ?></th> <td><?php echo Yendif_Player_Admin_Functions::uploader( 'wav', YENDIF_PLAYER_PLUGIN_SLUG, 'audio' ); ?></td> </tr> <tr valign="top" id="yendif-player-row-ogg"> <th scope="row"><?php _e( 'OGG (optional)', YENDIF_PLAYER_PLUGIN_SLUG ); ?></th> <td><?php echo Yendif_Player_Admin_Functions::uploader( 'ogg', YENDIF_PLAYER_PLUGIN_SLUG, 'ogg' ); ?></td> </tr> <tr valign="top"> <th scope="row"><?php _e( 'Poster (optional)', YENDIF_PLAYER_PLUGIN_SLUG ); ?></th> <td><?php echo Yendif_Player_Admin_Functions::uploader( 'poster', YENDIF_PLAYER_PLUGIN_SLUG, 'image' ); ?></td> </tr> <tr valign="top" id="yendif-player-row-vtt"> <th scope="row"><?php _e( 'Subtitle (optional)', YENDIF_PLAYER_PLUGIN_SLUG ); ?></th> <td><?php echo Yendif_Player_Admin_Functions::uploader( 'captions', YENDIF_PLAYER_PLUGIN_SLUG, 'text' ); ?></td> </tr> <tr valign="top"> <th scope="row"><?php _e( 'Duration (optional)', YENDIF_PLAYER_PLUGIN_SLUG ); ?></th> <td> <input type="text" name="duration" id="duration" class="yendif-player-small yendif-player-center" placeholder="00:00" /> <span class="yendif-player-description"> <?php _e( 'Duration of the media. Displayed only in playlists.', YENDIF_PLAYER_PLUGIN_SLUG ); ?> </span> </td> </tr> <tr valign="top" id="yendif-player-row-views"> <th scope="row"><?php _e( 'Views count', YENDIF_PLAYER_PLUGIN_SLUG ); ?></th> <td> <input type="text" name="views" id="views" class="yendif-player-small yendif-player-center" /> <span class="yendif-player-description"> <?php _e( 'numbers', YENDIF_PLAYER_PLUGIN_SLUG ); ?> </span> </td> </tr> </table> </div> <div class="yendif-player-box"> <div class="yendif-player-box-header"> <?php _e( 'Description', YENDIF_PLAYER_PLUGIN_SLUG ); ?> </div> <div class="yendif-player-box-content"> <div class="yendif-player-box-inner"> <textarea id="description" name="description"></textarea> </div> </div> </div> </div> <div class="yendif-player-right-content"> <div class="yendif-player-box"> <div class="yendif-player-box-header"> <?php _e( 'Status', YENDIF_PLAYER_PLUGIN_SLUG ); ?> </div> <div class="yendif-player-box-content"> <div class="yendif-player-box-inner"> <label class="yendif-player-featured yendif-player-block" for="yendif-player-featured"> <input type="checkbox" id="yendif-player-featured" name="featured" value="1"> <span><?php _e( 'Featured', YENDIF_PLAYER_PLUGIN_SLUG ); ?></span> </label> <label class="yendif-player-published yendif-player-block" for="yendif-player-published"> <input type="checkbox" id="yendif-player-published" name="published" value="1" checked="checked"> <span><?php _e( 'Published', YENDIF_PLAYER_PLUGIN_SLUG ); ?></span> </label> <input type="submit" name="submit" id="submit" class="button button-primary" value="<?php _e( 'Save New Media', YENDIF_PLAYER_PLUGIN_SLUG ) ;?>"> </div> </div> </div> <div class="yendif-player-box"> <div class="yendif-player-box-header"> <?php _e( 'Playlists', YENDIF_PLAYER_PLUGIN_SLUG ); ?> </div> <div class="yendif-player-box-content"> <div class="yendif-player-box-inner"> <?php echo Yendif_Player_Admin_Functions::playlists(); ?> </div> </div> </div> </div> <input type="hidden" name="post_id" id="post_id" value="0"> </form></div> نقل قول لینک به ارسال
imanfakhar 26231 ارسال شده در آذر 94 گزارش بازنشر ارسال شده در آذر 94 این کدهاتون اصلا پست تایپ خاصی توش معرفی نشده یا لا اقل من ندیدم باید فایل اکشن فرم رو برای پست تایپ چک کنید به هر حال وقتی پست تایپ مورد نظرتون رو پیدا کردید توی کدی که عرض شد بگردید دنبال 'post_type' => array('post'),و تغییرش بدید به (با فرض اینکه اسم پست تایپتون player باشه 'post_type' => array('post', 'player'), 1 نقل قول لینک به ارسال
Monica 322 ارسال شده در آذر 94 مالک گزارش بازنشر ارسال شده در آذر 94 (ویرایش شده) این کدهاتون اصلا پست تایپ خاصی توش معرفی نشده یا لا اقل من ندیدم باید فایل اکشن فرم رو برای پست تایپ چک کنید به هر حال وقتی پست تایپ مورد نظرتون رو پیدا کردید توی کدی که عرض شد بگردید دنبال'post_type' => array('post'),و تغییرش بدید به (با فرض اینکه اسم پست تایپتون player باشه'post_type' => array('post', 'player'),ضمن عرض سلام و تشکر از شماببینید من میخوام وقتی میخوام ویدیو جدید add کنم بتونم برای ویدیو برچسب تعین کنم ، کدهای بالا که دادم واسه بخش add ویدیو هست ، معرفی پست تایپ به شرح.زیر میباشد <?phpclass Yendif_Player_Functions {/*** Constructor of this class.** @since 1.2.0*/private function __construct() {}/*** Register custom post types.** @since 1.2.0*/public static function register_custom_post_types() {// Register custom post type for video page.$args = array('labels' => array('name' => _x( 'Yendif Video', 'post type general name', YENDIF_PLAYER_PLUGIN_SLUG ),'singular_name' => _x( 'Video Item', 'post type singular name', YENDIF_PLAYER_PLUGIN_SLUG ),'add_new' => _x( 'Add New', 'video item', YENDIF_PLAYER_PLUGIN_SLUG ),'add_new_item' => __( 'Add New Video Item', YENDIF_PLAYER_PLUGIN_SLUG ),'new_item' => __( 'New Video Item', YENDIF_PLAYER_PLUGIN_SLUG ),'edit_item' => __( 'Edit Video Item', YENDIF_PLAYER_PLUGIN_SLUG ),'view_item' => __( 'View Video Item', YENDIF_PLAYER_PLUGIN_SLUG ),'search_items' => __( 'Search Video', YENDIF_PLAYER_PLUGIN_SLUG ),'not_found' => __( 'No videos found.', YENDIF_PLAYER_PLUGIN_SLUG ),'not_found_in_trash' => __( 'No videos found in Trash.', YENDIF_PLAYER_PLUGIN_SLUG ),'parent_item_colon' => ''),'public' => true,'publicly_queryable' => true,'show_ui' => false,'query_var' => true,'rewrite' => true,'capability_type' => 'post','hierarchical' => false,'menu_position' => null,'supports' => array( 'title', 'editor', 'thumbnail', 'comments' ));register_post_type( 'videopage', $args );// Register custom post type for playlist page.$args = array('labels' => array('name' => _x( 'Yendif Video Playlist', 'post type general name', YENDIF_PLAYER_PLUGIN_SLUG ),'singular_name' => _x( 'Video Playlist Item', 'post type singular name', YENDIF_PLAYER_PLUGIN_SLUG ),'add_new' => _x( 'Add New Playlist', 'video item', YENDIF_PLAYER_PLUGIN_SLUG ),'add_new_item' => __( 'Add New Playlist Item', YENDIF_PLAYER_PLUGIN_SLUG ),'new_item' => __( 'New Playlist Item', YENDIF_PLAYER_PLUGIN_SLUG ),'edit_item' => __( 'Edit Playlist Item', YENDIF_PLAYER_PLUGIN_SLUG ),'view_item' => __( 'View Playlist Item', YENDIF_PLAYER_PLUGIN_SLUG ),'search_items' => __( 'Search Playlist', YENDIF_PLAYER_PLUGIN_SLUG ),'not_found' => __( 'No playlists found.', YENDIF_PLAYER_PLUGIN_SLUG ),'not_found_in_trash' => __( 'No playlists found in Trash.', YENDIF_PLAYER_PLUGIN_SLUG ),'parent_item_colon' => ''),'public' => true,'publicly_queryable' => true,'show_ui' => false,'query_var' => true,'rewrite' => true,'capability_type' => 'post','hierarchical' => false,'menu_position' => null,'supports' => array( 'title', 'editor', 'thumbnail', 'comments' ));register_post_type( 'videoplaylist', $args );}/*** Register yendif player widgets.** @since 1.2.0*/public static function register_widgets() {require_once( YENDIF_PLAYER_PLUGIN_DIR . 'widgets/videos/widget.php' );register_widget( 'Yendif_Videos_Widget' );require_once( YENDIF_PLAYER_PLUGIN_DIR . 'widgets/latest-videos/widget.php' );register_widget( 'Yendif_Latest_Videos_Widget' );require_once( YENDIF_PLAYER_PLUGIN_DIR . 'widgets/popular-videos/widget.php' );register_widget( 'Yendif_Popular_Videos_Widget' );require_once( YENDIF_PLAYER_PLUGIN_DIR . 'widgets/featured-videos/widget.php' );register_widget( 'Yendif_Featured_Videos_Widget' );require_once( YENDIF_PLAYER_PLUGIN_DIR . 'widgets/related-videos/widget.php' );register_widget( 'Yendif_Related_Videos_Widget' );}/*** Trim the input content** @since 1.2.0** @return string Trimmed content*/public static function Truncate( $text, $length = 0 ) {$text = strip_tags($text); if ($length > 0 && strlen($text) > $length) { $tmp = substr($text, 0, $length); $tmp = substr($tmp, 0, strrpos($tmp, ' ')); if (strlen($tmp) >= $length - 3) { $tmp = substr($tmp, 0, strrpos($tmp, ' ')); } $text = $tmp.'...'; } return $text;}}و فانکشن ادمین بشرح زیر<?phpclass Yendif_Player_Admin_Functions {/** * Constructor of this class. * * @since 1.0.0 */private function __construct() {}/** * An utility function that create a radio button group. * * @since 1.0.0 * * @return string Text or HTML that create a radio button group */public static function radio( $name, $buttons, $values, $value ) { $html = ''; $count = count( $buttons ); for ( $i = 0; $i < $count; $i++ ) { $_value = $values[$i]; $checked = ( $_value == $value ) ? 'checked' : ''; $html .= '<label class="yendif-player-radio" for="' . ( $name . '-' . $_value ). '">'; $html .= '<input type="radio" name="' . $name . '" class="yendif-player-' . $name . '" id="' . ( $name . '-' . $_value ) . '" value="' . $_value . '" ' . $checked . ' />'; $html .= '<span>' . $buttons[$i] . '</span></label>'; } return $html;}/** * An utility function that create a boolean button group. * * @since 1.0.0 * * @return string Text or HTML that create a radio button group */public static function radioBool( $name, $value, $plugin_slug = 'yendif-player' ) { $buttons = array( __( 'Yes', $plugin_slug ), __( 'No', $plugin_slug ) ); $values = array( 1, 0 ); $html = ''; $count = count( $buttons ); for ( $i = 0; $i < 2; $i++ ) { $_value = $values[$i]; $checked = ( $_value == $value ) ? 'checked' : ''; $html .= '<label class="yendif-player-radio" for="' . ( $name . '-' . $_value ). '">'; $html .= '<input type="radio" name="' . $name . '" class="yendif-player-' . $name . '" id="' . ( $name . '-' . $_value ) . '" value="' . $_value . '" ' . $checked . ' />'; $html .= '<span>' . $buttons[$i] . '</span></label>'; } return $html;}/** * An utility function that create a media uploader. * * @since 1.0.0 * * @return string Text or HTML that create a file uploader */public static function uploader( $name, $plugin_slug = 'yendif-player', $library = 'image', $value = '', $required = '' ) { $_name = 'type-' . $name; $html = '<div class="yendif-player-media-uploader">'; $html .= '<label class="yendif-player-radio" for="type-' . $name . '-1">'; $html .= '<input type="radio" name="type-' . $name . '" class="yendif-player-type" id="type-' . $name . '-1" value="1" />'; $html .= '<span>' . __( 'Direct URL', $plugin_slug ) . '</span></label>'; $html .= '<label class="yendif-player-radio" for="type-' . $name . '-0">'; $html .= '<input type="radio" name="type-' . $name . '" class="yendif-player-type" id="type-' . $name . '-0" value="0" checked />'; $html .= '<span>' . __( 'Use Media Uploader', $plugin_slug ) . '</span></label>'; $html .= '<br />'; $html .= '<input type="text" name="' . $name . '" class="' . $required . 'yendif-player-wide" id="' . $name . '" value="' . $value . '" />'; $html .= '<input type="button" class="button yendif-player-upload-button" name="upload_' . $name . '_button" id="upload_' . $name . '_button" data-yendif-player-attachment="' . $name . '" data-yendif-player-frame-library="' . $library . '" value="' . __( 'Upload Media', $plugin_slug ) . '" />'; $html .= '</div>'; return $html;}/** * Create checkboxes for playlists. * * @since 1.0.0 * * @return string Text or HTML that create playlists multi checkbox */public static function playlists( $values = '' ) { global $wpdb; $table = $wpdb->prefix . 'yendif_player_playlists'; $sql = "SELECT * FROM $table WHERE published = 1"; $items = $wpdb->get_results( $sql ); $_values = explode( ' ', trim( $values ) ); $html = ''; foreach ( $items as $item ) { $checked = in_array( $item->id, $_values ) ? ' checked' : ''; $html .= '<label class="yendif-player-playlist-label" for="playlist_' . $item->name . '">'; $html .= '<input type="checkbox" id="playlist_' . $item->name . '" name="playlists[]" value="' . $item->id . '" ' . $checked . '/>'; $html .= '<span>' . $item->name . '</span></label>'; } return $html;}/** * Clean slashes in string. * * @since 1.2.0 * * @return string Cleaned string output */public static function no_magic_quotes( $text = '' ) { $data = explode( "\\", $text ); $cleaned = implode( "", $data ); return $cleaned;}} ویرایش شده آذر 94 توسط نازنین 123 نقل قول لینک به ارسال
imanfakhar 26231 ارسال شده در آذر 94 گزارش بازنشر ارسال شده در آذر 94 اسم پست تایپتون videopage و باقی موارد رو هم که قبلا عرض شدو اگر ببینید من میخوام وقتی میخوام ویدیو جدید add کنم بتونم برای ویدیو برچسب تعین کنم ، کدهای بالا که دادم واسه بخش add ویدیو هست ، معرفی پست تایپ به شرح.زیر میباشدیک سئوال تازه است تایپیک جدید باید براش بزنید با توجه به مجموعه تایپیکهای اخیرتون به شدت توصیه می کنم قالبتون رو به یک برنامه نویس برای تکمیل و ویرایش بسپرید اغلب کدهایی که دارید به نظرم به نوعی به هم زنجیر شده اند و این اصلا خوب نیست که بخشیش رو با افزونه بسازید و بخشی رو با کد نویسی یا از ده ها تابع برای کارتون استفاده کنید صحیح ترش این بود که یک کلاس کامل شامل تمام امکانات مورد نیاز براتون نوشته بشه 1 نقل قول لینک به ارسال
setareh.h81 1 ارسال شده در آذر 94 گزارش بازنشر ارسال شده در آذر 94 از افزونه استفاده کنید https://wordpress.org/plugins/network-posts-extended/ https://wordpress.org/plugins/multisite-posts/ با تشکریه خورده شخصی سازی حلقه پست ها تور این افزونه ها سخته روش کار کردم ولی قشنگ از آب در نیومدکوئری خاصی نیست که این کارو انجام بده؟اگر بشه با کد این کارو بکنم فکر کنم قشنگتر بشهممنون از جوابتونالبته آقای فخار و نازنین خانوم ببخشید تو تاپیک شما سوال پرسیدماولش یه جورایی مرتبط بود ! اگه فکر میکنی باید یه تاپیک جدا بزنم بگین ؟ نقل قول لینک به ارسال
پست های پیشنهاد شده
به گفتگو بپیوندید
هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .