Создать ответ 
 
Рейтинг темы:
  • Голосов: 93 - Средняя оценка: 1.53
  • 1
  • 2
  • 3
  • 4
  • 5
Шпаргалки, мануалы по WordPress и WordPress MU
Автор Сообщение
CyberMax Не на форуме
Member
***

Сообщений: 52
Зарегистрирован: 08-07-2008
Рейтинг: 1
Сообщение: #3
Шпаргалка по функциям WordPress MU
Небольшая шпаргалка по функциям WordPress MU:

WordPress MU Function List

If I’ve been surprised by the sheer lack of documentation in WordPress and especially in WordPress MU, I’ve been equally astounded to find how many really useful functions come native to the software that so few plugins actually employ. This is particularly true of MU plugins, and I’ve seen many a plugin dance around to perform a task which it now appears could as easily been done with one function from the wpmu-functions.php file. I’ve also written a fair number of plugins that suffer from this same lack of knowledge.

So, I GREP’ed the file to get a list of functions, which I then reordered and have displayed on this page. As I learn about those functions, I will update this page with links to discussions of them within posts. They are listed here more or less as the GREP results came out. That gives you the name and the expected parameters for each function, and since the names are fairly intuitive, experienced plugin writers should have no problem referencing them within wpmu-functions.php and figuring it out for themselves.

I reordered them to give them a bit of organization, preferring to group them according to broad-strokes User, Blog, Site and Navigation functions.

–== Site Functions ==–

load_muplugin_textdomain($domain, $path = false)
wpmu_update_blogs_date()
wpmu_checkAvailableSpace($action)
get_sitestats()
get_site_option( $key, $default = false, $use_cache = true )
add_site_option( $key, $value )
update_site_option( $key, $value )
get_last_updated( $display = false )
get_most_active_blogs( $num = 10, $display = true )
get_blog_list( $start = 0, $num = 10, $display = true )
domain_exists($domain, $path, $site_id = 1)
get_current_site()

–== Blog Functions ==–

get_blogaddress_by_id( $blog_id )
get_blogaddress_by_name( $blogname )
get_blogaddress_by_domain( $domain, $path )
get_blog_details( $id, $all = true )
refresh_blog_details( $id )
get_blog_option( $blog_id, $setting, $default=’na’ )
add_blog_option( $id, $key, $value )
delete_blog_option( $id, $key )
update_blog_option( $id, $key, $value, $refresh = true )
is_archived( $id )
update_archived( $id, $archived )
update_blog_status( $id, $pref, $value, $refresh = 1 )
get_blog_status( $id, $pref )
get_blog_count( $id = 0 )
get_blog_post( $blog_id, $post_id )
insert_blog($domain, $path, $site_id)
install_blog($blog_id, $blog_title = ”)
install_blog_defaults($blog_id, $user_id)
wpmu_signup_blog_notification($domain, $path, $title, $user, $user_email, $key, $meta = ”)
wpmu_create_blog($domain, $path, $title, $user_id, $meta = ”, $site_id = 1)
wpmu_validate_blog_signup($blog_id, $blog_title, $user = ”)
wpmu_signup_blog($domain, $path, $title, $user, $user_email, $meta = ”)
create_empty_blog( $domain, $path, $weblog_title, $site_id = 1 )
get_blog_permalink( $blog_id, $post_id )

–== User Functions ==–

get_admin_users_for_domain( $sitedomain = ”, $path = ” )
get_user_details( $username )
get_current_user_id()
is_site_admin( $user_login = false )
get_blogs_of_user( $id, $all = false )
get_active_blog_for_user( $user_id )
is_user_member_of_blog( $user_id, $blog_id = 0 )
add_user_to_blog( $blog_id, $user_id, $role )
remove_user_from_blog($user_id, $blog_id = ”)
is_blog_user( $blog_id = 0 )
get_user_id_from_string( $string )
wpmu_welcome_notification($blog_id, $user_id, $password, $title, $meta = ”)
wpmu_welcome_user_notification($user_id, $password, $meta = ”)
wpmu_signup_user_notification($user, $user_email, $key, $meta = ”)
wpmu_activate_signup($key)
generate_random_password()
wpmu_create_user( $user_name, $password, $email)
validate_email( $email, $check_domain = true)
is_email_address_unsafe( $user_email )
wpmu_validate_user_signup($user_name, $user_email)
wpmu_signup_user($user, $user_email, $meta = ”)

–== Navigation/Traversing Blogs ==–

switch_to_blog( $new_blog )
restore_current_blog()
wpmu_admin_do_redirect( $url = ” )
wpmu_admin_redirect_add_updated_param( $url = ” )
wpmu_admin_redirect_url()

Смотрите также сайт источник, там подробнее.

Мой архив, Реальная демократия, Супер проект "Небоход" - мне нравится Smile
07-09-2009 16:48
Найти все сообщения Цитировать это сообщение
Создать ответ 


Сообщения в этой теме
WordPress-Help-Sheet_RU - CyberMax - 07-09-2009, 13:30
Шпаргалка по функциям WordPress MU - CyberMax - 07-09-2009 16:48

Похожие темы
Тема: Автор Ответов: Просмотров: Посл. сообщение
  Обновление WordPress CyberMax 0 4,451 19-09-2012 14:22
Посл. сообщение: CyberMax
  Как создать опрос (голосование) на блоге WordPress Счастливчик 0 3,189 17-01-2011 13:36
Посл. сообщение: Счастливчик
  Установка WordPress на хостинг и первичная настройка – подробное руководство Счастливчик 0 4,346 15-01-2011 11:57
Посл. сообщение: Счастливчик
  Какие версии Wordpress MU и Buddypress совместимы? san40 34 34,852 25-10-2010 12:15
Посл. сообщение: Kolyan
  Публикация статей в WordPress без вывода их на главную и RSS ленту Счастливчик 0 3,502 30-09-2010 11:39
Посл. сообщение: Счастливчик
  Делаем собственное меню в WordPress 3.0 Счастливчик 0 3,340 24-09-2010 15:30
Посл. сообщение: Счастливчик
  Как вывести php код в сайдбаре WordPress Счастливчик 0 3,372 20-09-2010 22:37
Посл. сообщение: Счастливчик
Exclamation WordPress не устанавливается хоть в бд всё правильно сделел! maximus035 6 8,317 29-07-2010 13:34
Посл. сообщение: maximus035
  Free Wordpress Theme - SimplyText WP-skins 0 2,994 21-06-2010 14:20
Посл. сообщение: WP-skins
  Вышел WordPress 3.0 WP-skins 0 2,842 18-06-2010 09:21
Посл. сообщение: WP-skins



Пользователи просматривают эту тему: 1 Гость(ей)
Обратная связьSitesCo.ruВернуться к началуВернуться к содержимомуЛёгкий режимСписок RSS