PluginProbe ʕ •ᴥ•ʔ
Auto Post Cleaner / 3.1.0
Auto Post Cleaner v3.1.0
3.12.0 3.13.1 3.2.4 3.2.5 3.3.0 3.3.10 3.3.11 3.3.8 3.4.2 3.5.3 3.6.0 3.7.0 3.7.1 3.7.2 3.7.3 3.7.5 3.7.6 3.8.0 3.9.0 3.9.4 3.9.6 3.9.7 trunk 3.0.0 3.1.0 3.10.1 3.10.2 3.11.4
delete-old-posts-programmatically / delete-old-posts.php
delete-old-posts-programmatically Last commit date
assets 3 years ago freemius 3 years ago inc 3 years ago composer.json 5 years ago delete-old-posts.php 3 years ago package-lock.json 3 years ago package.json 3 years ago postcss.config.js 5 years ago readme.txt 3 years ago styles.css 3 years ago tailwind.config.js 3 years ago
delete-old-posts.php
89 lines
1 <?php
2
3 /**
4 * Plugin Name: Delete old posts automatically
5 * Description: Keep your website clean by automatically deleting old posts and redirecting the deleted posts to similar ones.
6 * Author: WPMagic
7 * Author URI: https://wpmagic.cloud
8 * License: GPL3
9 * License URI: https://www.gnu.org/licenses/gpl-3.0.html
10 * Version: 3.1.0
11 * Text Domain: delete-old-posts
12 *
13 * @package headless-cms
14 */
15 use DEL\OLD\Posts\Cls ;
16 use DEL\OLD\Posts\Cls\Assets ;
17 // If this file is accessed directory, then abort.
18 if ( !defined( 'WPINC' ) ) {
19 die;
20 }
21
22 if ( function_exists( 'dop_fs' ) ) {
23 dop_fs()->set_basename( false, __FILE__ );
24 } else {
25 // DO NOT REMOVE THIS IF, IT IS ESSENTIAL FOR THE `function_exists` CALL ABOVE TO PROPERLY WORK.
26 // ... Freemius integration snippet ...
27 /*******************
28 * freemius
29 * *************** */
30
31 if ( !function_exists( 'dop_fs' ) ) {
32 // Create a helper function for easy SDK access.
33 function dop_fs()
34 {
35 global $dop_fs ;
36
37 if ( !isset( $dop_fs ) ) {
38 // Include Freemius SDK.
39 require_once dirname( __FILE__ ) . '/freemius/start.php';
40 $dop_fs = fs_dynamic_init( array(
41 'id' => '8165',
42 'slug' => 'delete-old-posts',
43 'type' => 'plugin',
44 'public_key' => 'pk_344033c43756e8fcfcd1e6a2c6b17',
45 'is_premium' => false,
46 'premium_suffix' => 'Professional',
47 'has_addons' => false,
48 'has_paid_plans' => true,
49 'menu' => array(
50 'slug' => 'delete-old-posts',
51 'support' => false,
52 ),
53 'is_live' => true,
54 ) );
55 }
56
57 return $dop_fs;
58 }
59
60 // Init Freemius.
61 dop_fs();
62 // Signal that SDK was initiated.
63 do_action( 'dop_fs_loaded' );
64 }
65
66 // ... Plugin's main file logic ...
67 /********************
68 * Main Plugin Code
69 ********************/
70 // register plugin classes
71 require_once plugin_dir_path( __FILE__ ) . 'inc/class-enqueue-assets.php';
72 require_once plugin_dir_path( __FILE__ ) . 'inc/class-delete-old-posts.php';
73 require_once plugin_dir_path( __FILE__ ) . 'inc/class-delete-old-posts-redirects.php';
74 require_once plugin_dir_path( __FILE__ ) . 'inc/class-delete-old-posts-filters.php';
75 /**
76 * Starts the plugin by initializing the class
77 * Set the plugin in motion.
78 */
79 add_action( 'plugins_loaded', 'deloldp_class_load' );
80 function deloldp_class_load()
81 {
82 new Assets\Enqueue_Assets();
83 new Cls\Delete_Old_Posts();
84 new Cls\Delete_Old_Posts_Filters();
85 new Cls\Delete_Old_Posts_Redirects();
86 }
87
88 }
89