Plugin Directory

Changeset 1335406


Ignore:
Timestamp:
01/25/2016 10:18:33 AM (9 years ago)
Author:
modeewine
Message:

New version 2.2:

  • Optimized compatibility with Polylang 1.8.
  • Improved code.
Location:
polylang-theme-strings
Files:
4 added
2 edited

Legend:

Unmodified
Added
Removed
  • polylang-theme-strings/trunk/mw-polylang-theme-strings.php

    r1310840 r1335406  
    55    Plugin URI: http://modeewine.com/en-polylang-theme-strings
    66    Description: Automatic scanning of strings translation in the theme and registration of them in Polylang plugin.
    7     Version: 2.1.1
     7    Version: 2.2
    88    Author: Modeewine
    99    Author URI: http://modeewine.com
     
    4646        }
    4747
    48         private function Init()
     48        public function Init()
    4949        {
    5050            $this->Paths_Init();
    51             $this->Plugin_Hooks_Init();
    52 
    53             if (self::Is_PLL_Strings_Settings_Page())
    54             {
    55                 $this->Themes_PLL_Strings_Scan();
    56             }
     51            $this->Plugin_Install_Hooks_Init();
     52
     53            add_action('init', array($this, 'Plugin_Hooks_Init'));
    5754        }
    5855
     
    7269        }
    7370
    74         private function Plugin_Hooks_Init()
     71        private function Plugin_Install_Hooks_Init()
    7572        {
    7673            register_activation_hook($this->Path_Get('plugin_file_index'), array('MW_Polylang_Theme_Strings', 'Install'));
    7774            register_uninstall_hook($this->Path_Get('plugin_file_index'), array('MW_Polylang_Theme_Strings', 'Uninstall'));
    78 
     75        }
     76
     77        public function Plugin_Hooks_Init()
     78        {
    7979            if (!is_admin() && function_exists(self::$pll_f))
    8080            {
    81                 add_action('init', array($this, 'Theme_Current_PLL_Strings_Init'));
     81                $this->Theme_Current_PLL_Strings_Init();
    8282            }
    8383            else
    8484            if (self::Is_PLL_Strings_Settings_Page())
    8585            {
    86                 add_action('init', array($this, 'Themes_PLL_Strings_Init'));
     86                $this->Themes_PLL_Strings_Scan();
     87                $this->Themes_PLL_Strings_Init();
    8788            }
    8889        }
  • polylang-theme-strings/trunk/readme.txt

    r1310840 r1335406  
    55Requires at least: 3.8
    66Tested up to: 4.4
    7 Stable tag: 2.1.1
     7Stable tag: 2.2
    88License: GPL2
    99
     
    4848== Changelog ==
    4949
     50= 2.2 (2016-01-25) =
     51
     52* Optimized compatibility with Polylang 1.8.
     53* Improved code.
     54
    5055= 2.1.1 (2015-12-17) =
    5156
Note: See TracChangeset for help on using the changeset viewer.