PluginProbe ʕ •ᴥ•ʔ
Custom Post Type Permalinks / 3.4.3
Custom Post Type Permalinks v3.4.3
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 / custom-post-type-permalinks.php
custom-post-type-permalinks Last commit date
.github 5 years ago CPTP 5 years ago assets 5 years ago language 5 years ago .distignore 5 years ago .phpcs.xml.dist 5 years ago CONTRIBUTING.md 9 years ago CPTP.php 5 years ago LICENSE 9 years ago custom-post-type-permalinks.php 5 years ago readme.txt 5 years ago screenshot-1.png 5 years ago
custom-post-type-permalinks.php
74 lines
1 <?php
2 /**
3 * Plugin Name: Custom Post Type Permalinks
4 * Plugin URI: https://github.com/torounit/custom-post-type-permalinks
5 * Description: Add post archives of custom post type and customizable permalinks.
6 * Author: Toro_Unit
7 * Author URI: https://torounit.com/
8 * Version: 3.4.3
9 * Text Domain: custom-post-type-permalinks
10 * License: GPL2 or later
11 * Domain Path: /language/
12 *
13 * @package Custom_Post_Type_Permalinks
14 * @version 3.4.3
15 */
16
17 define( 'CPTP_PLUGIN_FILE', __FILE__ );
18 define( 'CPTP_DEFAULT_PERMALINK', '/%postname%/' );
19
20 $cptp_data = get_file_data(
21 __FILE__,
22 array(
23 'Name' => 'Plugin Name',
24 'PluginURI' => 'Plugin URI',
25 'Version' => 'Version',
26 'Description' => 'Description',
27 'Author' => 'Author',
28 'AuthorURI' => 'Author URI',
29 'TextDomain' => 'Text Domain',
30 'DomainPath' => 'Domain Path',
31 'Network' => 'Network',
32 )
33 );
34
35 define( 'CPTP_VERSION', $cptp_data['Version'] );
36 define( 'CPTP_DOMAIN_PATH', $cptp_data['DomainPath'] );
37 define( 'CPTP_TEXT_DOMAIN', $cptp_data['TextDomain'] );
38
39 unset( $cptp_data );
40
41
42 /**
43 * Autoloader for CPTP.
44 *
45 * @since 1.0.0
46 *
47 * @param string $class_name class name.
48 */
49 function cptp_class_loader( $class_name ) {
50 $dir = dirname( __FILE__ );
51 $file_name = $dir . '/' . str_replace( '_', '/', $class_name ) . '.php';
52 if ( is_readable( $file_name ) ) {
53 include $file_name;
54 }
55 }
56
57 spl_autoload_register( 'cptp_class_loader' );
58
59 /**
60 * CPTP init.
61 */
62 function cptp_init() {
63 $custom_post_type_permalinks = CPTP::get_instance();
64 $custom_post_type_permalinks->init();
65 }
66
67 cptp_init();
68
69 /**
70 * Activation hooks.
71 */
72 register_activation_hook( CPTP_PLUGIN_FILE, array( CPTP::get_instance(), 'activate' ) );
73
74