This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // If Polylang is active, hook function on the admin pages | |
| if ( function_exists( 'pll_register_string' ) ) add_action( 'admin_init', 'pll_tc_strings_setup' ); | |
| function pll_tc_strings_setup() { | |
| // Add text to Polylang's string translation panel | |
| pll_register_string( 'fl-topbar-col1-text', 'Contact_Data', 'wipi', true ); | |
| pll_register_string( 'fl-arrow-breadcrumbs', 'arrow_mulilang', 'wipi', true ); | |
| } | |
| function polylanguage_shortcode( $atts ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local vector = {} | |
| vector.__index = vector | |
| local function is_vector(t) | |
| return getmetatable(t) == vector | |
| end | |
| function vector.new(x, y) | |
| return setmetatable({ x = x or 0, y = y or 0 }, vector) | |
| end |