PluginProbe ʕ •ᴥ•ʔ
Custom Post Type Permalinks / 1.2.0
Custom Post Type Permalinks v1.2.0
1.2.0 1.3.0 1.3.1 1.4.0 1.5.1 1.5.2 1.5.4 2.0.0 2.0.1 2.0.2 2.1.1 2.1.2 2.1.3 2.2.0 3.0.0 3.0.1 3.1.0 3.1.1 3.1.3 3.1.4 3.1.5 3.2.0 3.2.1 3.2.2 3.3.0 3.3.1 3.3.4 3.3.5 3.4.0 3.4.0-rc.1 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.5.2 3.5.3 3.5.4 3.5.5 trunk 0.6 0.6.1 0.6.2 0.7 0.7.1 0.7.10 0.7.2 0.7.2.1 0.7.3 0.7.3.1 0.7.4 0.7.4.1 0.7.5 0.7.5.1 0.7.5.2 0.7.5.6 0.7.6 0.7.8 0.7.9 0.7.9.1 0.7.9.2 0.8 0.8.1 0.8.6 0.8.7 0.8.7.1 0.8.7.5 0.8.7.6 0.9 0.9.1 0.9.2.1 0.9.3.1 0.9.3.2 0.9.3.3 0.9.5 0.9.5.1 0.9.5.2 0.9.5.3 0.9.5.4 0.9.5.6 0.9.6 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.1.0
custom-post-type-permalinks / CPTP / Module / Setting.php
custom-post-type-permalinks / CPTP / Module Last commit date
Admin.php 10 years ago FlushRules.php 11 years ago GetArchives.php 11 years ago Option.php 11 years ago Permalink.php 10 years ago Rewrite.php 11 years ago Setting.php 11 years ago
Setting.php
50 lines
1 <?php
2
3
4 /**
5 *
6 * For load plugin.
7 *
8 * @package Custom_Post_Type_Permalinks
9 * @since 0.9.4
10 *
11 * */
12
13
14 class CPTP_Module_Setting extends CPTP_Module {
15
16 public function add_hook() {
17 add_action( 'init', array( $this, 'load_textdomain' ) );
18 add_action( 'plugins_loaded', array( $this, 'check_version' ) );
19 }
20
21 /**
22 *
23 * check_version
24 * @since 0.8.6
25 *
26 */
27
28 public function check_version() {
29 $version = get_option( 'cptp_version', 0 );
30 if ( false === $version ){
31 add_option( 'cptp_version', CPTP_VERSION );
32 }
33 else if ( CPTP_VERSION != $version ) {
34 update_option( 'cptp_version', CPTP_VERSION );
35 }
36 }
37
38
39 /**
40 *
41 * load textdomain
42 * @since 0.6.2
43 *
44 */
45 public function load_textdomain() {
46 load_plugin_textdomain( 'cptp', false, 'custom-post-type-permalinks/language' );
47 }
48
49 }
50