Hook to plugin action links filter.

@author Vova Feldman (@svovaf)
@since  1.0.0
555608
private function hook_plugin_action_links() {
            $this->_logger->entrance();

            $this->_action_links_hooked = true;

            $this->_logger->log( 'Adding action links hooks.' );

            // Add action link to settings page.
            add_filter( 'plugin_action_links_' . $this->_plugin_basename, array(
                &$this,
                '_modify_plugin_action_links_hook'
            ), WP_FS__DEFAULT_PRIORITY, 2 );
            add_filter( 'network_admin_plugin_action_links_' . $this->_plugin_basename, array(
                &$this,
                '_modify_plugin_action_links_hook'
            ), WP_FS__DEFAULT_PRIORITY, 2 );
        }
876636
public function Link($action = null)
    {
        if (!$action
            && Member::currentUserID()
            && !$this->AllowProfileEditing
            && $this->CanAddMembers()
        ) {
            $action = 'add';
        }

        return parent::Link($action);
    }
7412
public static function hook($hook, $params = [])
    {
        $hookRun = isset(self::$mountInfo[$hook]) ? self::$mountInfo[$hook] : null;
        if (!is_null($hookRun)) {
            foreach ($hookRun as $key => $val) {
                if (is_int($key)) {
                    $callBack = $val;
                } else {
                    $plugin = new $key();
                    $callBack = [$plugin, $val];
                }
                $return = call_user_func_array($callBack, array_slice(func_get_args(), 1));

                if (!is_null($return)) {
                    return $return;
                }
            }
        }
        return null;
    }
1027467
private function setup_actions() {
		if ( $this->is_theme ) {
			add_action( 'after_setup_theme', function () {
				$this->plugins_loaded();
			} );

			add_action( 'after_switch_theme', function () {
				$this->plugins_loaded();
				$this->main_init();
				$this->filter->do_action( 'app_activated', $this );
			} );

			add_action( 'switch_theme', function () {
				$this->filter->do_action( 'app_deactivated', $this );
			} );
		} else {
			add_action( 'plugins_loaded', function () {
				$this->plugins_loaded();
			} );

			add_action( 'activated_plugin', function ( $plugin ) {
				$this->plugins_loaded();
				$this->main_init();
				if ( $this->define->plugin_base_name === $plugin ) {
					$this->filter->do_action( 'app_activated', $this );
				}
			} );

			add_action( 'deactivated_plugin', function ( $plugin ) {
				if ( $this->define->plugin_base_name === $plugin ) {
					$this->filter->do_action( 'app_deactivated', $this );
				}
			} );
		}

		add_action( 'init', function () {
			$this->main_init();
		}, 1 );
	}
509469
function __hook(?string $actionName, Request $request, Response $response):?string
    {
        $actionName = $request->getMethod().ucfirst($actionName);
        return parent::__hook($actionName, $request, $response);
    }
1256865
public function build()
    {
        // load filter
        // 1. App/Controller/filter.yml
        // 2. App/Controller/foo.filter.yml
        $filters = $this->controller->getFilters();
        for ($i = 0; $i < count($filters); $i++) {
            $this->loadFilter($filters[$i], $i !== count($filters) - 1);
        }

        // action filter is already last.
        if (! $this->has_action_filter) {
            $this->addFilter('Action');
        } else {
            $action = null;
            $names = array();
            foreach ($this->filter_names as $name) {
                if (strtolower($name) === 'action') {
                    $action = $name;
                } else {
                    $names[] = $name;
                }
            }
            $names[] = $action;
            $this->filter_names = $names;
        }
    }
624416
def post_link_hook(linker)
      basic_name = get_basic_name(linker)
      soname = get_soname(linker)
      symlink_lib_to basic_name
      symlink_lib_to soname
    end
583551
public static function pluginUrl($plugin, $action, $params = array(), $useIndex = true)
    {
    	$plugin = ucfirst($plugin);
        if (!isset(self::$pluggableApplications[$plugin])) {
            throw new AtomikException("Plugin '$plugin' is not registered as a pluggable application");
        }
        
        $route = rtrim(self::$pluggableApplications[$plugin]['route'], '/*');
        return self::url($route . '/' . ltrim($action, '/'), $params, $useIndex, false);
    }
