PluginProbe
Related Posts By PickPlugins / 1.2
Related Posts By PickPlugins v1.2
trunk 1.0 1.1 1.2 2.0.0 2.0.1 2.0.10 2.0.11 2.0.14 2.0.16 2.0.17 2.0.18 2.0.19 2.0.2 2.0.20 2.0.21 2.0.22 2.0.23 2.0.24 2.0.25 2.0.26 2.0.27 2.0.28 2.0.29 2.0.30 All 60 releases
related-post / related-post.php

related-post.php in Related Posts By PickPlugins 1.2, at related-post.php

112 lines 3.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 Plugin Name: Related Post
4 Plugin URI:
5 Description: Display Related Post under post by tags and category.
6 Version: 1.2
7 Author: paratheme
8 Author URI: http://paratheme.com
9 License: GPLv2 or later
10 License URI: http://www.gnu.org/licenses/gpl-2.0.html
11 */
12
13 if ( ! defined('ABSPATH')) exit; // if direct access
14
15 define('related_post_plugin_url', WP_PLUGIN_URL . '/' . plugin_basename( dirname(__FILE__) ) . '/' );
16 define('related_post_plugin_dir', plugin_dir_path( __FILE__ ) );
17 define('related_post_wp_url', 'http://wordpress.org/plugins/related-post/' );
18 define('related_post_pro_url', '' );
19 define('related_post_demo_url', '' );
20 define('related_post_conatct_url', 'http://paratheme.com/contact' );
21 define('related_post_qa_url', 'http://paratheme.com/qa' );
22 define('related_post_plugin_name', 'Related Post' );
23 define('related_post_share_url', 'http://wordpress.org/plugins/related-post/' );
24
25
26 require_once( plugin_dir_path( __FILE__ ) . 'includes/related-post-functions.php');
27 require_once( plugin_dir_path( __FILE__ ) . 'includes/related-post-shortcodes.php');
28
29
30 //Themes php files
31 require_once( plugin_dir_path( __FILE__ ) . 'themes/text/index.php');
32 require_once( plugin_dir_path( __FILE__ ) . 'themes/flat/index.php');
33
34
35
36 function related_post_init_scripts()
37 {
38 wp_enqueue_script('jquery');
39 wp_enqueue_script('related_post_js', plugins_url( '/js/related-post-scripts.js' , __FILE__ ) , array( 'jquery' ));
40
41 wp_localize_script('related_post_js', 'related_post_ajax', array( 'related_post_ajaxurl' => admin_url( 'admin-ajax.php')));
42
43 wp_enqueue_style('related-post-style', related_post_plugin_url.'css/style.css');
44
45 //ParaAdmin framwork
46 wp_enqueue_style('ParaAdmin', related_post_plugin_url.'ParaAdmin/css/ParaAdmin.css');
47 wp_enqueue_script('ParaAdmin', plugins_url( 'ParaAdmin/js/ParaAdmin.js' , __FILE__ ) , array( 'jquery' ));
48
49 // Color Picker
50 wp_enqueue_style( 'wp-color-picker' );
51 wp_enqueue_script( 'related-post-color-picker', plugins_url('/js/related-post-color-picker.js', __FILE__ ), array( 'wp-color-picker' ), false, true );
52
53
54 // Style for themes
55 wp_enqueue_style('related-post-style-text', related_post_plugin_url.'themes/text/style.css');
56 wp_enqueue_style('related-post-style-flat', related_post_plugin_url.'themes/flat/style.css');
57
58
59
60 }
61 add_action("init","related_post_init_scripts");
62
63
64
65
66 register_activation_hook(__FILE__, 'related_post_activation');
67 register_deactivation_hook(__FILE__, 'related_post_deactivation');
68
69 function related_post_activation()
70 {
71 $related_post_version= "1.2";
72 update_option('related_post_version', $related_post_version); //update plugin version.
73
74 $related_post_customer_type= "free"; //customer_type "free"
75 update_option('related_post_customer_type', $related_post_customer_type); //update plugin version.
76
77
78
79
80
81 }
82
83
84 function related_post_deactivation()
85 {
86
87
88
89
90
91 }
92
93
94 add_action('admin_menu', 'related_post_menu_init');
95
96
97
98 function related_post_menu_settings(){
99 include('related-post-settings.php');
100 }
101
102 function related_post_menu_init()
103 {
104 add_menu_page(__('related-post','related-post'), __('Related Post','author_box'), 'manage_options', 'related_post_menu_settings', 'related_post_menu_settings');
105
106 }
107
108
109
110
111
112 ?>