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