_post->sq->doseo) { add_filter('sq_noindex', array($this, 'generateNoindex')); add_filter('sq_noindex', array($this, 'packNoindex'), 99); } else { add_filter('sq_noindex', array($this, 'returnFalse')); } } public function generateNoindex($robots = array()) { if (get_option( 'blog_public' ) == 0) { return $robots; } if ((int)$this->_post->sq->noindex == 1) { $robots[] = 'noindex'; }else{ $robots[] = 'index'; } if ((int)$this->_post->sq->nofollow == 1) { $robots[] = 'nofollow'; } elseif (!empty($robots)) { $robots[] = 'follow'; } return $robots; } public function packNoindex($robots = array()) { if (!empty($robots)) { return sprintf("", join(',', $robots)); } return false; } }