Changeset 3751 for trunk/bp-core/bp-core-templatetags.php
- Timestamp:
- 01/20/2011 03:56:04 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-templatetags.php
r3749 r3751 390 390 391 391 if ( !empty( $update['id'] ) ) 392 $update_content .= ' · <a href="' . $bp->root_domain . '/' . BP_ACTIVITY_SLUG. '/p/' . $update['id'] . '">' . __( 'View', 'buddypress' ) . '</a>';392 $update_content .= ' · <a href="' . $bp->root_domain . '/' . $bp->activity->root_slug . '/p/' . $update['id'] . '">' . __( 'View', 'buddypress' ) . '</a>'; 393 393 394 394 return apply_filters( 'bp_get_member_latest_update', $update_content ); … … 1774 1774 } 1775 1775 1776 function bp_is_page( $page) {1776 function bp_is_page( $page ) { 1777 1777 global $bp; 1778 1778 … … 1796 1796 1797 1797 function bp_is_profile_component() { 1798 if ( bp_is_current_component( BP_XPROFILE_SLUG) )1798 if ( bp_is_current_component( 'xprofile' ) ) 1799 1799 return true; 1800 1800 … … 1803 1803 1804 1804 function bp_is_activity_component() { 1805 if ( defined( 'BP_ACTIVITY_SLUG' ) && bp_is_current_component( BP_ACTIVITY_SLUG) )1805 if ( bp_is_current_component( 'activity' ) ) 1806 1806 return true; 1807 1807 … … 1810 1810 1811 1811 function bp_is_blogs_component() { 1812 if ( is_multisite() && defined( 'BP_BLOGS_SLUG' ) && bp_is_current_component( BP_BLOGS_SLUG) )1812 if ( is_multisite() && bp_is_current_component( 'blogs' ) ) 1813 1813 return true; 1814 1814 … … 1817 1817 1818 1818 function bp_is_messages_component() { 1819 if ( defined( 'BP_MESSAGES_SLUG' ) && bp_is_current_component( BP_MESSAGES_SLUG) )1819 if ( bp_is_current_component( 'messages' ) ) 1820 1820 return true; 1821 1821 … … 1824 1824 1825 1825 function bp_is_friends_component() { 1826 if ( defined( 'BP_FRIENDS_SLUG' ) && bp_is_current_component( BP_FRIENDS_SLUG ) ) 1826 1827 if ( bp_is_current_component( 'friends' ) ) 1827 1828 return true; 1828 1829 … … 1831 1832 1832 1833 function bp_is_groups_component() { 1833 if ( defined( 'BP_GROUPS_SLUG' ) && bp_is_current_component( BP_GROUPS_SLUG) )1834 if ( bp_is_current_component( 'groups' ) ) 1834 1835 return true; 1835 1836 … … 1838 1839 1839 1840 function bp_is_settings_component() { 1840 if ( bp_is_current_component( BP_SETTINGS_SLUG) )1841 if ( bp_is_current_component( 'settings' ) ) 1841 1842 return true; 1842 1843 … … 1856 1857 global $bp; 1857 1858 1858 if ( !empty( $bp->activity->slug ) && bp_is_current_component( $bp->activity->slug) )1859 if ( bp_is_current_component( 'activity' ) ) 1859 1860 return true; 1860 1861 … … 1865 1866 global $bp; 1866 1867 1867 if ( !empty( $bp->activity->slug ) && bp_is_current_component( $bp->activity->slug) && 'my-friends' == $bp->current_action )1868 if ( bp_is_current_component( 'activity' ) && 'my-friends' == $bp->current_action ) 1868 1869 return true; 1869 1870 … … 1874 1875 global $bp; 1875 1876 1876 if ( defined( 'BP_ACTIVITY_SLUG' ) && bp_is_current_component( BP_ACTIVITY_SLUG) && is_numeric( $bp->current_action ) )1877 if ( bp_is_current_component( 'activity' ) && is_numeric( $bp->current_action ) ) 1877 1878 return true; 1878 1879 … … 1883 1884 global $bp; 1884 1885 1885 if ( defined( 'BP_XPROFILE_SLUG' ) && bp_is_current_component( BP_XPROFILE_SLUG ) || isset( $bp->core->profile->slug ) && bp_is_current_component( $bp->core->profile->slug) )1886 if ( bp_is_current_component( 'xprofile' ) ) 1886 1887 return true; 1887 1888 … … 1892 1893 global $bp; 1893 1894 1894 if ( defined( 'BP_XPROFILE_SLUG' ) && bp_is_current_component( BP_XPROFILE_SLUG) && 'edit' == $bp->current_action )1895 if ( bp_is_current_component( 'xprofile' ) && 'edit' == $bp->current_action ) 1895 1896 return true; 1896 1897 … … 1901 1902 global $bp; 1902 1903 1903 if ( defined( 'BP_XPROFILE_SLUG' ) && bp_is_current_component( BP_XPROFILE_SLUG) && 'change-avatar' == $bp->current_action )1904 if ( bp_is_current_component( 'xprofile' ) && 'change-avatar' == $bp->current_action ) 1904 1905 return true; 1905 1906 … … 1910 1911 global $bp; 1911 1912 1912 if ( defined( 'BP_GROUPS_SLUG' ) && bp_is_current_component( BP_GROUPS_SLUG) )1913 if ( bp_is_current_component( 'groups' ) ) 1913 1914 return true; 1914 1915 … … 1919 1920 global $bp; 1920 1921 1921 if ( defined( 'BP_GROUPS_SLUG' ) && bp_is_current_component( BP_GROUPS_SLUG) && isset( $bp->groups->current_group ) && $bp->groups->current_group )1922 if ( bp_is_current_component( 'groups' ) && isset( $bp->groups->current_group ) && $bp->groups->current_group ) 1922 1923 return true; 1923 1924 … … 1928 1929 global $bp; 1929 1930 1930 if ( defined( 'BP_GROUPS_SLUG' ) && bp_is_current_component( BP_GROUPS_SLUG) && $bp->is_single_item && ( !$bp->current_action || 'home' == $bp->current_action ) )1931 if ( bp_is_current_component( 'groups' ) && $bp->is_single_item && ( !$bp->current_action || 'home' == $bp->current_action ) ) 1931 1932 return true; 1932 1933 … … 1937 1938 global $bp; 1938 1939 1939 if ( defined( 'BP_GROUPS_SLUG' ) && bp_is_current_component( BP_GROUPS_SLUG) && 'create' == $bp->current_action )1940 if ( bp_is_current_component( 'groups' ) && 'create' == $bp->current_action ) 1940 1941 return true; 1941 1942 … … 1947 1948 global $bp; 1948 1949 1949 if ( defined( 'BP_GROUPS_SLUG' ) && bp_is_current_component( BP_GROUPS_SLUG) && $bp->is_single_item && 'admin' == $bp->current_action )1950 if ( bp_is_current_component( 'groups' ) && $bp->is_single_item && 'admin' == $bp->current_action ) 1950 1951 return true; 1951 1952 … … 1956 1957 global $bp; 1957 1958 1958 if ( defined( 'BP_GROUPS_SLUG' ) && bp_is_current_component( BP_GROUPS_SLUG) && $bp->is_single_item && 'forum' == $bp->current_action )1959 if ( bp_is_current_component( 'groups' ) && $bp->is_single_item && 'forum' == $bp->current_action ) 1959 1960 return true; 1960 1961 … … 1965 1966 global $bp; 1966 1967 1967 if ( defined( 'BP_GROUPS_SLUG' ) && bp_is_current_component( BP_GROUPS_SLUG) && $bp->is_single_item && 'activity' == $bp->current_action )1968 if ( bp_is_current_component( 'groups' ) && $bp->is_single_item && 'activity' == $bp->current_action ) 1968 1969 return true; 1969 1970 … … 1974 1975 global $bp; 1975 1976 1976 if ( defined( 'BP_GROUPS_SLUG' ) && bp_is_current_component( BP_GROUPS_SLUG) && $bp->is_single_item && 'forum' == $bp->current_action && isset( $bp->action_variables[0] ) && 'topic' == $bp->action_variables[0] )1977 if ( bp_is_current_component( 'groups' ) && $bp->is_single_item && 'forum' == $bp->current_action && isset( $bp->action_variables[0] ) && 'topic' == $bp->action_variables[0] ) 1977 1978 return true; 1978 1979 … … 1983 1984 global $bp; 1984 1985 1985 if ( defined( 'BP_GROUPS_SLUG' ) && bp_is_current_component( BP_GROUPS_SLUG) && $bp->is_single_item && 'forum' == $bp->current_action && isset( $bp->action_variables[0] ) && 'topic' == $bp->action_variables[0] && isset( $bp->action_variables[2] ) && 'edit' == $bp->action_variables[2] )1986 if ( bp_is_current_component( 'groups' ) && $bp->is_single_item && 'forum' == $bp->current_action && isset( $bp->action_variables[0] ) && 'topic' == $bp->action_variables[0] && isset( $bp->action_variables[2] ) && 'edit' == $bp->action_variables[2] ) 1986 1987 return true; 1987 1988 … … 1992 1993 global $bp; 1993 1994 1994 if ( defined( 'BP_GROUPS_SLUG' ) && bp_is_current_component( BP_GROUPS_SLUG) && $bp->is_single_item && 'members' == $bp->current_action )1995 if ( bp_is_current_component( 'groups' ) && $bp->is_single_item && 'members' == $bp->current_action ) 1995 1996 return true; 1996 1997 … … 2001 2002 global $bp; 2002 2003 2003 if ( defined( 'BP_GROUPS_SLUG' ) && bp_is_current_component( BP_GROUPS_SLUG) && 'send-invites' == $bp->current_action )2004 if ( bp_is_current_component( 'groups' ) && 'send-invites' == $bp->current_action ) 2004 2005 return true; 2005 2006 … … 2010 2011 global $bp; 2011 2012 2012 if ( defined( 'BP_GROUPS_SLUG' ) && bp_is_current_component( BP_GROUPS_SLUG) && 'request-membership' == $bp->current_action )2013 if ( bp_is_current_component( 'groups' ) && 'request-membership' == $bp->current_action ) 2013 2014 return true; 2014 2015 … … 2019 2020 global $bp; 2020 2021 2021 if ( defined( 'BP_GROUPS_SLUG' ) && bp_is_current_component( BP_GROUPS_SLUG) && $bp->is_single_item && 'leave-group' == $bp->current_action )2022 if ( bp_is_current_component( 'groups' ) && $bp->is_single_item && 'leave-group' == $bp->current_action ) 2022 2023 return true; 2023 2024 … … 2028 2029 global $bp; 2029 2030 2030 if ( defined( 'BP_GROUPS_SLUG' ) && bp_is_current_component( BP_GROUPS_SLUG) && $bp->is_single_item )2031 if ( bp_is_current_component( 'groups' ) && $bp->is_single_item ) 2031 2032 return true; 2032 2033 … … 2037 2038 global $bp; 2038 2039 2039 if ( is_multisite() && defined( 'BP_BLOGS_SLUG' ) && bp_is_current_component( BP_BLOGS_SLUG) )2040 if ( is_multisite() && bp_is_current_component( 'blogs' ) ) 2040 2041 return true; 2041 2042 … … 2046 2047 global $bp; 2047 2048 2048 if ( is_multisite() && defined( 'BP_BLOGS_SLUG' ) && bp_is_current_component( BP_BLOGS_SLUG) && 'recent-posts' == $bp->current_action )2049 if ( is_multisite() && bp_is_current_component( 'blogs' ) && 'recent-posts' == $bp->current_action ) 2049 2050 return true; 2050 2051 … … 2055 2056 global $bp; 2056 2057 2057 if ( is_multisite() && defined( 'BP_BLOGS_SLUG' ) && bp_is_current_component( BP_BLOGS_SLUG) && 'recent-comments' == $bp->current_action )2058 if ( is_multisite() && bp_is_current_component( 'blogs' ) && 'recent-comments' == $bp->current_action ) 2058 2059 return true; 2059 2060 … … 2064 2065 global $bp; 2065 2066 2066 if ( is_multisite() && defined( 'BP_BLOGS_SLUG' ) && bp_is_current_component( BP_BLOGS_SLUG) && 'create' == $bp->current_action )2067 if ( is_multisite() && bp_is_current_component( 'blogs' ) && 'create' == $bp->current_action ) 2067 2068 return true; 2068 2069 … … 2071 2072 2072 2073 function bp_is_user_friends() { 2073 if ( defined( 'BP_FRIENDS_SLUG' ) && bp_is_current_component( BP_FRIENDS_SLUG ) ) 2074 2075 if ( bp_is_current_component( 'friends' ) ) 2074 2076 return true; 2075 2077 … … 2080 2082 global $bp; 2081 2083 2082 if ( defined( 'BP_FRIENDS_SLUG' ) && bp_is_current_component( BP_FRIENDS_SLUG) && 'requests' == $bp->current_action )2084 if ( bp_is_current_component( 'friends' ) && 'requests' == $bp->current_action ) 2083 2085 return true; 2084 2086 … … 2087 2089 2088 2090 function bp_is_user_messages() { 2089 if ( defined( 'BP_MESSAGES_SLUG' ) && bp_is_current_component( BP_MESSAGES_SLUG ) ) 2091 2092 if ( bp_is_current_component( 'messages' ) ) 2090 2093 return true; 2091 2094 … … 2096 2099 global $bp; 2097 2100 2098 if ( defined( 'BP_MESSAGES_SLUG' ) && bp_is_current_component( BP_MESSAGES_SLUG) && ( !$bp->current_action || 'inbox' == $bp->current_action ) )2101 if ( bp_is_current_component( 'messages' ) && ( !$bp->current_action || 'inbox' == $bp->current_action ) ) 2099 2102 return true; 2100 2103 … … 2105 2108 global $bp; 2106 2109 2107 if ( defined( 'BP_MESSAGES_SLUG' ) && bp_is_current_component( BP_MESSAGES_SLUG) && 'sentbox' == $bp->current_action )2110 if ( bp_is_current_component( 'messages' ) && 'sentbox' == $bp->current_action ) 2108 2111 return true; 2109 2112 … … 2115 2118 global $bp; 2116 2119 2117 if ( defined( 'BP_MESSAGES_SLUG' ) && bp_is_current_component( BP_MESSAGES_SLUG) && 'notices' == $bp->current_action )2120 if ( bp_is_current_component( 'messages' ) && 'notices' == $bp->current_action ) 2118 2121 return true; 2119 2122 … … 2125 2128 global $bp; 2126 2129 2127 if ( defined( 'BP_MESSAGES_SLUG' ) && bp_is_current_component( BP_MESSAGES_SLUG) && 'compose' == $bp->current_action )2130 if ( bp_is_current_component( 'messages' ) && 'compose' == $bp->current_action ) 2128 2131 return true; 2129 2132 … … 2141 2144 2142 2145 function bp_is_activation_page() { 2143 if ( bp_is_current_component( BP_ACTIVATION_SLUG) )2146 if ( bp_is_current_component( 'activation' ) ) 2144 2147 return true; 2145 2148 … … 2148 2151 2149 2152 function bp_is_register_page() { 2150 if ( bp_is_current_component( BP_REGISTER_SLUG) )2153 if ( bp_is_current_component( 'register' ) ) 2151 2154 return true; 2152 2155
Note: See TracChangeset
for help on using the changeset viewer.