%3$s', esc_url( admin_url( 'admin.php?page=mlang' ) ), /* translators: Title attribute for Polylang settings link */ esc_html__( 'Polylang Languages Setup', 'connect-polylang-elementor' ), esc_attr_x( 'Languages', 'Link title attribute for Polylang settings', 'connect-polylang-elementor' ) ); } /** Elementor My Templates link */ if ( cpel_is_elementor_active() ) { $link_elementor = sprintf( '%3$s', esc_url( admin_url( 'edit.php?post_type=elementor_library' ) ), /* translators: Title attribute for Elementor My Templates link */ esc_html__( 'Elementor My Templates', 'connect-polylang-elementor' ), esc_attr_x( 'Templates', 'Link title attribute for Elementor My Templates', 'connect-polylang-elementor' ) ); } } /** Set the order of the links */ if ( ! empty( $link_polylang ) && ! empty( $link_elementor ) ) { array_unshift( $cpel_links, $link_polylang, $link_elementor ); } // Output the links. return apply_filters( 'cpel/filter/plugins_page/settings_links', $cpel_links ); } /** * Add various support links to Plugins page. * * @since 1.0.0 * * @param array $cpel_links (Default) Array of plugin meta links. * @param string $cpel_file Path of base plugin file. * @return array $cpel_links Array of plugin link strings to build HTML markup. */ public function plugin_links( $cpel_links, $cpel_file ) { if ( CPEL_BASENAME === $cpel_file ) { $cpel_links[] = sprintf( '%3$s (%4$s)', esc_url( 'https://coolplugins.net/product/autopoly-ai-translation-for-polylang/?ref=creame&utm_source=cpel_plugin&utm_medium=inside&utm_campaign=get_pro&utm_content=plugins_list' ), esc_html__( 'AI Translation For Polylang', 'connect-polylang-elementor' ), esc_html__( 'AI Translation', 'connect-polylang-elementor' ), esc_html__( 'Affiliated', 'connect-polylang-elementor' ), ); } // Output the links. return apply_filters( 'cpel/filter/plugins_page/more_links', $cpel_links ); } /** * Replace "Elementor" post state with icon * * @since 2.0.3 * * @param array $states list of states. * @return array */ public function elementor_post_state_icon( $states ) { if ( isset( $states['elementor'] ) && apply_filters( 'cpel/filter/elementor_icon', true ) ) { unset( $states['elementor'] ); return array( 'elementor' => '' ) + $states; } return $states; } }