848200
protected function defineActivationHooks(): void {
		$backend = $this->getBackend();
		$pluginName = $this->getFilename();
		$handlers = ["activate", "deactivate", "uninstall"];
		foreach ($handlers as $handler) {
			
			// for each of our handlers, we hook an action handler to our
			// backend component.  the purpose of the BackendInterface is
			// to guarantee that we have three methods, one for each of
			// these hooks.
			
			$hook = $handler . "_" . $pluginName;
			$this->loader->addAction($hook, $backend, $handler);
		}
	}
143055
public function getLinks()
    {
        if ($this->filterCallback === null) {
            $links = $this->links;
        } else {
            $links = array_filter($this->links, function (Link $linkObj) {
                /*@var $linkObj Link */
                return $linkObj->shouldNotVisit() === false;
            });
        }
        
        return $links;
    }
357933
def filter_link(model_class, filter_name, filters: {}, url_params: {})
      is_all = filter_name == :all
      config = filters[filter_name] || {}
      label = is_all ? all_label : filter_label(filter_name, filters)
      url_params =
        if config[:default] then index_params.except(:filter).merge(url_params)
        else index_params.merge(filter: filter_name).merge(url_params)
        end
      index_link(model_class, url_params: url_params) { label }
    end
616852
function _add_tracking_links() {
            if ( ! current_user_can( 'manage_options' ) ) {
                return;
            }

            $this->_logger->entrance();

            /**
             * If the activation has been delegated to site admins, no tracking-related actions for now.
             *
             * @author Leo Fajardo (@leorw)
             */
            if ( $this->_is_network_active && $this->is_network_delegated_connection() ) {
                return;
            }

            if ( fs_request_is_action_secure( $this->get_unique_affix() . '_reconnect' ) ) {
                if ( ! $this->is_registered() && $this->is_anonymous() ) {
                    $this->connect_again();

                    return;
                }
            }

            if ( ( $this->is_plugin() && ! self::is_plugins_page() ) ||
                 ( $this->is_theme() && ! self::is_themes_page() )
            ) {
                // Only show tracking links on the plugins and themes pages.
                return;
            }

            if ( ! $this->is_enable_anonymous() ) {
                // Don't allow to opt-out if anonymous mode is disabled.
                return;
            }

            if ( ! $this->is_free_plan() ) {
                // Don't allow to opt-out if running in paid plan.
                return;
            }

            if ( $this->add_ajax_action( 'stop_tracking', array( &$this, '_stop_tracking_callback' ) ) ) {
                return;
            }

            if ( $this->add_ajax_action( 'allow_tracking', array( &$this, '_allow_tracking_callback' ) ) ) {
                return;
            }

            $url = '#';

            if ( $this->is_registered() ) {
                if ( $this->is_tracking_allowed() ) {
                    $link_text_id = $this->get_text_inline( 'Opt Out', 'opt-out' );
                } else {
                    $link_text_id = $this->get_text_inline( 'Opt In', 'opt-in' );
                }

                add_action( 'admin_footer', array( &$this, '_add_optout_dialog' ) );
            } else {
                $link_text_id = $this->get_text_inline( 'Opt In', 'opt-in' );

                $params = ! $this->is_anonymous() ?
                    array() :
                    array(
                        'nonce'     => wp_create_nonce( $this->get_unique_affix() . '_reconnect' ),
                        'fs_action' => ( $this->get_unique_affix() . '_reconnect' ),
                    );

                $url = $this->get_activation_url( $params );
            }

            if ( $this->is_plugin() && self::is_plugins_page() ) {
                $this->add_plugin_action_link(
                    $link_text_id,
                    $url,
                    false,
                    13,
                    "opt-in-or-opt-out {$this->_slug}"
                );
            }
        }
511839
public function hooks()
    {
        // Register metabox
        // on admin init.
        $this->hook->action(
            'admin_init',
            [$this->metabox, 'register']
        )->dispatch();

        // Save all metabox meta
        // data on post save.
        $this->hook->action('save_post', function ($id) {
            $this->metabox->getModel()->setContext('post');

            $this->metabox->save($id);
        })->dispatch();

        // Save metabox meta data
        // on the comment save.
        $this->hook->action('edit_comment', function ($id) {
            $this->metabox->getModel()->setContext('comment');

            $this->metabox->save($id);
        })->dispatch();
    }
