Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Danny Froberg
steempress_amn
Commits
075985fc
Commit
075985fc
authored
Nov 29, 2018
by
Martin Lees
Browse files
Code cleanup
parent
61dcaea6
Changes
1
Show whitespace changes
Inline
Side-by-side
admin/class-steempress_sp-admin.php
View file @
075985fc
...
...
@@ -439,17 +439,13 @@ class Steempress_sp_Admin {
if
(
!
isset
(
$_POST
[
'Steempress_sp_steem_publish'
])
&&
isset
(
$_POST
[
'Steempress_sp_steem_do_not_publish'
])
)
return
;
/*$value = get_post_meta($post->ID, 'Steempress_sp_steem_publish', true);
if ($value != "0")*/
$this
->
steempress_sp_update
(
181
,
false
,
"classic publish"
);
//$this->Steempress_sp_publish($post->ID);
$this
->
Steempress_sp_publish
(
$post
->
ID
);
// Edited post
}
else
if
(
$new_status
==
'publish'
&&
$old_status
==
'publish'
&&
$post
->
post_type
==
'post'
)
{
if
(
!
isset
(
$_POST
[
'Steempress_sp_steem_update'
])
&&
isset
(
$_POST
[
'Steempress_sp_steem_do_not_update'
])
)
return
;
$this
->
steempress_sp_update
(
181
,
false
,
"classic update"
);
//$this->steempress_sp_update($post->ID, false, $_POST['Steempress_sp_steem_update']);
$this
->
steempress_sp_update
(
$post
->
ID
,
false
);
}
return
;
}
...
...
@@ -534,7 +530,7 @@ class Steempress_sp_Admin {
// If post is empty/ doesn't have the hidden_mm attribute this means that we are using gutenberg
if
(
$_POST
==
[]
||
!
isset
(
$_POST
[
'hidden_mm'
]))
{
$this
->
s
teempress_sp_
update
(
181
,
false
,
"gutenberg publish"
);
$this
->
S
teempress_sp_
publish
(
$post_id
);
}
update_post_meta
(
$post_id
,
'Steempress_sp_steem_publish'
,
$_POST
[
'Steempress_sp_steem_publish'
]);
...
...
@@ -545,7 +541,7 @@ class Steempress_sp_Admin {
if
(
isset
(
$_POST
[
'Steempress_sp_steem_update'
])
&&
$_POST
[
'Steempress_sp_steem_update'
]
===
'1'
)
{
// If post is empty/ doesn't have the hidden_mm attribute this means that we are using gutenberg
if
(
$_POST
==
[]
||
!
isset
(
$_POST
[
'hidden_mm'
]))
{
$this
->
steempress_sp_update
(
181
,
false
,
"gutenberg update"
);
$this
->
steempress_sp_update
(
181
,
false
);
}
update_post_meta
(
$post_id
,
'Steempress_sp_steem_update'
,
$_POST
[
'Steempress_sp_steem_update'
]);
...
...
@@ -656,13 +652,11 @@ class Steempress_sp_Admin {
-2 : update is not activated
-3 : Post is not in the published state
*/
function
steempress_sp_update
(
$post_id
,
$bulk
=
false
,
$post_data
=
"jelepasetdeso"
)
function
steempress_sp_update
(
$post_id
,
$bulk
=
false
)
{
$post
=
get_post
(
$post_id
);
if
(
$post
->
post_status
==
"publish"
)
{
$update
=
json_encode
(
$post_data
);
//get_post_meta($post_id, "Steempress_sp_steem_update", true);
if
(
!
isset
(
$_POST
[
'Steempress_sp_steem_update'
])
&&
isset
(
$_POST
[
'Steempress_sp_steem_do_not_update'
])
)
return
;
...
...
@@ -766,8 +760,7 @@ class Steempress_sp_Admin {
"footer"
=>
$options
[
'footer'
],
"permlink"
=>
$permlink
[
0
],
"vote"
=>
$options
[
"vote"
],
"reward"
=>
$options
[
'reward'
],
"update"
=>
$update
"reward"
=>
$options
[
'reward'
]
));
...
...
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