nxs_metaMarkAsPosted

The NextScripts: Social Networks Auto-Poster nxs metaMarkAsPosted function.

Description

nxs_metaMarkAsPosted( $postID, $nt, $did, (string) $args = '' ); 

Parameters (4)

0. $postid
The postid.
1. $nt
The nt.
2. $did
The did.
3. $args — Optional. (string) => ''
The args.

Usage

  1. if ( !function_exists( 'nxs_metaMarkAsPosted' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'nextscripts-social-networks-auto-poster/nxs_functions.php'; 
  3.  
  4. // The postid. 
  5. $postid = null; 
  6.  
  7. // The nt. 
  8. $nt = null; 
  9.  
  10. // The did. 
  11. $did = null; 
  12.  
  13. // The args. 
  14. $args = ''; 
  15.  
  16. // NOTICE! Understand what this does before running. 
  17. $result = nxs_metaMarkAsPosted($postid, $nt, $did, $args); 
  18.  

Defined (1)

The function is defined in the following location(s).

/nxs_functions.php  
  1. if (!function_exists("nxs_metaMarkAsPosted")) { function nxs_metaMarkAsPosted($postID, $nt, $did, $args='') { $mpo = get_post_meta($postID, 'snap'.$nt, true); $mpo = maybe_unserialize($mpo); 
  2. //prr($postID); prr('snap'.$nt); prr($mpo); echo "#####".$postID."|".$nt."|".$did."|".$args; 
  3. if (!is_array($mpo)) $mpo = array(); if (!isset($mpo[$did]) || !is_array($mpo[$did])) $mpo[$did] = array(); 
  4. if ($args=='' || ( is_array($args) && isset($args['isPosted']) && $args['isPosted']=='1')) $mpo[$did]['isPosted'] = '1';  
  5. if (is_array($args) && isset($args['isPrePosted']) && $args['isPrePosted']==1) $mpo[$did]['isPrePosted'] = '1';  
  6. if (is_array($args) && isset($args['pgID'])) $mpo[$did]['pgID'] = $args['pgID'];  
  7. if (is_array($args) && isset($args['postURL'])) $mpo[$did]['postURL'] = $args['postURL'];  
  8. if (is_array($args) && isset($args['pDate'])) $mpo[$did]['pDate'] = $args['pDate'];  
  9. /**$mpo = mysql_real_escape_string(serialize($mpo)); */ delete_post_meta($postID, 'snap'.$nt); add_post_meta($postID, 'snap'.$nt, str_replace('\\', '\\\\', serialize($mpo))); 
  10. }}