Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ai
noblogs-wp
Commits
c8fab4ac
Commit
c8fab4ac
authored
Aug 26, 2017
by
lucha
Browse files
[auto] plugin: buddypress 2.9.1
parent
d668b6dd
Changes
396
Show whitespace changes
Inline
Side-by-side
wp-content/plugins/buddypress/bp-activity/admin/css/admin-rtl.css
View file @
c8fab4ac
.akismet-status
{
float
:
left
;
}
.akismet-status
a
{
color
:
#
AAA
;
color
:
#
aaa
;
font-style
:
italic
;
}
.akismet-history
{
margin
:
13px
;
}
.akismet-history
div
{
margin-bottom
:
13px
;
}
.akismet-history
span
{
color
:
#999
;
}
...
...
@@ -18,36 +22,43 @@
#wp-bp-activities-wrap
{
padding
:
5px
0
;
}
#bp-activities
{
height
:
120px
;
}
#bp-replyhead
{
font-size
:
1em
;
line-height
:
1.4
em
;
line-height
:
1.4
;
margin
:
0
;
}
#bp-replysubmit
{
margin
:
0
;
padding
:
0
0
3px
;
text-align
:
center
;
}
#bp-replysubmit
.error
{
color
:
red
;
color
:
#f00
;
line-height
:
21px
;
text-align
:
center
;
vertical-align
:
center
;
}
#bp-replysubmit
img
.waiting
{
float
:
left
;
padding
:
4px
10px
0
;
vertical-align
:
top
;
}
#bp-activities-form
.column-response
img
{
float
:
right
;
margin-bottom
:
5px
;
margin-left
:
10px
;
margin-top
:
1px
;
}
.activity-errors
{
list-style-type
:
disc
;
margin-right
:
2em
;
...
...
@@ -57,30 +68,37 @@
#bp_activity_content
div
.inside
{
line-height
:
0
;
}
#bp_activity_action
h3
,
#bp_activity_content
h3
{
cursor
:
auto
;
}
#bp_activity_action
td
.mceIframeContainer
,
#bp_activity_content
td
.mceIframeContainer
{
background-color
:
white
;
background-color
:
#fff
;
}
#post-body
#bp-activities-action_resize
,
#post-body
#bp-activities-content_resize
{
position
:
inherit
;
margin-top
:
-2px
;
}
#bp_activity_link
input
{
width
:
99%
;
}
#bp-activities-primaryid
{
margin-bottom
:
1em
;
}
.column-action
{
width
:
12%
;
}
@media
screen
and
(
max-width
:
782px
)
{
body
.toplevel_page_bp-activity
.wp-list-table
tr
:not
(
.inline-edit-row
)
:not
(
.no-items
)
td
:not
(
.check-column
)
{
display
:
table-cell
;
}
...
...
wp-content/plugins/buddypress/bp-activity/admin/css/admin-rtl.min.css
View file @
c8fab4ac
.akismet-status
{
float
:
left
}
.akismet-status
a
{
color
:
#AAA
;
font-style
:
italic
}
.akismet-history
{
margin
:
13px
}
.akismet-history
div
{
margin-bottom
:
13px
}
.akismet-history
span
{
color
:
#999
}
#wp-bp-activities-wrap
{
padding
:
5px
0
}
#bp-activities
{
height
:
120px
}
#bp-replyhead
{
font-size
:
1em
;
line-height
:
1.4em
;
margin
:
0
}
#bp-replysubmit
{
margin
:
0
;
padding
:
0
0
3px
;
text-align
:
center
}
#bp-replysubmit
.error
{
color
:
red
;
line-height
:
21px
;
text-align
:
center
;
vertical-align
:
center
}
#bp-replysubmit
img
.waiting
{
float
:
left
;
padding
:
4px
10px
0
;
vertical-align
:
top
}
#bp-activities-form
.column-response
img
{
float
:
right
;
margin-bottom
:
5px
;
margin-left
:
10px
;
margin-top
:
1px
}
.activity-errors
{
list-style-type
:
disc
;
margin-right
:
2em
}
#bp_activity_action
div
.inside
,
#bp_activity_content
div
.inside
{
line-height
:
0
}
#bp_activity_action
h3
,
#bp_activity_content
h3
{
cursor
:
auto
}
#bp_activity_action
td
.mceIframeContainer
,
#bp_activity_content
td
.mceIframeContainer
{
background-color
:
#fff
}
#post-body
#bp-activities-action_resize
,
#post-body
#bp-activities-content_resize
{
position
:
inherit
;
margin-top
:
-2px
}
#bp_activity_link
input
{
width
:
99%
}
#bp-activities-primaryid
{
margin-bottom
:
1em
}
.column-action
{
width
:
12%
}
@media
screen
and
(
max-width
:
782px
){
body
.toplevel_page_bp-activity
.wp-list-table
tr
:not
(
.inline-edit-row
)
:not
(
.no-items
)
td
:not
(
.check-column
)
{
display
:
table-cell
}}
\ No newline at end of file
.akismet-status
{
float
:
left
}
.akismet-status
a
{
color
:
#aaa
;
font-style
:
italic
}
.akismet-history
{
margin
:
13px
}
.akismet-history
div
{
margin-bottom
:
13px
}
.akismet-history
span
{
color
:
#999
}
#wp-bp-activities-wrap
{
padding
:
5px
0
}
#bp-activities
{
height
:
120px
}
#bp-replyhead
{
font-size
:
1em
;
line-height
:
1.4
;
margin
:
0
}
#bp-replysubmit
{
margin
:
0
;
padding
:
0
0
3px
;
text-align
:
center
}
#bp-replysubmit
.error
{
color
:
red
;
line-height
:
21px
;
text-align
:
center
;
vertical-align
:
center
}
#bp-replysubmit
img
.waiting
{
float
:
left
;
padding
:
4px
10px
0
;
vertical-align
:
top
}
#bp-activities-form
.column-response
img
{
float
:
right
;
margin-bottom
:
5px
;
margin-left
:
10px
;
margin-top
:
1px
}
.activity-errors
{
list-style-type
:
disc
;
margin-right
:
2em
}
#bp_activity_action
div
.inside
,
#bp_activity_content
div
.inside
{
line-height
:
0
}
#bp_activity_action
h3
,
#bp_activity_content
h3
{
cursor
:
auto
}
#bp_activity_action
td
.mceIframeContainer
,
#bp_activity_content
td
.mceIframeContainer
{
background-color
:
#fff
}
#post-body
#bp-activities-action_resize
,
#post-body
#bp-activities-content_resize
{
position
:
inherit
;
margin-top
:
-2px
}
#bp_activity_link
input
{
width
:
99%
}
#bp-activities-primaryid
{
margin-bottom
:
1em
}
.column-action
{
width
:
12%
}
@media
screen
and
(
max-width
:
782px
){
body
.toplevel_page_bp-activity
.wp-list-table
tr
:not
(
.inline-edit-row
)
:not
(
.no-items
)
td
:not
(
.check-column
)
{
display
:
table-cell
}}
\ No newline at end of file
wp-content/plugins/buddypress/bp-activity/admin/css/admin.css
View file @
c8fab4ac
.akismet-status
{
float
:
right
;
}
.akismet-status
a
{
color
:
#
AAA
;
color
:
#
aaa
;
font-style
:
italic
;
}
.akismet-history
{
margin
:
13px
;
}
.akismet-history
div
{
margin-bottom
:
13px
;
}
.akismet-history
span
{
color
:
#999
;
}
...
...
@@ -18,36 +22,43 @@
#wp-bp-activities-wrap
{
padding
:
5px
0
;
}
#bp-activities
{
height
:
120px
;
}
#bp-replyhead
{
font-size
:
1em
;
line-height
:
1.4
em
;
line-height
:
1.4
;
margin
:
0
;
}
#bp-replysubmit
{
margin
:
0
;
padding
:
0
0
3px
;
text-align
:
center
;
}
#bp-replysubmit
.error
{
color
:
red
;
color
:
#f00
;
line-height
:
21px
;
text-align
:
center
;
vertical-align
:
center
;
}
#bp-replysubmit
img
.waiting
{
float
:
right
;
padding
:
4px
10px
0
;
vertical-align
:
top
;
}
#bp-activities-form
.column-response
img
{
float
:
left
;
margin-bottom
:
5px
;
margin-right
:
10px
;
margin-top
:
1px
;
}
.activity-errors
{
list-style-type
:
disc
;
margin-left
:
2em
;
...
...
@@ -57,30 +68,37 @@
#bp_activity_content
div
.inside
{
line-height
:
0
;
}
#bp_activity_action
h3
,
#bp_activity_content
h3
{
cursor
:
auto
;
}
#bp_activity_action
td
.mceIframeContainer
,
#bp_activity_content
td
.mceIframeContainer
{
background-color
:
white
;
background-color
:
#fff
;
}
#post-body
#bp-activities-action_resize
,
#post-body
#bp-activities-content_resize
{
position
:
inherit
;
margin-top
:
-2px
;
}
#bp_activity_link
input
{
width
:
99%
;
}
#bp-activities-primaryid
{
margin-bottom
:
1em
;
}
.column-action
{
width
:
12%
;
}
@media
screen
and
(
max-width
:
782px
)
{
body
.toplevel_page_bp-activity
.wp-list-table
tr
:not
(
.inline-edit-row
)
:not
(
.no-items
)
td
:not
(
.check-column
)
{
display
:
table-cell
;
}
...
...
wp-content/plugins/buddypress/bp-activity/admin/css/admin.min.css
View file @
c8fab4ac
.akismet-status
{
float
:
right
}
.akismet-status
a
{
color
:
#AAA
;
font-style
:
italic
}
.akismet-history
{
margin
:
13px
}
.akismet-history
div
{
margin-bottom
:
13px
}
.akismet-history
span
{
color
:
#999
}
#wp-bp-activities-wrap
{
padding
:
5px
0
}
#bp-activities
{
height
:
120px
}
#bp-replyhead
{
font-size
:
1em
;
line-height
:
1.4em
;
margin
:
0
}
#bp-replysubmit
{
margin
:
0
;
padding
:
0
0
3px
;
text-align
:
center
}
#bp-replysubmit
.error
{
color
:
red
;
line-height
:
21px
;
text-align
:
center
;
vertical-align
:
center
}
#bp-replysubmit
img
.waiting
{
float
:
right
;
padding
:
4px
10px
0
;
vertical-align
:
top
}
#bp-activities-form
.column-response
img
{
float
:
left
;
margin-bottom
:
5px
;
margin-right
:
10px
;
margin-top
:
1px
}
.activity-errors
{
list-style-type
:
disc
;
margin-left
:
2em
}
#bp_activity_action
div
.inside
,
#bp_activity_content
div
.inside
{
line-height
:
0
}
#bp_activity_action
h3
,
#bp_activity_content
h3
{
cursor
:
auto
}
#bp_activity_action
td
.mceIframeContainer
,
#bp_activity_content
td
.mceIframeContainer
{
background-color
:
#fff
}
#post-body
#bp-activities-action_resize
,
#post-body
#bp-activities-content_resize
{
position
:
inherit
;
margin-top
:
-2px
}
#bp_activity_link
input
{
width
:
99%
}
#bp-activities-primaryid
{
margin-bottom
:
1em
}
.column-action
{
width
:
12%
}
@media
screen
and
(
max-width
:
782px
){
body
.toplevel_page_bp-activity
.wp-list-table
tr
:not
(
.inline-edit-row
)
:not
(
.no-items
)
td
:not
(
.check-column
)
{
display
:
table-cell
}}
\ No newline at end of file
.akismet-status
{
float
:
right
}
.akismet-status
a
{
color
:
#aaa
;
font-style
:
italic
}
.akismet-history
{
margin
:
13px
}
.akismet-history
div
{
margin-bottom
:
13px
}
.akismet-history
span
{
color
:
#999
}
#wp-bp-activities-wrap
{
padding
:
5px
0
}
#bp-activities
{
height
:
120px
}
#bp-replyhead
{
font-size
:
1em
;
line-height
:
1.4
;
margin
:
0
}
#bp-replysubmit
{
margin
:
0
;
padding
:
0
0
3px
;
text-align
:
center
}
#bp-replysubmit
.error
{
color
:
red
;
line-height
:
21px
;
text-align
:
center
;
vertical-align
:
center
}
#bp-replysubmit
img
.waiting
{
float
:
right
;
padding
:
4px
10px
0
;
vertical-align
:
top
}
#bp-activities-form
.column-response
img
{
float
:
left
;
margin-bottom
:
5px
;
margin-right
:
10px
;
margin-top
:
1px
}
.activity-errors
{
list-style-type
:
disc
;
margin-left
:
2em
}
#bp_activity_action
div
.inside
,
#bp_activity_content
div
.inside
{
line-height
:
0
}
#bp_activity_action
h3
,
#bp_activity_content
h3
{
cursor
:
auto
}
#bp_activity_action
td
.mceIframeContainer
,
#bp_activity_content
td
.mceIframeContainer
{
background-color
:
#fff
}
#post-body
#bp-activities-action_resize
,
#post-body
#bp-activities-content_resize
{
position
:
inherit
;
margin-top
:
-2px
}
#bp_activity_link
input
{
width
:
99%
}
#bp-activities-primaryid
{
margin-bottom
:
1em
}
.column-action
{
width
:
12%
}
@media
screen
and
(
max-width
:
782px
){
body
.toplevel_page_bp-activity
.wp-list-table
tr
:not
(
.inline-edit-row
)
:not
(
.no-items
)
td
:not
(
.check-column
)
{
display
:
table-cell
}}
\ No newline at end of file
wp-content/plugins/buddypress/bp-activity/admin/js/admin.min.js
View file @
c8fab4ac
!
function
(
a
){
var
b
=
{
init
:
function
(){
a
(
document
).
on
(
"
click
"
,
"
.row-actions a.reply
"
,
b
.
open
),
a
(
document
).
on
(
"
click
"
,
"
#bp-activities-container a.cancel
"
,
b
.
close
),
a
(
document
).
on
(
"
click
"
,
"
#bp-activities-container a.save
"
,
b
.
send
),
a
(
document
).
on
(
"
keyup
"
,
"
#bp-activities:visible
"
,
function
(
a
){
27
===
a
.
which
&&
b
.
close
()})},
open
:
function
(){
var
b
=
a
(
"
#bp-activities-container
"
).
hide
();
return
a
(
this
).
parents
(
"
tr
"
).
after
(
b
),
b
.
fadeIn
(
"
300
"
),
a
(
"
#bp-activities
"
).
focus
(),
!
1
},
close
:
function
(){
return
a
(
"
#bp-activities-container
"
).
fadeOut
(
"
200
"
,
function
(){
a
(
"
#bp-activities
"
).
val
(
""
).
blur
(),
a
(
"
#bp-replysubmit .error
"
).
html
(
""
).
hide
(),
a
(
"
#bp-replysubmit .waiting
"
).
hide
()}),
!
1
},
send
:
function
(){
a
(
"
#bp-replysubmit .error
"
).
hide
(),
a
(
"
#bp-replysubmit .waiting
"
).
show
();
var
c
=
{};
return
c
[
"
_ajax_nonce-bp-activity-admin-reply
"
]
=
a
(
'
#bp-activities-container input[name="_ajax_nonce-bp-activity-admin-reply"]
'
).
val
(),
c
.
action
=
"
bp-activity-admin-reply
"
,
c
.
content
=
a
(
"
#bp-activities
"
).
val
(),
c
.
parent_id
=
a
(
"
#bp-activities-container
"
).
prev
().
data
(
"
parent_id
"
),
c
.
root_id
=
a
(
"
#bp-activities-container
"
).
prev
().
data
(
"
root_id
"
),
a
.
ajax
({
data
:
c
,
type
:
"
POST
"
,
url
:
ajaxurl
,
error
:
function
(
a
){
b
.
error
(
a
)},
success
:
function
(
a
){
b
.
show
(
a
)}}),
!
1
},
error
:
function
(
b
){
var
c
=
b
.
statusText
;
a
(
"
#bp-replysubmit .waiting
"
).
hide
(),
b
.
responseText
&&
(
c
=
b
.
responseText
.
replace
(
/<.
[^
<>
]
*
?
>/g
,
""
)),
c
&&
a
(
"
#bp-replysubmit .error
"
).
html
(
c
).
show
()},
show
:
function
(
c
){
var
d
,
e
,
f
;
return
"
string
"
==
typeof
c
?(
b
.
error
({
responseText
:
c
}),
!
1
):(
f
=
wpAjax
.
parseAjaxResponse
(
c
),
f
.
errors
?(
b
.
error
({
responseText
:
wpAjax
.
broken
}),
!
1
):(
f
=
f
.
responses
[
0
],
void
a
(
"
#bp-activities-container
"
).
fadeOut
(
"
200
"
,
function
(){
a
(
"
#bp-activities
"
).
val
(
""
).
blur
(),
a
(
"
#bp-replysubmit .error
"
).
html
(
""
).
hide
(),
a
(
"
#bp-replysubmit .waiting
"
).
hide
(),
a
(
"
#bp-activities-container
"
).
before
(
f
.
data
),
e
=
a
(
"
#activity-
"
+
f
.
id
),
d
=
e
.
closest
(
"
.widefat
"
).
css
(
"
backgroundColor
"
),
e
.
animate
({
backgroundColor
:
"
#CEB
"
},
300
).
animate
({
backgroundColor
:
d
},
300
)})))}};
a
(
document
).
ready
(
function
(){
b
.
init
(),
a
(
"
#bp_activity_action h3, #bp_activity_content h3
"
).
unbind
(
"
click
"
),
"
undefined
"
!=
typeof
postboxes
&&
postboxes
.
add_postbox_toggles
(
bp_activity_admin_vars
.
page
)})}(
jQuery
);
\ No newline at end of file
!
function
(
i
){
var
t
=
{
init
:
function
(){
i
(
document
).
on
(
"
click
"
,
"
.row-actions a.reply
"
,
t
.
open
),
i
(
document
).
on
(
"
click
"
,
"
#bp-activities-container a.cancel
"
,
t
.
close
),
i
(
document
).
on
(
"
click
"
,
"
#bp-activities-container a.save
"
,
t
.
send
),
i
(
document
).
on
(
"
keyup
"
,
"
#bp-activities:visible
"
,
function
(
i
){
27
===
i
.
which
&&
t
.
close
()})},
open
:
function
(){
var
t
=
i
(
"
#bp-activities-container
"
).
hide
();
return
i
(
this
).
parents
(
"
tr
"
).
after
(
t
),
t
.
fadeIn
(
"
300
"
),
i
(
"
#bp-activities
"
).
focus
(),
!
1
},
close
:
function
(){
return
i
(
"
#bp-activities-container
"
).
fadeOut
(
"
200
"
,
function
(){
i
(
"
#bp-activities
"
).
val
(
""
).
blur
(),
i
(
"
#bp-replysubmit .error
"
).
html
(
""
).
hide
(),
i
(
"
#bp-replysubmit .waiting
"
).
hide
()}),
!
1
},
send
:
function
(){
i
(
"
#bp-replysubmit .error
"
).
hide
(),
i
(
"
#bp-replysubmit .waiting
"
).
show
();
var
e
=
{};
return
e
[
"
_ajax_nonce-bp-activity-admin-reply
"
]
=
i
(
'
#bp-activities-container input[name="_ajax_nonce-bp-activity-admin-reply"]
'
).
val
(),
e
.
action
=
"
bp-activity-admin-reply
"
,
e
.
content
=
i
(
"
#bp-activities
"
).
val
(),
e
.
parent_id
=
i
(
"
#bp-activities-container
"
).
prev
().
data
(
"
parent_id
"
),
e
.
root_id
=
i
(
"
#bp-activities-container
"
).
prev
().
data
(
"
root_id
"
),
i
.
ajax
({
data
:
e
,
type
:
"
POST
"
,
url
:
ajaxurl
,
error
:
function
(
i
){
t
.
error
(
i
)},
success
:
function
(
i
){
t
.
show
(
i
)}}),
!
1
},
error
:
function
(
t
){
var
e
=
t
.
statusText
;
i
(
"
#bp-replysubmit .waiting
"
).
hide
(),
t
.
responseText
&&
(
e
=
t
.
responseText
.
replace
(
/<.
[^
<>
]
*
?
>/g
,
""
)),
e
&&
i
(
"
#bp-replysubmit .error
"
).
html
(
e
).
show
()},
show
:
function
(
e
){
var
n
,
a
,
r
;
return
"
string
"
==
typeof
e
?(
t
.
error
({
responseText
:
e
}),
!
1
):(
r
=
wpAjax
.
parseAjaxResponse
(
e
)).
errors
?(
t
.
error
({
responseText
:
wpAjax
.
broken
}),
!
1
):(
r
=
r
.
responses
[
0
],
void
i
(
"
#bp-activities-container
"
).
fadeOut
(
"
200
"
,
function
(){
i
(
"
#bp-activities
"
).
val
(
""
).
blur
(),
i
(
"
#bp-replysubmit .error
"
).
html
(
""
).
hide
(),
i
(
"
#bp-replysubmit .waiting
"
).
hide
(),
i
(
"
#bp-activities-container
"
).
before
(
r
.
data
),
a
=
i
(
"
#activity-
"
+
r
.
id
),
n
=
a
.
closest
(
"
.widefat
"
).
css
(
"
backgroundColor
"
),
a
.
animate
({
backgroundColor
:
"
#CEB
"
},
300
).
animate
({
backgroundColor
:
n
},
300
)}))}};
i
(
document
).
ready
(
function
(){
t
.
init
(),
i
(
"
#bp_activity_action h3, #bp_activity_content h3
"
).
unbind
(
"
click
"
),
"
undefined
"
!=
typeof
postboxes
&&
postboxes
.
add_postbox_toggles
(
bp_activity_admin_vars
.
page
)})}(
jQuery
);
\ No newline at end of file
wp-content/plugins/buddypress/bp-activity/bp-activity-admin.php
View file @
c8fab4ac
...
...
@@ -141,7 +141,7 @@ add_action( 'wp_ajax_bp-activity-admin-reply', 'bp_activity_admin_reply' );
* @param string $value Will always be false unless another plugin filters it first.
* @param string $option Screen option name.
* @param string $new_value Screen option form value.
* @return string Option value. False to abandon update.
* @return string
|int
Option value. False to abandon update.
*/
function
bp_activity_admin_screen_options
(
$value
,
$option
,
$new_value
)
{
if
(
'toplevel_page_bp_activity_per_page'
!=
$option
&&
'toplevel_page_bp_activity_network_per_page'
!=
$option
)
...
...
wp-content/plugins/buddypress/bp-activity/bp-activity-embeds.php
View file @
c8fab4ac
...
...
@@ -123,7 +123,7 @@ function bp_activity_embed_has_activity( $activity_id = 0 ) {
* @since 2.6.0
*/
function
bp_activity_embed_excerpt
(
$content
=
''
)
{
echo
bp_activity_get_embed_excerpt
(
$content
=
''
);
echo
bp_activity_get_embed_excerpt
(
$content
);
}
/**
...
...
wp-content/plugins/buddypress/bp-activity/bp-activity-filters.php
View file @
c8fab4ac
...
...
@@ -207,7 +207,9 @@ function bp_activity_filter_kses( $content ) {
global
$allowedtags
;
$activity_allowedtags
=
$allowedtags
;
$activity_allowedtags
[
'a'
][
'aria-label'
]
=
array
();
$activity_allowedtags
[
'a'
][
'class'
]
=
array
();
$activity_allowedtags
[
'a'
][
'data-bp-tooltip'
]
=
array
();
$activity_allowedtags
[
'a'
][
'id'
]
=
array
();
$activity_allowedtags
[
'a'
][
'rel'
]
=
array
();
$activity_allowedtags
[
'a'
][
'title'
]
=
array
();
...
...
@@ -223,12 +225,14 @@ function bp_activity_filter_kses( $content ) {
$activity_allowedtags
[
'img'
][
'height'
]
=
array
();
$activity_allowedtags
[
'img'
][
'class'
]
=
array
();
$activity_allowedtags
[
'img'
][
'id'
]
=
array
();
$activity_allowedtags
[
'img'
][
'title'
]
=
array
();
$activity_allowedtags
[
'span'
]
=
array
();
$activity_allowedtags
[
'span'
][
'class'
]
=
array
();
$activity_allowedtags
[
'span'
][
'data-livestamp'
]
=
array
();
$activity_allowedtags
[
'ul'
]
=
array
();
$activity_allowedtags
[
'ol'
]
=
array
();
$activity_allowedtags
[
'li'
]
=
array
();
/**
* Filters the allowed HTML tags for BuddyPress Activity content.
...
...
wp-content/plugins/buddypress/bp-activity/bp-activity-functions.php
View file @
c8fab4ac
...
...
@@ -1845,7 +1845,7 @@ function bp_activity_get_specific( $args = '' ) {
* @type bool $is_spam Should the item be marked as spam? Default: false.
* @type string $error_type Optional. Error type. Either 'bool' or 'wp_error'. Default: 'bool'.
* }
* @return
int
|bool The ID of the activity on success. False on error.
* @return
WP_Error
|bool
|int
The ID of the activity on success. False on error.
*/
function
bp_activity_add
(
$args
=
''
)
{
...
...
@@ -2026,7 +2026,7 @@ function bp_activity_post_update( $args = '' ) {
* @param int $post_id ID of the new post.
* @param WP_Post|null $post Post object.
* @param int $user_id ID of the post author.
* @return
int
|bool The ID of the activity on success. False on error.
* @return
null|WP_Error
|bool
|int
The ID of the activity on success. False on error.
*/
function
bp_activity_post_type_publish
(
$post_id
=
0
,
$post
=
null
,
$user_id
=
0
)
{
...
...
@@ -2161,7 +2161,7 @@ function bp_activity_post_type_publish( $post_id = 0, $post = null, $user_id = 0
* @since 2.2.0
*
* @param WP_Post|null $post Post item.
* @return bool True on success, false on failure.
* @return
null|WP_Error|
bool True on success, false on failure.
*/
function
bp_activity_post_type_update
(
$post
=
null
)
{
...
...
@@ -2283,7 +2283,7 @@ function bp_activity_post_type_unpublish( $post_id = 0, $post = null ) {
* @param int $comment_id ID of the comment.
* @param bool $is_approved Whether the comment is approved or not.
* @param object|null $activity_post_object The post type tracking args object.
* @return
int
|bool The ID of the activity on success. False on error.
* @return
null|WP_Error
|bool
|int
The ID of the activity on success. False on error.
*/
function
bp_activity_post_type_comment
(
$comment_id
=
0
,
$is_approved
=
true
,
$activity_post_object
=
null
)
{
// Get the users comment
...
...
@@ -2557,7 +2557,7 @@ add_action( 'delete_comment', 'bp_activity_post_type_remove_comment', 10, 1 );
* Defaults to false.
* @type string $error_type Optional. Error type. Either 'bool' or 'wp_error'. Default: 'bool'.
* }
* @return
int
|bool The ID of the comment on success, otherwise false.
* @return
WP_Error
|bool
|int
The ID of the comment on success, otherwise false.
*/
function
bp_activity_new_comment
(
$args
=
''
)
{
$bp
=
buddypress
();
...
...
@@ -2963,6 +2963,12 @@ function bp_activity_delete_comment( $activity_id, $comment_id ) {
return
$deleted
;
}
// Check if comment still exists.
$comment
=
new
BP_Activity_Activity
(
$comment_id
);
if
(
empty
(
$comment
->
id
)
)
{
return
false
;
}
// Delete any children of this comment.
bp_activity_delete_children
(
$activity_id
,
$comment_id
);
...
...
@@ -3003,6 +3009,11 @@ function bp_activity_delete_comment( $activity_id, $comment_id ) {
* @param int $comment_id The ID of the comment to be deleted.
*/
function
bp_activity_delete_children
(
$activity_id
,
$comment_id
)
{
// Check if comment still exists.
$comment
=
new
BP_Activity_Activity
(
$comment_id
);
if
(
empty
(
$comment
->
id
)
)
{
return
;
}
// Get activity children to delete.
$children
=
BP_Activity_Activity
::
get_child_comments
(
$comment_id
);
...
...
wp-content/plugins/buddypress/bp-activity/bp-activity-notifications.php
View file @
c8fab4ac
...
...
@@ -94,7 +94,7 @@ function bp_activity_format_notifications( $action, $item_id, $secondary_item_id
* @param int $activity_id ID of the activity item being formatted.
* @param int $user_id ID of the user who inited the interaction.
*/
$return
=
apply_filters
(
'bp_activity_'
.
$amount
.
'_'
.
$action_filter
.
'_notification'
,
'<a href="'
.
esc_url
(
$link
)
.
'" title="'
.
esc_attr
(
$title
)
.
'">'
.
esc_html
(
$text
)
.
'</a>'
,
$link
,
(
int
)
$total_items
,
$activity_id
,
$user_id
);
$return
=
apply_filters
(
'bp_activity_'
.
$amount
.
'_'
.
$action_filter
.
'_notification'
,
'<a href="'
.
esc_url
(
$link
)
.
'">'
.
esc_html
(
$text
)
.
'</a>'
,
$link
,
(
int
)
$total_items
,
$activity_id
,
$user_id
);
}
else
{
/**
...
...
wp-content/plugins/buddypress/bp-activity/bp-activity-template.php
View file @
c8fab4ac
...
...
@@ -1493,7 +1493,7 @@ function bp_insert_activity_meta( $content = '' ) {
// Setup variables for activity meta.
$activity_permalink
=
bp_activity_get_permalink
(
$activities_template
->
activity
->
id
,
$activities_template
->
activity
);
$activity_meta
=
sprintf
(
'%1$s <a href="%2$s" class="view activity-time-since
" title
="%3$s">%4$s</a>'
,
$activity_meta
=
sprintf
(
'%1$s <a href="%2$s" class="view activity-time-since
bp-tooltip" data-bp-tooltip
="%3$s">%4$s</a>'
,
$new_content
,
$activity_permalink
,
esc_attr__
(
'View Discussion'
,
'buddypress'
),
...
...
@@ -1533,7 +1533,7 @@ function bp_insert_activity_meta( $content = '' ) {
*
* @global object $activities_template {@link BP_Activity_Template}
*
* @param BP_Activity_Activity $activity Optional. Falls back on the current item in the loop.
* @param
false|
BP_Activity_Activity $activity Optional. Falls back on the current item in the loop.
* @return bool True if can delete, false otherwise.
*/
function
bp_activity_user_can_delete
(
$activity
=
false
)
{
...
...
@@ -2090,7 +2090,7 @@ function bp_activity_comment_delete_link() {
* activity comment.
*/
function
bp_get_activity_comment_delete_link
()
{
$link
=
wp_nonce_url
(
bp_get_activity_directory_permalink
()
.
'delete/'
.
bp_get_activity_comment_id
()
.
'?cid='
.
bp_get_activity_comment_id
(),
'bp_activity_delete_link'
);
$link
=
wp_nonce_url
(
trailingslashit
(
bp_get_activity_directory_permalink
()
.
'delete/'
.
bp_get_activity_comment_id
()
)
.
'?cid='
.
bp_get_activity_comment_id
(),
'bp_activity_delete_link'
);
/**
* Filters the link used for deleting the activity comment currently being displayed.
...
...
@@ -2342,7 +2342,7 @@ function bp_activity_comment_form_nojs_display() {
*
* @global object $activities_template {@link BP_Activity_Template}
*
* @return string|
bool
The activity comment form no JavaScript
* @return string|
false
The activity comment form no JavaScript
* display CSS. False on failure.
*/
function
bp_get_activity_comment_form_nojs_display
()
{
...
...
wp-content/plugins/buddypress/bp-activity/classes/class-bp-activity-activity.php
View file @
c8fab4ac
...
...
@@ -226,7 +226,7 @@ class BP_Activity_Activity {
*
* @since 1.0.0
*
* @return bool True on success.
* @return
WP_Error|
bool True on success.
*/
public
function
save
()
{
global
$wpdb
;
...
...
@@ -320,6 +320,7 @@ class BP_Activity_Activity {
*
* @since 1.2.0
* @since 2.4.0 Introduced the `$fields` parameter.
* @since 2.9.0 Introduced the `$order_by` parameter.
*
* @see BP_Activity_Activity::get_filter_sql() for a description of the
* 'filter' parameter.
...
...
@@ -335,6 +336,7 @@ class BP_Activity_Activity {
* @type string $fields Activity fields to return. Pass 'ids' to get only the activity IDs.
* 'all' returns full activity objects.
* @type string $sort ASC or DESC. Default: 'DESC'.
* @type string $order_by Column to order results by.
* @type array $exclude Array of activity IDs to exclude. Default: false.
* @type array $in Array of ids to limit query by (IN). Default: false.
* @type array $meta_query Array of meta_query conditions. See WP_Meta_Query::queries.
...
...
@@ -386,6 +388,7 @@ class BP_Activity_Activity {
'max'
=>
false
,
// Max number of items to return.
'fields'
=>
'all'
,
// Fields to include.
'sort'
=>
'DESC'
,
// ASC or DESC.
'order_by'
=>
'date_recorded'
,
// Column to order by.
'exclude'
=>
false
,
// Array of ids to exclude.
'in'
=>
false
,
// Array of ids to limit query by (IN).
'meta_query'
=>
false
,
// Filter by activitymeta.
...
...
@@ -461,6 +464,29 @@ class BP_Activity_Activity {
$sort
=
'DESC'
;
}
switch
(
$r
[
'order_by'
]
)
{
case
'id'
:
case
'user_id'
:
case
'component'
:
case
'type'
:
case
'action'
:
case
'content'
:
case
'primary_link'
:
case
'item_id'
:
case
'secondary_item_id'
:
case
'date_recorded'
:
case
'hide_sitewide'
:
case
'mptt_left'
:
case
'mptt_right'
:
case
'is_spam'
:
break
;
default
:
$r
[
'order_by'
]
=
'date_recorded'
;
break
;
}
$order_by
=
'a.'
.
$r
[
'order_by'
];
// Hide Hidden Items?
if
(
!
$r
[
'show_hidden'
]
)
{
$where_conditions
[
'hidden_sql'
]
=
"a.hide_sitewide = 0"
;
...
...
@@ -544,28 +570,6 @@ class BP_Activity_Activity {
*/
$join_sql
=
apply_filters
(
'bp_activity_get_join_sql'
,
$join_sql
,
$r
,
$select_sql
,
$from_sql
,
$where_sql
);
/**
* Filters the preferred order of indexes for activity item.
*
* @since 1.6.0
*
* @param array $value Array of indexes in preferred order.
*/
$indexes
=
apply_filters
(
'bp_activity_preferred_index_order'
,
array
(
'user_id'
,
'item_id'
,
'secondary_item_id'
,
'date_recorded'
,
'component'
,
'type'
,
'hide_sitewide'
,
'is_spam'
)
);
foreach
(
$indexes
as
$key
=>
$index
)
{
if
(
false
!==
strpos
(
$where_sql
,
$index
)
)
{
$the_index
=
$index
;
break
;
// Take the first one we find.
}
}
if
(
!
empty
(
$the_index
)
)
{
$index_hint_sql
=
"USE INDEX (
{
$the_index
}
)"
;
}
else
{
$index_hint_sql
=
''
;
}
// Sanitize page and per_page parameters.
$page
=
absint
(
$r
[
'page'
]
);
$per_page
=
absint
(
$r
[
'per_page'
]
);
...
...
@@ -629,7 +633,7 @@ class BP_Activity_Activity {
}
else
{
// Query first for activity IDs.
$activity_ids_sql
=
"
{
$select_sql
}
{
$from_sql
}
{
$join_sql
}
{
$where_sql
}
ORDER BY
a.date_recorded
{
$sort
}
, a.id
{
$sort
}
"
;
$activity_ids_sql
=
"
{
$select_sql
}
{
$from_sql
}
{
$join_sql
}
{
$where_sql
}
ORDER BY
{
$order_by
}
{
$sort
}
, a.id
{
$sort
}
"
;
if
(
!
empty
(
$per_page
)
&&
!
empty
(
$page
)
)
{
// We query for $per_page + 1 items in order to
...
...
@@ -983,7 +987,7 @@ class BP_Activity_Activity {
* @param mixed $scope The activity scope. Accepts string or array of scopes.
* @param array $r Current activity arguments. Same as those of BP_Activity_Activity::get(),
* but merged with defaults.
* @return array 'sql' WHERE SQL string and 'override' activity args.
* @return
false|
array 'sql' WHERE SQL string and 'override' activity args.
*/
public
static
function
get_scope_query_sql
(
$scope
=
false
,
$r
=
array
()
)
{
...
...
@@ -1112,7 +1116,7 @@ class BP_Activity_Activity {
* @param string $action Action to filter by.
* @param string $content Content to filter by.
* @param string $date_recorded Date to filter by.
* @return int|
bool
Activity ID on success, false if none is found.
* @return int|
false
Activity ID on success, false if none is found.
*/
public
static
function
get_id
(
$user_id
,
$component
,
$type
,
$item_id
,
$secondary_item_id
,
$action
,
$content
,
$date_recorded
)
{
global
$wpdb
;
...
...
@@ -1693,7 +1697,7 @@ class BP_Activity_Activity {
*
* @param string $field The database field.
* @param array|bool $items The values for the IN clause, or false when none are found.
* @return string|
bool
* @return string|
false
*/
public
static
function
get_in_operator_sql
(
$field
,
$items
)
{
global
$wpdb
;
...
...
@@ -1841,7 +1845,7 @@ class BP_Activity_Activity {
* @since 1.1.0
*
* @param string $content The content to filter by.
* @return int|
bool
The ID of the first matching item if found, otherwise false.
* @return int|
false
The ID of the first matching item if found, otherwise false.
*/
public
static
function
check_exists_by_content
(
$content
)
{
global
$wpdb
;
...
...
wp-content/plugins/buddypress/bp-activity/classes/class-bp-activity-list-table.php
View file @
c8fab4ac
...
...
@@ -592,7 +592,7 @@ class BP_Activity_List_Table extends WP_List_Table {
if
(
$this
->
can_comment
(
$item
)
)
{
$actions
[
'reply'
]
=
sprintf
(
'<a href="#" class="reply hide-if-no-js">%s</a>'
,
__
(
'Reply'
,
'buddypress'
)
);
}
else
{
$actions
[
'reply'
]
=
sprintf
(
'<span class="form-input-tip"
title="%s">%s</span>'
,
__
(
'Replies are disabled for this activity item'
,
'buddypress'
)
,
__
(
'Replies disabled'
,
'buddypress'
)
);
$actions
[
'reply'
]
=
sprintf
(
'<span class="form-input-tip"
>%s</span>'
,
__
(
'Replies disabled'
,
'buddypress'
)
);
}
// Edit.
...
...
@@ -706,8 +706,7 @@ class BP_Activity_List_Table extends WP_List_Table {
// If the activity has comments, display a link to the activity's permalink, with its comment count in a speech bubble.
if
(
$comment_count
)
{
$title_attr
=
sprintf
(
_n
(
'%s related activity'
,
'%s related activities'
,
$comment_count
,
'buddypress'
),
number_format_i18n
(
$comment_count
)
);
printf
(
'<a href="%1$s" title="%2$s" class="post-com-count post-com-count-approved"><span class="comment-count comment-count-approved">%3$s</span></a>'
,
esc_url
(
$root_activity_url
),
esc_attr
(
$title_attr
),
number_format_i18n
(
$comment_count
)
);
printf
(
'<a href="%1$s" class="post-com-count post-com-count-approved"><span class="comment-count comment-count-approved">%2$s</span></a>'
,
esc_url
(
$root_activity_url
),
number_format_i18n
(
$comment_count
)
);
}
// For non-root activities, display a link to the replied-to activity's author's profile.
...
...
wp-content/plugins/buddypress/bp-activity/css/mentions-rtl.css
View file @
c8fab4ac
...
...
@@ -2,8 +2,8 @@
background
:
rgba
(
204
,
204
,
204
,
0.8
);
border-radius
:
2px
;
border
:
1px
solid
rgb
(
204
,
204
,
204
);
box-shadow
:
0
0
5px
rgba
(
204
,
204
,
204
,
0.25
),
0
0
1px
#
FFF
;
color
:
#
D
84800
;
box-shadow
:
0
0
5px
rgba
(
204
,
204
,
204
,
0.25
),
0
0
1px
#
fff
;
color
:
#
d
84800
;
display
:
none
;
font-family
:
sans-serif
;
margin-top
:
18px
;
...
...
@@ -14,14 +14,16 @@
.atwho-view
{
left
:
0
;
}
.atwho-view
ul
{
background
:
#
FFF
;
background
:
#
fff
;
list-style
:
none
;
margin
:
auto
;
padding
:
0
;