Changeset 12930 for trunk/wp-admin/includes/plugin.php
- Timestamp:
- 02/02/2010 09:41:17 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/plugin.php
r12914 r12930 545 545 546 546 /** 547 * validate active plugins548 * 549 * validate all active plugins, deactivates invalid and550 * returns an array of deactiv ed ones.547 * Validate active plugins 548 * 549 * Validate all active plugins, deactivates invalid and 550 * returns an array of deactivated ones. 551 551 * 552 552 * @since unknown … … 555 555 function validate_active_plugins() { 556 556 $plugins = apply_filters( 'active_plugins', get_option( 'active_plugins', array() ) ); 557 558 557 // validate vartype: array 559 if ( !is_array( $plugins ) ) { 560 update_option('active_plugins', array()); 558 if ( ! is_array( $plugins ) ) { 559 update_option( 'active_plugins', array() ); 560 $plugins = array(); 561 } 562 563 if ( is_multisite() && is_super_admin() ) { 564 $network_plugins = (array) get_site_option( 'active_sitewide_plugins', array() ); 565 $plugins = array_merge( (array) $plugins, $network_plugins ); 566 } 567 568 if ( empty( $plugins ) ) 561 569 return; 562 }563 570 564 571 $invalid = array(); … … 660 667 /** 661 668 * Add a top level menu page 662 * 669 * 663 670 * This function takes a capability which will be used to determine whether 664 671 * or not a page is included in the menu. 665 * 672 * 666 673 * The function which is hooked in to handle the output of the page must check 667 674 * that the user has the required capability as well. 668 * 675 * 669 676 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected 670 677 * @param string $menu_title The text to be used for the menu … … 707 714 /** 708 715 * Add a top level menu page in the 'objects' section 709 * 716 * 710 717 * This function takes a capability which will be used to determine whether 711 718 * or not a page is included in the menu. 712 * 719 * 713 720 * The function which is hooked in to handle the output of the page must check 714 721 * that the user has the required capability as well. 715 * 722 * 716 723 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected 717 724 * @param string $menu_title The text to be used for the menu … … 731 738 /** 732 739 * Add a top level menu page in the 'utility' section 733 * 740 * 734 741 * This function takes a capability which will be used to determine whether 735 742 * or not a page is included in the menu. 736 * 743 * 737 744 * The function which is hooked in to handle the output of the page must check 738 745 * that the user has the required capability as well. 739 * 746 * 740 747 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected 741 748 * @param string $menu_title The text to be used for the menu … … 755 762 /** 756 763 * Add a sub menu page 757 * 764 * 758 765 * This function takes a capability which will be used to determine whether 759 766 * or not a page is included in the menu. 760 * 767 * 761 768 * The function which is hooked in to handle the output of the page must check 762 769 * that the user has the required capability as well. 763 * 770 * 764 771 * @param string $parent_slug The slug name for the parent menu (or the file name of a standard WordPress admin page) 765 772 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected … … 814 821 /** 815 822 * Add sub menu page to the tools main menu. 816 * 823 * 817 824 * This function takes a capability which will be used to determine whether 818 825 * or not a page is included in the menu. 819 * 826 * 820 827 * The function which is hooked in to handle the output of the page must check 821 828 * that the user has the required capability as well. 822 * 829 * 823 830 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected 824 831 * @param string $menu_title The text to be used for the menu … … 833 840 /** 834 841 * Add sub menu page to the options main menu. 835 * 842 * 836 843 * This function takes a capability which will be used to determine whether 837 844 * or not a page is included in the menu. 838 * 845 * 839 846 * The function which is hooked in to handle the output of the page must check 840 847 * that the user has the required capability as well. 841 * 848 * 842 849 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected 843 850 * @param string $menu_title The text to be used for the menu … … 852 859 /** 853 860 * Add sub menu page to the themes main menu. 854 * 861 * 855 862 * This function takes a capability which will be used to determine whether 856 863 * or not a page is included in the menu. 857 * 864 * 858 865 * The function which is hooked in to handle the output of the page must check 859 866 * that the user has the required capability as well. 860 * 867 * 861 868 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected 862 869 * @param string $menu_title The text to be used for the menu … … 871 878 /** 872 879 * Add sub menu page to the Users/Profile main menu. 873 * 880 * 874 881 * This function takes a capability which will be used to determine whether 875 882 * or not a page is included in the menu. 876 * 883 * 877 884 * The function which is hooked in to handle the output of the page must check 878 885 * that the user has the required capability as well. 879 * 886 * 880 887 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected 881 888 * @param string $menu_title The text to be used for the menu … … 893 900 /** 894 901 * Add sub menu page to the Dashboard main menu. 895 * 902 * 896 903 * This function takes a capability which will be used to determine whether 897 904 * or not a page is included in the menu. 898 * 905 * 899 906 * The function which is hooked in to handle the output of the page must check 900 907 * that the user has the required capability as well. 901 * 908 * 902 909 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected 903 910 * @param string $menu_title The text to be used for the menu … … 912 919 /** 913 920 * Add sub menu page to the posts main menu. 914 * 921 * 915 922 * This function takes a capability which will be used to determine whether 916 923 * or not a page is included in the menu. 917 * 924 * 918 925 * The function which is hooked in to handle the output of the page must check 919 926 * that the user has the required capability as well. 920 * 927 * 921 928 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected 922 929 * @param string $menu_title The text to be used for the menu … … 931 938 /** 932 939 * Add sub menu page to the media main menu. 933 * 940 * 934 941 * This function takes a capability which will be used to determine whether 935 942 * or not a page is included in the menu. 936 * 943 * 937 944 * The function which is hooked in to handle the output of the page must check 938 945 * that the user has the required capability as well. 939 * 946 * 940 947 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected 941 948 * @param string $menu_title The text to be used for the menu … … 950 957 /** 951 958 * Add sub menu page to the links main menu. 952 * 959 * 953 960 * This function takes a capability which will be used to determine whether 954 961 * or not a page is included in the menu. 955 * 962 * 956 963 * The function which is hooked in to handle the output of the page must check 957 964 * that the user has the required capability as well. 958 * 965 * 959 966 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected 960 967 * @param string $menu_title The text to be used for the menu … … 969 976 /** 970 977 * Add sub menu page to the pages main menu. 971 * 978 * 972 979 * This function takes a capability which will be used to determine whether 973 980 * or not a page is included in the menu. 974 * 981 * 975 982 * The function which is hooked in to handle the output of the page must check 976 983 * that the user has the required capability as well. 977 * 984 * 978 985 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected 979 986 * @param string $menu_title The text to be used for the menu … … 988 995 /** 989 996 * Add sub menu page to the comments main menu. 990 * 997 * 991 998 * This function takes a capability which will be used to determine whether 992 999 * or not a page is included in the menu. 993 * 1000 * 994 1001 * The function which is hooked in to handle the output of the page must check 995 1002 * that the user has the required capability as well. 996 * 1003 * 997 1004 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected 998 1005 * @param string $menu_title The text to be used for the menu
Note: See TracChangeset
for help on using the changeset viewer.