function invalidate_settings($domain = false) { WPTOUCH_DEBUG(WPTOUCH_INFO, 'Invalidating settings'); if (isset($this->settings_objects[$domain])) { WPTOUCH_DEBUG(WPTOUCH_INFO, '...Invalidated settings on domain ' . $domain . ' were ' . print_r($this->settings_objects[$domain], true)); unsset($this->settings_objects[$domain]); } else { $this->settings_objects = array(); } }
/** * Removes one or more forms of a particular type * @param string $type * @param string|array $form_names * @return int number of forms remaining for the type */ function remove_form($type, $form_names) { $retval = 0; if (isset($this->object->_forms[$type])) { foreach ($form_names as $form) { if ($index = array_search($form, $this->object->_forms[$type])) { unsset($this->object->_forms[$type][$index]); } } $retval = $this->object->get_form_count($type); } return $retval; }
function pmproap_pmpro_after_checkout($user_id) { global $pmproap_ap; if (!empty($_SESSION['ap'])) { $pmproap_ap = intval($_SESSION['ap']); unsset($_SESSION['ap']); } elseif (!empty($_REQUEST['ap'])) { $pmproap_ap = intval($_REQUEST['ap']); } if (!empty($pmproap_ap)) { pmproap_addMemberToPost($user_id, $pmproap_ap); //update the confirmation url if (!function_exists("pmproap_pmpro_confirmation_url")) { function pmproap_pmpro_confirmation_url($url, $user_id, $level) { global $pmproap_ap; $url = add_query_arg("ap", $pmproap_ap, $url); return $url; } } add_filter("pmpro_confirmation_url", "pmproap_pmpro_confirmation_url", 10, 3); } }
/** * Removes a registered observer. * * Detachs a previously registered observer and remove the Event Dispatcher * if there is no more observer registered. * * @param mixed $callback PHP callback that act as listener * * @return bool True if observer was removed, false otherwise * @since 2.0.0 * @access public * @throws HTML_PROGRESS2_ERROR_INVALID_CALLBACK * @see addListener() */ function removeListener($callback) { if (!is_callable($callback)) { return $this->raiseError(HTML_PROGRESS2_ERROR_INVALID_CALLBACK, 'exception', array('var' => '$callback', 'element' => 'valid Class-Method/Function', 'was' => 'callback', 'paramnum' => 1)); } $result = $this->dispatcher->removeObserver($callback); if ($result) { $this->_observerCount--; if ($this->_observerCount == 0) { unsset($this->dispatcher); } } return $result; }
/** * Disable Pingbacks - DoS Attack Prevention */ public function disable_pingback_methods($methods) { unsset($methods['pingback.ping']); return $methods; }