777975
public function hook_linkParse(array &$pObj)
    {
        if (!$this->checkIfSitemapIndexingIsEnabled('typolink')) {
            return;
        }

        // Check
        if (empty($pObj['finalTagParts']) || empty($pObj['conf']) || empty($pObj['finalTagParts']['url'])) {
            // no valid link
            return;
        }

        // Init link information
        $linkConf = $pObj['conf'];
        $linkUrl  = $pObj['finalTagParts']['url'];
        list($linkPageUid, $linkType) = $this->parseLinkConf($pObj);
        $linkUrl = $this->processLinkUrl($linkUrl);

        if ($linkType === null || empty($linkPageUid)) {
            // no valid link
            return;
        }

        // check blacklisting
        if (GeneralUtility::checkUrlForBlacklisting($linkUrl, $this->blacklistConf)) {
            return;
        }

        // ####################################
        //  Init
        // ####################################

        $addParameters = array();
        if (!empty($linkConf['additionalParams'])) {
            parse_str($linkConf['additionalParams'], $addParameters);
        }

        // #####################################
        // Check if link is cacheable
        // #####################################
        $isValid = false;

        // check if conf is valid
        if (!empty($linkConf['useCacheHash'])) {
            $isValid = true;
        }

        // check for typical typo3 params
        $addParamsCache = $addParameters;
        unset($addParamsCache['L']);
        unset($addParamsCache['type']);

        if (empty($addParamsCache)) {
            $isValid = true;
        }

        if (!$isValid) {
            // page is not cacheable, skip it
            return;
        }

        // #####################################
        // Rootline
        // #####################################
        $rootline = GeneralUtility::getRootLine($linkPageUid);

        if (empty($rootline)) {
            return;
        }

        // #####################################
        // Page settings
        // #####################################

        // Fetch sysLanguage
        if (isset($addParameters['L'])) {
            $pageLanguage = (int)$addParameters['L'];
        } else {
            $pageLanguage = (int)GeneralUtility::getLanguageId();
        }

        if (!$this->checkIfTranslationExists($linkPageUid, $pageLanguage)) {
            //translation does not exist => don't index
            return;
        }

        // Index link
        $pageData = $this->generateSitemapPageData($linkUrl, $linkPageUid, $rootline, $pageLanguage, $linkType);
        if (!empty($pageData)) {
            SitemapUtility::index($pageData);
        }
    }
1018644
def action_filter(method_name, *args, **kwargs):
    

    def action_filter(value, context, **_params):
        method = getattr(context["action"], method_name)
        return _filter(method, value, args, kwargs)

    return action_filter
1230630
public function hooks()
    {
        $this->hook->action(
            'init',
            [$this->taxonomy, 'register']
        )->dispatch();

        $this->hook->action(
            "{$this->taxonomy->getModel()->getSlug()}_add_form_fields",
            [$this->taxonomy, 'fill']
        )->dispatch();

        $this->hook->action(
            "{$this->taxonomy->getModel()->getSlug()}_edit_form_fields",
            [$this->taxonomy, 'fill']
        )->dispatch();

        $this->hook->action(
            "created_{$this->taxonomy->getModel()->getSlug()}",
            [$this->taxonomy, 'save']
        )->dispatch();

        $this->hook->action(
            "edited_{$this->taxonomy->getModel()->getSlug()}",
            [$this->taxonomy, 'save']
        )->dispatch();
    }
1030890
private static function get_filter_callbacks( $filter ) {
		global $wp_filter;

		if ( ! isset( $wp_filter[ $filter ] ) ) {
			return false;
		}

		if ( is_a( $wp_filter[ $filter ], 'WP_Hook' ) ) {
			$callbacks = $wp_filter[ $filter ]->callbacks;
		} else {
			$callbacks = $wp_filter[ $filter ];
		}
		if ( is_array( $callbacks ) ) {
			return $callbacks;
		}
		return false;
	}