includes/class-freemius.php
function _modify_plugin_action_links_hook( $links, $file ) {
            $this->_logger->entrance();

            $passed_deactivate = false;
            $deactivate_link   = '';
            $before_deactivate = array();
            $after_deactivate  = array();
            foreach ( $links as $key => $link ) {
                if ( 'deactivate' === $key ) {
                    $deactivate_link   = $link;
                    $passed_deactivate = true;
                    continue;
                }

                if ( ! $passed_deactivate ) {
                    $before_deactivate[ $key ] = $link;
                } else {
                    $after_deactivate[ $key ] = $link;
                }
            }

            ksort( $this->_action_links );

            foreach ( $this->_action_links as $new_links ) {
                foreach ( $new_links as $link ) {
                    $before_deactivate[ $link['key'] ] = '<a href="' . $link['href'] . '"' . ( $link['external'] ? ' target="_blank"' : '' ) . '>' . $link['label'] . '</a>';
                }
            }

            if ( ! empty( $deactivate_link ) ) {
                /**
                 * This HTML element is used to identify the correct plugin when attaching an event to its Deactivate link.
                 *
                 * @since 1.2.1.6 Always show the deactivation feedback form since we added automatic free version deactivation upon premium code activation.
                 */
                $deactivate_link .= '<i class="fs-module-id" data-module-id="' . $this->_module_id . '"></i>';

                // Append deactivation link.
                $before_deactivate['deactivate'] = $deactivate_link;
            }

            return array_merge( $before_deactivate, $after_deactivate );
        }
function _modify_plugin_action_links_hook( $links, $file ) {
            $this->_logger->entrance();

            $passed_deactivate = false;
            $deactivate_link   = '';
            $before_deactivate = array();
            $after_deactivate  = array();
            foreach ( $links as $key => $link ) {
                if ( 'deactivate' === $key ) {
                    $deactivate_link   = $link;
                    $passed_deactivate = true;
                    continue;
                }

                if ( ! $passed_deactivate ) {
                    $before_deactivate[ $key ] = $link;
                } else {
                    $after_deactivate[ $key ] = $link;
                }
            }

            ksort( $this->_action_links );

            foreach ( $this->_action_links as $new_links ) {
                foreach ( $new_links as $link ) {
                    $before_deactivate[ $link['key'] ] = '<a href="' . $link['href'] . '"' . ( $link['external'] ? ' target="_blank"' : '' ) . '>' . $link['label'] . '</a>';
                }
            }

            if ( ! empty( $deactivate_link ) ) {
                /**
                 * This HTML element is used to identify the correct plugin when attaching an event to its Deactivate link.
                 *
                 * @since 1.2.1.6 Always show the deactivation feedback form since we added automatic free version deactivation upon premium code activation.
                 */
                $deactivate_link .= '<i class="fs-module-id" data-module-id="' . $this->_module_id . '"></i>';

                // Append deactivation link.
                $before_deactivate['deactivate'] = $deactivate_link;
            }

            return array_merge( $before_deactivate, $after_deactivate );
        }
function _modify_plugin_action_links_hook ( $ links , $ file ) { $ this -> _logger -> entrance ( ) ; $ passed_deactivate = false ; $ deactivate_link = '' ; $ before_deactivate = array ( ) ; $ after_deactivate = array ( ) ; foreach ( $ links as $ key => $ link ) { if ( 'deactivate' === $ key ) { $ deactivate_link = $ link ; $ passed_deactivate = true ; continue ; } if ( ! $ passed_deactivate ) { $ before_deactivate [ $ key ] = $ link ; } else { $ after_deactivate [ $ key ] = $ link ; } } ksort ( $ this -> _action_links ) ; foreach ( $ this -> _action_links as $ new_links ) { foreach ( $ new_links as $ link ) { $ before_deactivate [ $ link [ 'key' ] ] = '<a href="' . $ link [ 'href' ] . '"' . ( $ link [ 'external' ] ? ' target="_blank"' : '' ) . '>' . $ link [ 'label' ] . '</a>' ; } } if ( ! empty ( $ deactivate_link ) ) { /**
                 * This HTML element is used to identify the correct plugin when attaching an event to its Deactivate link.
                 *
                 * @since 1.2.1.6 Always show the deactivation feedback form since we added automatic free version deactivation upon premium code activation.
                 */ $ deactivate_link .= '<i class="fs-module-id" data-module-id="' . $ this -> _module_id . '"></i>' ; // Append deactivation link.
 $ before_deactivate [ 'deactivate' ] = $ deactivate_link ; } return array_merge ( $ before_deactivate , $ after_deactivate ) ; }
Modify plugin's page action links collection.

@author Vova Feldman (@svovaf)
@since  1.0.0

@param array $links
@param       $file

@return array
Modify plugin s page action links collection .