Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
noblogs-wp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
39
Issues
39
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ai
noblogs-wp
Commits
155d4ab3
Commit
155d4ab3
authored
May 03, 2014
by
lechuck
Committed by
lucha
Oct 29, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added wordpress-ai-privacy-plugin to upstream
parent
863cafed
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
0 deletions
+60
-0
wp-content/plugins/wordpress-ai-privacy-plugin/images/mystery-man-50.jpg
...ins/wordpress-ai-privacy-plugin/images/mystery-man-50.jpg
+0
-0
wp-content/plugins/wordpress-ai-privacy-plugin/remove-gravatar.php
...t/plugins/wordpress-ai-privacy-plugin/remove-gravatar.php
+60
-0
No files found.
wp-content/plugins/wordpress-ai-privacy-plugin/images/mystery-man-50.jpg
0 → 100644
View file @
155d4ab3
1.39 KB
wp-content/plugins/wordpress-ai-privacy-plugin/remove-gravatar.php
0 → 100644
View file @
155d4ab3
<?php
/*
Plugin Name: Wordpress-privacy-ai
Version: 0.0.1
Plugin URI: none
Description: Filtra alcuni parametri per la privacy
Author: A/I
*/
//Elimino i gravatar in caso di avatar non presente
if
(
!
function_exists
(
'get_avatar'
)
)
:
function
get_avatar
(
$id_or_email
,
$size
=
'96'
,
$default
=
''
,
$alt
=
false
)
{
if
(
!
get_option
(
'show_avatars'
)
)
return
false
;
if
(
false
===
$alt
)
$safe_alt
=
''
;
else
$safe_alt
=
esc_attr
(
$alt
);
if
(
!
is_numeric
(
$size
)
)
$size
=
'96'
;
$email
=
''
;
if
(
is_numeric
(
$id_or_email
)
)
{
$id
=
(
int
)
$id_or_email
;
$user
=
get_userdata
(
$id
);
if
(
$user
)
$email
=
$user
->
user_email
;
}
elseif
(
is_object
(
$id_or_email
)
)
{
// No avatar for pingbacks or trackbacks
$allowed_comment_types
=
apply_filters
(
'get_avatar_comment_types'
,
array
(
'comment'
)
);
if
(
!
empty
(
$id_or_email
->
comment_type
)
&&
!
in_array
(
$id_or_email
->
comment_type
,
(
array
)
$allowed_comment_types
)
)
return
false
;
if
(
!
empty
(
$id_or_email
->
user_id
)
)
{
$id
=
(
int
)
$id_or_email
->
user_id
;
$user
=
get_userdata
(
$id
);
if
(
$user
)
$email
=
$user
->
user_email
;
}
elseif
(
!
empty
(
$id_or_email
->
comment_author_email
)
)
{
$email
=
$id_or_email
->
comment_author_email
;
}
}
else
{
$email
=
$id_or_email
;
}
if
(
empty
(
$default
)
)
{
$default
=
'mystery'
;
}
if
(
'mystery'
==
$default
)
$default
=
plugins_url
(
'images/mystery-man-50.jpg'
,
__FILE__
);
elseif
(
'blank'
==
$default
)
$default
=
includes_url
(
'images/blank.gif'
);
$avatar
=
"<img alt='
{
$safe_alt
}
' src='
{
$default
}
' class='avatar' height='
{
$size
}
' width='
{
$size
}
' />"
;
return
apply_filters
(
'get_avatar'
,
$avatar
,
$id_or_email
,
40
,
$default
,
$alt
);
}
endif
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment