Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sevasram
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
krishna chandran
sevasram
Commits
0df276aa
Commit
0df276aa
authored
Apr 02, 2020
by
Arun Raj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
curl call for news
parent
85b6480f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
wp-content/themes/landscop/functions.php
+36
-0
No files found.
wp-content/themes/landscop/functions.php
View file @
0df276aa
...
@@ -394,6 +394,42 @@ function ws_get_images_urls( $object, $field_name, $request ) {
...
@@ -394,6 +394,42 @@ function ws_get_images_urls( $object, $field_name, $request ) {
);
);
}
}
add_action
(
'transition_post_status'
,
'func'
,
10
,
3
);
function
func
(
$new_status
,
$old_status
,
$post
)
{
$category_detail
=
get_the_category
(
$post
->
ID
);
//$post->ID
//echo "<PRE>";print_r($category_detail);exit;
foreach
(
$category_detail
as
$cd
)
{
if
(
$cd
->
slug
==
'news'
)
{
$curl
=
curl_init
(
'http://52.55.205.218:5555/notification/sendnotificationtoall'
);
curl_setopt
(
$curl
,
CURLOPT_POST
,
true
);
curl_setopt
(
$curl
,
CURLOPT_POSTFIELDS
,
array
(
'message'
=>
'some data'
,
'title'
=>
'some more data'
)
);
curl_setopt
(
$curl
,
CURLOPT_RETURNTRANSFER
,
true
);
$response
=
curl_exec
(
$curl
);
curl_close
(
$curl
);
}
}
}
/********* Saasvaap Edited *****************/
/********* Saasvaap Edited *****************/
/**
/**
...
...
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