nxs_addToPostingQuery

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

Description

nxs_addToPostingQuery( $postID ); 

Parameters (1)

0. $postid
The postid.

Usage

  1. if ( !function_exists( 'nxs_addToPostingQuery' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'nextscripts-social-networks-auto-poster/nxs_functions.php'; 
  3.  
  4. // The postid. 
  5. $postid = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = nxs_addToPostingQuery($postid); 
  9.  

Defined (1)

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

/nxs_functions.php  
  1. function nxs_addToPostingQuery($postID) { global $plgn_NS_SNAutoPoster; if (!isset($plgn_NS_SNAutoPoster)) return; $options = $plgn_NS_SNAutoPoster->nxs_options;  
  2. $quPosts = maybe_unserialize(get_option('NSX_PostsQuery')); if (!is_array($quPosts)) $quPosts = array();  
  3. if (!in_array($postID, $quPosts)) $quPosts[] = $postID; update_option('NSX_PostsQuery', $quPosts);  
  4. //## Update Next Post time 
  5. $currTime = time() + 10 + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ); $nxTime = !empty($options['quNxTime'])?$options['quNxTime']:0; 
  6. if (empty($nxTime) || $nxTime < $currTime) { $options['quNxTime'] = $currTime; update_option('NS_SNAutoPoster', $options); $plgn_NS_SNAutoPoster->nxs_options = $options; }