Plugin Directory

Changeset 2340542


Ignore:
Timestamp:
07/14/2020 07:14:05 PM (6 years ago)
Author:
rmanaf
Message:

1.3.1

Location:
heimdall
Files:
42 added
11 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • heimdall/trunk/LICENSE

    r2105829 r2340542  
    1 Apache License, Version 2.0
     1MIT License
    22
    3 Copyright (C) 2018 Arman Afzal <rman.afzal@gmail.com>
    4 
    5 Licensed under the Apache License, Version 2.0 (the "License");
    6 you may not use this file except in compliance with the License.
    7 You may obtain a copy of the License at
    8 
    9     http://www.apache.org/licenses/LICENSE-2.0
    10 
    11 Unless required by applicable law or agreed to in writing, software
    12 distributed under the License is distributed on an "AS IS" BASIS,
    13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    14 See the License for the specific language governing permissions and
    15 limitations under the License.
    16 
    17 
    18 Third Party Licenses :
    19 
    20 
    21 tagEditor :
    22 
    23 The MIT License
    24 
    25 See Repository at https://github.com/Pixabay/jQuery-tagEditor
    26 
    27 
    28 
    29 Chart.js :
    30 
    31 The MIT License (MIT)
    32 
    33 Copyright (c) 2018 Chart.js Contributors
     3Copyright (c) 2018 Arman Afzal <rman.afzal@gmail.com>
    344
    355Permission is hereby granted, free of charge, to any person obtaining a copy
     
    5020OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    5121SOFTWARE.
     22
     23
     24Third-Party Licenses :
     25
     26
     27tagEditor :
     28
     29The MIT License
     30
     31
     32Chart.js :
     33
     34The MIT License
  • heimdall/trunk/addons/most-used-keywords/assets/css/muk-styles.css

    r2105829 r2340542  
    11.keywords {
    2     display: flex;
    3     flex-flow: wrap;
     2  display: -webkit-box;
     3  display: -ms-flexbox;
     4  display: flex;
     5  -ms-flex-flow: wrap;
     6      flex-flow: wrap;
    47}
     8
    59.keywords li {
    6     flex-grow: 1;
    7     overflow: hidden;
    8     text-align: center;
    9     background: #eee;
    10     border-radius: 3px 0 0 3px;
    11     color: #999;
    12     height: 26px;
    13     line-height: 26px;
    14     padding: 0 20px 0 23px;
    15     position: relative;
    16     margin: 0 10px 10px 0;
    17     text-decoration: none;
    18     -webkit-transition: color 0.2s;
    19     border-radius: 16px;
     10  -webkit-box-flex: 1;
     11      -ms-flex-positive: 1;
     12          flex-grow: 1;
     13  overflow: hidden;
     14  text-align: center;
     15  background: #eee;
     16  border-radius: 3px 0 0 3px;
     17  color: #999;
     18  height: 26px;
     19  line-height: 26px;
     20  padding: 0 20px 0 23px;
     21  position: relative;
     22  margin: 0 10px 10px 0;
     23  text-decoration: none;
     24  transition: color 0.2s;
     25  -webkit-transition: color 0.2s;
     26  border-radius: 16px;
    2027}
     28
    2129.keywords li:hover {
    22     background-color: #2196f3;
    23     color: white;
     30  background-color: #2196f3;
     31  color: white;
    2432}
     33
    2534.keywords li i {
    26     padding: 2px;
    27     padding-left: 5px;
    28     padding-right: 5px;
    29     background: #607d8b;
    30     color: white;
    31     margin-left: 8px;
    32     margin-right: 4px;
    33     font-size: 10px;
    34     border-radius: 4px;
    35     text-align: center;
    36     text-decoration: none;
    37     font-weight: bold;
    38     font-style: normal;
     35  padding: 2px;
     36  padding-left: 5px;
     37  padding-right: 5px;
     38  background: #607d8b;
     39  color: white;
     40  margin-left: 8px;
     41  margin-right: 4px;
     42  font-size: 10px;
     43  border-radius: 4px;
     44  text-align: center;
     45  text-decoration: none;
     46  font-weight: bold;
     47  font-style: normal;
    3948}
     49/*# sourceMappingURL=muk-styles.css.map */
  • heimdall/trunk/addons/most-used-keywords/assets/js/muk-scripts.js

    r2105829 r2340542  
    55        var $muk =  $('#most-used-keywords')
    66       
    7         if(statistics_data['keywords'].length > 0)
     7        if(heimdall['keywords'].length > 0)
    88        {
    99            $muk.empty();
    1010        }
    1111
    12         statistics_data['keywords'].forEach((e,i)=>{
     12        heimdall['keywords'].forEach((e,i)=>{
    1313
    1414            var $meta = $('<li>')
    15                 .text(e['meta'])
     15                .html(e['meta'])
    1616                .attr('data-count' , e['count'])
    1717                .appendTo($muk);
  • heimdall/trunk/addons/most-used-keywords/most-used-keywords.php

    r2105829 r2340542  
    11<?php
     2
    23/**
    3  * Apache License, Version 2.0
    4  *
    5  * Copyright (C) 2018 Arman Afzal <rman.afzal@gmail.com>
    6  *
    7  * Licensed under the Apache License, Version 2.0 (the "License");
    8  * you may not use this file except in compliance with the License.
    9  * You may obtain a copy of the License at
    10  *
    11  *     http://www.apache.org/licenses/LICENSE-2.0
    12  *
    13  * Unless required by applicable law or agreed to in writing, software
    14  * distributed under the License is distributed on an "AS IS" BASIS,
    15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    16  * See the License for the specific language governing permissions and
    17  * limitations under the License.
     4 * MIT License <https://github.com/Rmanaf/wp-heimdall/blob/master/LICENSE>
     5 * Copyright (c) 2018 Arman Afzal <rman.afzal@gmail.com>
    186 */
    197
     
    2311    {
    2412
    25         private static $version = "1.0.0";
     13        // addon slug
    2614        private static $slug = "most-used-keywords";
     15       
    2716
    28         function __construct()
     17        /**
     18         * @since 1.3.1
     19         */
     20        static function init()
    2921        {
    3022           
    31             add_action("admin_enqueue_scripts", [$this, "admin_enqueue_scripts"]);
     23            $class = get_called_class();
    3224
    33             add_action("dcp-heimdall--dashboad-statistic-widget" , [$this , "dashboard_statistic_widget"] , 10);
     25            add_action("admin_enqueue_scripts", "$class::admin_enqueue_scripts");
    3426
    35             add_filter("dcp-heimdall--localized-data", [$this , "get_kewords_data"], 10, 1);
     27            add_action("heimdall--dashboard-statistic-widget" , "$class::dashboard_statistic_widget" , 10);
     28
     29            add_filter("heimdall--localize-script", "$class::get_kewords_data", 10, 1);
    3630
    3731        }
    3832
    39         public function admin_enqueue_scripts()
     33        /**
     34         * @since 1.0.0
     35         */
     36        static function admin_enqueue_scripts()
    4037        {
    4138
     
    4441            if(current_user_can( 'administrator' ) && $screen->id  == 'dashboard' )
    4542            {
    46                 wp_enqueue_style("muk-styles", WP_Heimdall_Plugin::addon_url(self::$slug ,  '/assets/css/muk-styles.css'), [], self::$version, "all");
     43                wp_enqueue_style("muk-styles", WP_Heimdall_Plugin::addon_url(self::$slug ,  '/assets/css/muk-styles.css'), [], WP_Heimdall_Plugin::$version, "all");
    4744           
    48                 wp_enqueue_script("muk-script", WP_Heimdall_Plugin::addon_url(self::$slug ,  '/assets/js/muk-scripts.js'), ["jquery"], self::$version , true);
     45                wp_enqueue_script("muk-script", WP_Heimdall_Plugin::addon_url(self::$slug ,  '/assets/js/muk-scripts.js'), ["jquery"], WP_Heimdall_Plugin::$version , true);
    4946            }
    5047
    5148        }
    5249
    53         public function dashboard_statistic_widget()
     50        /**
     51         * @since 1.0.0
     52         */
     53        static function dashboard_statistic_widget()
    5454        {
    5555            ?>
    56             <h3><?php _e("Most searched keywords in the last week" , WP_Heimdall_Plugin::$text_domain); ?></h2>
     56            <h3><?php esc_html_e("The Most Searched Terms of the Past 7 Days:" , "heimdall"); ?></h3>
    5757            <ul id="most-used-keywords" class="keywords">
    58                 <li><?php _e("No phrases found." ,WP_Heimdall_Plugin::$text_domain); ?></li>
     58                <li><?php esc_html_e("No terms found." , "heimdall"); ?></li>
    5959            </ul>
    60             <hr />
    6160            <?php
    6261        }
    6362
    64         public function get_kewords_data($data)
     63
     64        /**
     65         * @since 1.0.0
     66         */
     67        static function get_kewords_data($data)
    6568        {
    6669
     
    7073            $cdate = current_time( 'mysql' , 1 );
    7174
    72             // start from 6 days ago
    7375            $start = new DateTime($cdate);
    7476            $start->sub(new DateInterval('P6D'));
     
    7779            $end = new DateTime($cdate);
    7880
    79             $data['keywords'] = $wpdb->get_results($this->get_most_used_keywords_query($start , $end), ARRAY_A);
     81            $dt = $wpdb->get_results(self::get_most_used_keywords_query($start , $end), ARRAY_A);
     82
     83            $data['keywords'] = $dt;
    8084
    8185            return $data;
     
    8387        }
    8488
    85         public function get_most_used_keywords_query($start , $end)
     89
     90        /**
     91         * @since 1.0.0
     92         */
     93        static function get_most_used_keywords_query($start , $end)
    8694        {
    8795            // convert dates to mysql format
     
    9199            $blog_id = get_current_blog_id();
    92100
    93             $table_name = WP_Heimdall_Plugin::table_name();
     101            $table_name = WP_Heimdall_Database::$table_name;
    94102
    95103            return "SELECT COUNT(*) count, meta
    96104                    FROM $table_name
    97                     WHERE type='4' AND blog='$blog_id' AND (time BETWEEN '$start' AND '$end')
     105                    WHERE `type`='4' AND `blog`='$blog_id' AND `meta` IS NOT NULL AND (`time` BETWEEN '$start' AND '$end')
    98106                    GROUP BY meta
    99107                    ORDER BY count DESC
     
    105113
    106114}
    107 
    108 new WP_HeimdallAddon_MostUsedKeywords();
  • heimdall/trunk/addons/weekly-report/assets/js/statistics-admin.js

    r2105829 r2340542  
    1313        var parray = [0,0,0,0,0,0,0];
    1414
    15         statistics_data['visitors'].forEach((e,i)=>{
     15        heimdall['visitors'].forEach((e,i)=>{
    1616            var ind = parseInt(e['x']);
    1717            yarray[ind] = parseInt(e['y']);
     
    3838        }];
    3939
    40         if (statistics_data['is_multisite'] == '1') {
     40        if (heimdall['is_multisite'] == '1') {
    4141            dtset.push({
    4242                label: 'This Blog',
     
    6262                },
    6363                responsive: true,
     64                maintainAspectRatio: false,
    6465                scales: {
    6566                    xAxes: [{
     
    6768                    }],
    6869                    yAxes: [{
    69                         stacked: true
     70                        stacked: true,
     71                        ticks: {
     72                            beginAtZero: true,
     73                            callback: function(value) {if (value % 1 === 0) {return value;}}
     74                        }
    7075                    }]
    7176                }
  • heimdall/trunk/addons/weekly-report/weekly-report.php

    r2105829 r2340542  
    11<?php
     2
    23/**
    3  * Apache License, Version 2.0
    4  *
    5  * Copyright (C) 2018 Arman Afzal <rman.afzal@gmail.com>
    6  *
    7  * Licensed under the Apache License, Version 2.0 (the "License");
    8  * you may not use this file except in compliance with the License.
    9  * You may obtain a copy of the License at
    10  *
    11  *     http://www.apache.org/licenses/LICENSE-2.0
    12  *
    13  * Unless required by applicable law or agreed to in writing, software
    14  * distributed under the License is distributed on an "AS IS" BASIS,
    15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    16  * See the License for the specific language governing permissions and
    17  * limitations under the License.
     4 * MIT License <https://github.com/Rmanaf/wp-heimdall/blob/master/LICENSE>
     5 * Copyright (c) 2018 Arman Afzal <rman.afzal@gmail.com>
    186 */
    19 
    207 
    218if (!class_exists('WP_HeimdallAddon_WeeklyReport')) {
     
    2310    class WP_HeimdallAddon_WeeklyReport
    2411    {
    25 
    26         private static $version = "1.0.0";
     12       
     13        // addon slug
    2714        private static $slug = "weekly-report";
    2815
    29         function __construct()
     16
     17        /**
     18         * @since 1.3.1
     19         */
     20        static function init()
    3021        {
    3122
    32             add_action("admin_enqueue_scripts", [$this, "admin_enqueue_scripts"]);
     23            $class = get_called_class();
    3324
    34             add_action("dcp-heimdall--dashboad-statistic-widget" , [$this , "dashboard_statistic_widget"] , 10);
     25            add_action("admin_enqueue_scripts", "$class::admin_enqueue_scripts");
    3526
    36             add_filter("dcp-heimdall--localized-data", [$this , "get_weekly_report_data"], 10, 1);
     27            // add_action("heimdall--dashboard-statistic-widget" , "$class::dashboard_statistic_widget" , 10);
     28
     29            add_action("heimdall--dashboard-statistic-widget-tabs", "$class::dashboard_statistic_widget_tabs", 10);
     30
     31            add_action("heimdall--dashboard-statistic-widget-tab-content", "$class::dashboard_statistic_widget_tab_content", 10);
     32
     33            add_filter("heimdall--localize-script", "$class::get_weekly_report_data" , 10, 1);
    3734
    3835        }
    3936
    40         public function admin_enqueue_scripts()
     37        /**
     38         * @since 1.0.0
     39         */
     40        static function admin_enqueue_scripts()
    4141        {
    4242           
     
    4646            {
    4747
    48                 wp_enqueue_script("weekly-report", WP_Heimdall_Plugin::addon_url(self::$slug ,  '/assets/js/statistics-admin.js'), ['jquery'], self::$version, true);
     48                wp_enqueue_script("weekly-report", WP_Heimdall_Plugin::addon_url(self::$slug ,  '/assets/js/statistics-admin.js'), ['jquery'], WP_Heimdall_Plugin::$version, true);
    4949
    5050            }
     
    5252        }
    5353
    54         public function dashboard_statistic_widget()
     54       
     55        /**
     56         * @since 1.0.0
     57         */
     58        static function dashboard_statistic_widget()
    5559        {
     60        }
     61
     62
     63
     64        /**
     65         * @since 1.3.1
     66         */
     67        static function dashboard_statistic_widget_tabs(){
     68
     69            WP_Heimdall_Dashboard::create_admin_widget_tab(esc_html__( "Views (7 days)", "heimdall" )   , "views");
     70
     71        }
     72
     73        /**
     74         * @since 1.3.1
     75         */
     76        static function dashboard_statistic_widget_tab_content(){
     77
     78            ob_start();
     79
    5680            ?>
    57             <h3><?php _e("Weekly report" , WP_Heimdall_Plugin::$text_domain); ?></h2>
    5881            <div class="chart-container" style="position: relative; width:100%; height:300px;">
    5982                <canvas id="statisticsChart"></canvas>
    6083            </div>
    6184            <?php
     85
     86            WP_Heimdall_Dashboard::create_admin_widget_tab_content("views" , ob_get_clean() );
     87
    6288        }
    6389
    6490
    65         public function get_weekly_report_data($data)
     91        /**
     92         * @since 1.0.0
     93         */
     94        static function get_weekly_report_data($data)
    6695        {
    6796
     
    78107            $end = new DateTime($cdate);
    79108
    80             $data['visitors'] = $wpdb->get_results($this->get_chart_query($start , $end), ARRAY_A );
     109            $data['visitors'] = $wpdb->get_results(self::get_chart_query($start , $end), ARRAY_A );
    81110
    82111            return $data;
     
    84113        }
    85114
    86         public function get_chart_query($start , $end)
     115        /**
     116         * @since 1.0.0
     117         */
     118        static function get_chart_query($start , $end)
    87119        {
    88120
     
    92124
    93125            $blog_id = get_current_blog_id();
     126           
    94127            $extra_field = is_multisite() ? ", SUM(case when blog='$blog_id' then 1 else 0 end) w" : "";
    95128           
    96             $table_name = WP_Heimdall_Plugin::table_name();
     129            $table_name = WP_Heimdall_Database::$table_name;
    97130
    98131            return "SELECT WEEKDAY(time) x,
     
    103136                FROM $table_name
    104137                WHERE (time BETWEEN '$start' AND '$end')
     138                AND type != '4'
    105139                GROUP BY x";
    106140
    107141        }
    108142
     143
    109144    }
    110145
    111146}
    112 
    113 
    114 new WP_HeimdallAddon_WeeklyReport();
  • heimdall/trunk/heimdall.php

    r2105829 r2340542  
    11<?php
     2
    23/**
    3  * Apache License, Version 2.0
    4  *
    5  * Copyright (C) 2018 Arman Afzal <rman.afzal@gmail.com>
    6  *
    7  * Licensed under the Apache License, Version 2.0 (the "License");
    8  * you may not use this file except in compliance with the License.
    9  * You may obtain a copy of the License at
    10  *
    11  *     http://www.apache.org/licenses/LICENSE-2.0
    12  *
    13  * Unless required by applicable law or agreed to in writing, software
    14  * distributed under the License is distributed on an "AS IS" BASIS,
    15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    16  * See the License for the specific language governing permissions and
    17  * limitations under the License.
     4 * Plugin Name: Heimdall
     5 * Plugin URI: https://github.com/Rmanaf/wp-heimdall
     6 * Description: This plugin is for tracking your client activities.
     7 * Version: 1.3.1
     8 * Author: Rmanaf
     9 * Author URI: https://profiles.wordpress.org/rmanaf/
     10 * License: MIT License
     11 * License URI: https://github.com/Rmanaf/wp-heimdall/blob/master/LICENSE
     12 * Text Domain: heimdall
     13 * Domain Path: /languages
    1814 */
    1915
    20  /*
    21     Plugin Name: Heimdall
    22     Plugin URI: https://wordpress.org/plugins/heimdall
    23     Description: A simple way to tracking clients activities.
    24     Version: 1.3.0
    25     Author: Arman Afzal
    26     Author URI: https://github.com/Rmanaf
    27     License: Apache License, Version 2.0
    28     Text Domain: heimdall
    29  */
    30 
    3116
    3217defined('ABSPATH') or die;
    3318
    3419require_once __DIR__ . "/includes/commons.php";
    35 require_once __DIR__ . "/includes/query-builder.php";
     20require_once __DIR__ . "/includes/database.php";
     21require_once __DIR__ . "/includes/options.php";
     22require_once __DIR__ . "/includes/dashboard.php";
    3623
    3724if (!class_exists('WP_Heimdall_Plugin')) {
     
    4027    {
    4128
    42         public static $text_domain = 'heimdall';
    43 
    44         private static $db_version = '1.0.1';
     29        static $version = "1.3.1";
    4530
    4631        private static $content_type = [
     
    5439        ];
    5540
    56         private static $query_params = ['unique',   'today', 'visitors',  'network' ];
    57 
    58         private static $styles = [ 'lt-10',  'lt-50', 'lt-100', 'lt-500',  'gt-500',  'gt-1k' , 'gt-5k' , 'em-10k' , 'em-1m' , 'em-5m' ];
    59 
    60         private static $hit_hooks = [ 'wp_footer' ];
    61    
    62         function __construct()
    63         {
    64 
    65             $this->check_db();
    66 
    67             add_shortcode('statistics', [$this, 'statistics_shortcode']);
    68 
    69             add_action('admin_init', [$this, 'admin_init']);
    70 
    71             add_action('admin_print_scripts', [$this, 'enqueue_admin_scripts']);
    72 
    73             add_action( "wp_dashboard_setup", [$this, "wp_dashboard_setup"] );
    74 
    75             add_action( 'pre_get_posts', [$this , 'pre_get_posts']);
    76 
    77 
    78             add_filter( "the_content" , [$this , 'filter_content']);
    79 
    80             add_filter( "the_excerpt" , [$this , 'filter_excerpt']);
    81 
    82            
    83 
    84             $hooks = get_option( 'wp_dcp_heimdall_active_hooks', '');
    85 
    86 
    87            
    88 
    89             if(empty($hooks))
    90             { 
    91                 $hooks = self::$hit_hooks;
    92             } else {
    93                 $hooks = explode(',' ,  $hooks );
    94             }
    95 
    96 
    97             foreach($hooks as $h)
    98             {
    99                 add_action($h, [$this, 'record_activity']);
    100             }
    101 
    102 
    103             /**
    104              * DCP hooks
    105              */
    106             add_action('dcp_settings_before_content', [$this, 'settings_page']);
    107 
    108             add_filter('dcp_shortcodes_list', [$this, 'add_shortcode_to_list']);
    109 
    110         }
    111 
    112         /**
    113          * register general settings
    114          * @since 1.0.0
    115          */
    116         public function admin_init()
    117         {
    118 
    119             // checks for control panel plugin
    120             if (defined('DIVAN_CONTROL_PANEL')) {
    121 
    122                 global $_DCP_PLUGINS;
    123 
    124                 // control panel will take setting section
    125                 $group = 'dcp-settings-general';
    126 
    127                 array_push($_DCP_PLUGINS, ['slug' => self::$text_domain, 'version' => $this->get_version()]);
    128 
    129             } else {
    130 
    131                 $group = 'general';
    132 
    133             }
    134 
    135             register_setting($group, 'wp_dcp_heimdall_active_hooks', ['default' => '']);
    136             register_setting($group, 'wp_dcp_heimdall_post_position', ['default' => 0]);
    137             register_setting($group, 'wp_dcp_heimdall_page_position', ['default' => 0]);
    138 
    139             // settings section
    140             add_settings_section(
    141                 'wp_dcp_heimdall_plugin',
    142                 __('Heimdall', self::$text_domain) . "<span class=\"gdcp-version-box wp-ui-notification\">" . $this->get_version() . "<span>",
    143                 [&$this, 'settings_section_cb'],
    144                 $group
    145             );
    146 
    147             add_settings_field(
    148                 'wp_dcp_heimdall_active_hooks',
    149                 "Hooks",
    150                 [&$this, 'settings_field_cb'],
    151                 $group,
    152                 'wp_dcp_heimdall_plugin',
    153                 ['label_for' => 'wp_dcp_heimdall_active_hooks']
    154             );
    155 
    156             add_settings_field(
    157                 'wp_dcp_heimdall_post_position',
    158                 "The Number of Visitors",
    159                 [&$this, 'settings_field_cb'],
    160                 $group,
    161                 'wp_dcp_heimdall_plugin',
    162                 ['label_for' => 'wp_dcp_heimdall_post_position']
    163             );
    164 
    165             add_settings_field(
    166                 'wp_dcp_heimdall_page_position',
    167                 "",
    168                 [&$this, 'settings_field_cb'],
    169                 $group,
    170                 'wp_dcp_heimdall_plugin',
    171                 ['label_for' => 'wp_dcp_heimdall_page_position']
    172             );
    173 
    174         }
    175 
    176         public function pre_get_posts($query)
    177         {
    178 
    179             global $wpdb;
    180 
    181             if( is_admin() )
    182             {
     41
     42        static $hit_hooks = [];
     43
     44
     45        private static $addons = [
     46            "StatisticsShortcode",
     47            "MostUsedKeywords",
     48            "WeeklyReport",
     49            "Today",
     50            "WorldMap"
     51        ];
     52
     53
     54        /**
     55         * @since 1.3.1
     56         */
     57        static function init()
     58        {
     59
     60            $class = get_called_class();
     61
     62            self::$hit_hooks = explode(',',  get_option('wp_dcp_heimdall_active_hooks', ''));
     63
     64
     65
     66            WP_Heimdall_Database::check_db();
     67
     68            WP_Heimdall_Options::init();
     69
     70            WP_Heimdall_Dashboard::init();
     71
     72
     73
     74
     75            add_action('admin_print_scripts', "$class::enqueue_admin_scripts");
     76
     77
     78            add_action("wp_enqueue_scripts",  "$class::enqueue_scripts");
     79
     80
     81            add_action('pre_get_posts', "$class::pre_get_posts");
     82
     83
     84            add_filter("the_content", "$class::filter_content");
     85
     86            add_filter("the_excerpt", "$class::filter_excerpt");
     87
     88            add_action('plugins_loaded',  "$class::load_plugin_textdomain");
     89
     90
     91
     92            foreach (self::$hit_hooks as $h) {
     93
     94                add_action($h, function () use ($h) {
     95
     96                    if (did_action($h) > 1) {
     97                        return;
     98                    }
     99
     100                    self::record_activity();
     101                });
     102            }
     103
     104            self::activate_addons();
     105        }
     106
     107
     108        /**
     109         * @since 1.3.1
     110         */
     111        static function load_plugin_textdomain(){
     112            load_plugin_textdomain( "heimdall", FALSE, basename( dirname( __FILE__ ) ) . '/languages/' );
     113        }
     114
     115
     116        /**
     117         * @since 1.0.0
     118         */
     119        static function pre_get_posts($query)
     120        {
     121
     122            if (is_admin()) {
    183123                return;
    184124            }
    185125
    186             if ( $query->is_search() && $query->is_main_query())
    187             {
     126            if (did_action("pre_get_posts") > 1) {
     127                return;
     128            }
     129
     130
     131            if ($query->is_search() && $query->is_main_query()) {
     132
     133                $keyword = get_search_query();
     134
     135                // ignore whitespace and empty values
     136                if (empty(trim($keyword))) {
     137                    return;
     138                }
    188139
    189140                $ip = WP_Heimdall_Commons::get_ip_address();
    190141
    191                 if($ip == null)
    192                 {
     142                if ($ip == null) {
    193143                    $ip = 'unknown';
    194144                }
    195145
    196                 $wpdb->insert(
    197                     self::table_name(),
    198                     [
    199                         'time' => current_time('mysql' , 1),
    200                         'ip' => $ip,
    201                         'page' => null,
    202                         'type' => 4,
    203                         'blog' => get_current_blog_id(),
    204                         'user' => get_current_user_id(),
    205                         'hook' => 'pre_get_posts',
    206                         'meta' => esc_html( esc_sql( get_search_query() ) )
    207                     ]
    208                 );
    209 
    210                 echo $wpdb->last_error;
    211 
    212             }
    213 
    214         }
    215 
    216 
    217         /**
    218          * add statistics shortcode to the excerpt
    219          * @since 1.0.0
    220          */
    221         public function filter_excerpt($excerpt)
     146                WP_Heimdall_Database::insert_once($ip, null,  4,   'pre_get_posts', $keyword);
     147            }
     148        }
     149
     150
     151        /**
     152         * @since 1.0.0
     153         */
     154        static function filter_excerpt($excerpt)
    222155        {
    223156
    224157            $option = '';
    225158
    226             if(is_single()){
     159            if (is_single()) {
    227160                $option = 'wp_dcp_heimdall_post_position';
    228161            }
    229162
    230             if(empty($option))
    231             {
     163            if (empty($option)) {
    232164                return $excerpt;
    233165            }
     
    235167            $pos = get_option($option, 0);
    236168
    237             switch($pos){
    238                 case 3: return $excerpt . "[statistics]" ;
    239                 case 4: return "[statistics]" . $excerpt ;
     169            $value =  apply_filters("heimdall--views-num",  "[statistics]");
     170
     171            switch ($pos) {
     172                case 3:
     173                    return $excerpt . $value;
     174                case 4:
     175                    return $value . $excerpt;
    240176                default:
    241177                    return $excerpt;
    242178            }
    243 
    244         }
    245 
    246         /**
    247          * adds the statistics shortcode to the content
    248          * @since 1.0.0
    249          */
    250         public function filter_content($content)
     179        }
     180
     181        /**
     182         * @since 1.0.0
     183         */
     184        static function filter_content($content)
    251185        {
    252186
    253187            $option = '';
    254188
    255             if(is_page()){
     189            if (is_page()) {
    256190                $option = 'wp_dcp_heimdall_page_position';
    257191            }
    258192
    259             if(is_single()){
     193            if (is_single()) {
    260194                $option = 'wp_dcp_heimdall_post_position';
    261195            }
    262196
    263             if(empty($option))
    264             {
     197            if (empty($option)) {
    265198                return $content;
    266199            }
     
    268201            $pos = get_option($option, 0);
    269202
    270             switch($pos){
    271                 case 1: return $content . "[statistics]" ;
    272                 case 2: return "[statistics]" . $content ;
     203            $value =  apply_filters("heimdall--views-num",  "[statistics]");
     204
     205            switch ($pos) {
     206                case 1:
     207                    return $content . $value;
     208                case 2:
     209                    return $value . $content;
    273210                default:
    274211                    return $content;
    275212            }
    276 
    277         }
    278 
    279 
    280         /**
    281          * adds the statistics widget to the dashboard
    282          * @since 1.0.0
    283          */
    284         public function wp_dashboard_setup()
    285         {
    286        
    287             if(current_user_can( 'administrator' )){
    288                
    289                 wp_add_dashboard_widget('dcp_heimdall_statistics', 'Statistics', [$this,'admin_dashboard_widget']);
    290 
    291             }
    292 
    293         }
    294        
    295 
    296 
    297         /**
    298          * report widget
    299          * @since 1.0.0
    300          */
    301         public function admin_dashboard_widget()
    302         {
    303 
    304             do_action("dcp-heimdall--dashboad-statistic-widget");
    305 
    306         }
    307 
    308 
    309          /**
    310          * Add shortcodes to the DCP shortcodes list
    311          * @since 1.0.0
    312          */
    313         public function add_shortcode_to_list($list){
    314 
    315             $list[] = [
    316                 'template' => "[statistics class='' params='' hook='']",
    317                 'description' => __("Renders the number of visitors", self::$text_domain)
    318             ];
    319 
    320             $list[] = [
    321                 'template' => "[access ip='' error='' before='' after='' die='']",
    322                 'description' => __("Restricts access to a page or a part of it according to the client's IP.", self::$text_domain)
    323             ];
    324 
    325             return $list;
    326 
    327         }
    328 
    329         /**
    330          * statistics shortcode
    331          * @since 1.0.0
    332          */
    333         public function statistics_shortcode($atts = [], $content = null)
    334         {
    335 
    336             global $wpdb;
    337 
    338             extract(shortcode_atts( [
    339                 'class'  => '',
    340                 'params' => 'unique', // by default get unique IP
    341                 'hook'  => '',
    342                 'tag'   => 'p'
    343             ], $atts));
    344 
    345             $query_builder = new WP_Heimdall_Query_Builder(
    346                 self::table_name() ,
    347                 explode(',', strtolower(trim($params))) ,
    348                 $hook
    349             );
    350 
    351             $count = $wpdb->get_var( $query_builder->get_query() );
    352 
    353             $style = $this->get_style($count);
    354 
    355             $tag = strtolower(trim($tag));
    356 
    357             $result = "<$tag data-statistics-value=\"$count\" class=\"$class statistics-$style\">$count</$tag>";
    358 
    359             return apply_filters("heimdall_statistics_result" , $result);
    360 
    361         }
    362 
    363 
    364         /**
    365          * settings page content
    366          * @since 1.0.0
    367          */
    368         public function settings_page()
    369         {
    370 
    371             global $_DCP_ACTIVE_TAB;
    372 
    373             if (defined('DIVAN_CONTROL_PANEL') && $_DCP_ACTIVE_TAB != 'overview') {
    374                 return;
    375             }
    376 
    377             ?>
    378            
    379             <h2><?php _e('Settings' , self::$text_domain) ?></h2>
    380 
    381 
    382             <?php
    383 
    384         }
    385 
    386 
    387         /**
    388          * settings section header
    389          * @since 1.0.0
    390          */
    391         public function settings_section_cb(){
    392 
    393             ?>
    394             <table class="form-table">
    395                 <tbody>
    396                     <tr>
    397                         <th scope="row">
    398                             <label>
    399                                 <?php _e("Bug & Issues Reporting"); ?>
    400                             </label>
    401                         </th>
    402                         <td>
    403                             <?php _e("<p>If you faced any issues, please tell us on <strong><a target=\"_blank\" href=\"https://github.com/Rmanaf/wp-heimdall/issues/new\">Github</a></strong>"); ?>
    404                         </td>
    405                     </tr>
    406                 </tbody>
    407             </table>
    408             <?php
    409 
    410         }
    411 
    412 
    413         /**
    414          * settings section
    415          * @since 1.0.0
    416          */
    417         public function settings_field_cb($args)
    418         {
    419             switch ($args['label_for']) {
    420 
    421                 case 'wp_dcp_heimdall_active_hooks':
    422 
    423                     $hooks = get_option('wp_dcp_heimdall_active_hooks', implode(',' , self::$hit_hooks));
    424 
    425                     ?>
    426                         <textarea data-placeholder="Enter Hooks:" class="large-text code" id="wp_dcp_heimdall_active_hooks" name="wp_dcp_heimdall_active_hooks"><?php echo $hooks; ?></textarea>   
    427                     <?php
    428                     break;
    429 
    430                 case 'wp_dcp_heimdall_page_position':
    431                
    432                     $pos = get_option('wp_dcp_heimdall_page_position', 0);
    433 
    434                     ?>
    435 
    436                     <span><?php _e('Page', self::$text_domain) ?></span>
    437                    
    438                     <select name="wp_dcp_heimdall_page_position" id="wp_dcp_heimdall_page_position" >
    439                         <option <?php selected( $pos , 0); ?> value="0"> <?php _e('— Do not show —', self::$text_domain); ?>
    440                         <option <?php selected( $pos , 1); ?> value="1"> <?php _e('After the Content', self::$text_domain); ?>
    441                         <option <?php selected( $pos , 2); ?> value="2"> <?php _e('Before the Content', self::$text_domain); ?>
    442                     </select>
    443                
    444                     <?php
    445                     break;
    446 
    447                 case 'wp_dcp_heimdall_post_position':
    448                
    449                     $pos = get_option('wp_dcp_heimdall_post_position', 0);
    450 
    451                     ?>
    452 
    453                     <span><?php _e('Post', self::$text_domain) ?></span>
    454 
    455                     <select name="wp_dcp_heimdall_post_position" id="wp_dcp_heimdall_post_position" >
    456                         <option <?php selected( $pos , 0); ?> value="0"> <?php _e('— Do not show —', self::$text_domain); ?>
    457                         <option <?php selected( $pos , 1); ?> value="1"> <?php _e('After the Content', self::$text_domain); ?>
    458                         <option <?php selected( $pos , 2); ?> value="2"> <?php _e('Before the Content', self::$text_domain); ?>
    459                         <option <?php selected( $pos , 3); ?> value="3"> <?php _e('After the Excerpt', self::$text_domain); ?>
    460                         <option <?php selected( $pos , 4); ?> value="4"> <?php _e('Before the Excerpt', self::$text_domain); ?>
    461                     </select>
    462 
    463                     <?php
    464                     break;
    465 
    466             }
    467 
    468         }
    469 
    470 
    471         /**
    472          * returns table name
    473          * @since 1.0.0
    474          */
    475         public static function table_name()
    476         {
    477 
    478             return 'dcp_heimdall_activities';
    479 
    480         }
    481 
    482 
    483         /**
    484          * checks if plugin table exists in database
    485          * @since 1.0.0
    486          */
    487         private function check_db()
    488         {
    489 
    490             global $wpdb;
    491 
    492             $dbv = get_option('wp_dcp_heimdall_db_version', '');
    493 
    494             if ($dbv == self::$db_version) {
    495 
    496                 return;
    497 
    498             }
    499 
    500             $table_name = self::table_name();
    501 
    502             $charset_collate = $wpdb->get_charset_collate();
    503 
    504             $sql = "CREATE TABLE $table_name (
    505                 id bigint(20) NOT NULL AUTO_INCREMENT,
    506                 blog bigint(20) NOT NULL,
    507                 time datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
    508                 ip tinytext,
    509                 page bigint(20),
    510                 type smallint,
    511                 user smallint,
    512                 hook tinytext,
    513                 meta tinytext,
    514                 PRIMARY KEY  (id)
    515                 ) $charset_collate;";
    516 
    517             require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
    518 
    519             dbDelta($sql);
    520 
    521             update_option('wp_dcp_heimdall_db_version', self::$db_version);
    522            
    523 
    524         }
    525 
    526 
    527         /**
    528          * prints admin scripts
    529          * @since 1.0.0
    530          */
    531         public function enqueue_admin_scripts()
    532         {
    533 
    534             global $wpdb;
    535 
    536             $ver = $this->get_version();
     213        }
     214
     215
     216        /**
     217         * @since 1.0.0
     218         */
     219        static function enqueue_scripts()
     220        {
     221
     222            $ver = self::$version;
     223
     224            $data =  apply_filters("heimdall--client-script", ['ajaxurl' => admin_url('admin-ajax.php')]);
     225
     226            wp_register_script("heimdall-client", "", []);
     227
     228            wp_localize_script("heimdall-client", "heimdall",  $data);
     229
     230            wp_enqueue_script("heimdall-client");
     231
     232            wp_enqueue_script("heimdall-client-ajax", plugins_url('/assets/js/client-ajax.js', __FILE__), ["heimdall-client"], $ver, false);
     233        }
     234
     235
     236        /**
     237         * @since 1.0.0
     238         */
     239        static function enqueue_admin_scripts()
     240        {
     241
     242            $ver = self::$version;
    537243
    538244            $screen = get_current_screen();
    539245
    540             if(current_user_can( 'administrator' ) && $screen->id  == 'dashboard' )
    541             {
    542 
    543                 wp_register_script('heimdall-admin-script', '', [], false);
    544 
    545                 wp_enqueue_script( 'dcp-chart-js', plugins_url( '/assets/chart.min.js', __FILE__ ), [], $ver, false);
    546 
    547                 new WP_Heimdall_Query_Builder(self::table_name());
    548                
    549 
    550                 wp_enqueue_script( 'dcp-chart-js-bundle', plugins_url( '/assets/chart.bundle.min.js', __FILE__ ), [], $ver, false);
    551                 wp_enqueue_script( 'dcp-chart-js', plugins_url( '/assets/chart.min.js', __FILE__ ), [], $ver, false);
    552                 wp_enqueue_script( 'heimdall-admin-script' );
    553                 wp_localize_script( 'heimdall-admin-script', 'statistics_data', apply_filters("dcp-heimdall--localized-data" , [
    554                     'is_multisite' => is_multisite()
     246            if (current_user_can('administrator') && $screen->id  == 'dashboard') {
     247
     248                // tabs
     249                wp_enqueue_style("heimdall-tabs", plugins_url('/assets/css/tabs.css', __FILE__), [], $ver, "all");
     250
     251                wp_enqueue_script("heimdall-tabs", plugins_url('/assets/js/tabs.js', __FILE__), [], $ver, false);
     252
     253
     254                // chart.js
     255                wp_enqueue_script('dcp-chart-js-bundle', plugins_url('/assets/js/chart.bundle.min.js', __FILE__), [], $ver, false);
     256
     257
     258
     259                wp_register_script('heimdall-admin', '', [], false);
     260
     261                wp_enqueue_script('heimdall-admin');
     262
     263                wp_localize_script('heimdall-admin', 'heimdall', apply_filters("heimdall--localize-script", [
     264                    'is_multisite' => is_multisite(),
     265                    'ajaxurl' => admin_url('admin-ajax.php')
    555266                ]));
    556 
    557                 echo $wpdb->last_error;
    558 
    559 
    560             }
    561 
    562             if(in_array($screen->id , ['options-general', 'settings_page_dcp-settings'])){
    563 
    564                 //settings
    565                 wp_enqueue_style('dcp-tag-editor', plugins_url('assets/jquery.tag-editor.css', __FILE__), [], $ver, 'all');
    566                 wp_enqueue_style('heimdall-settings', plugins_url('assets/heimdall-settings.css', __FILE__), [], $ver, 'all');
    567 
    568                 wp_enqueue_script('dcp-caret', plugins_url('assets/jquery.caret.min.js', __FILE__), ['jquery'], $ver, true);
    569                 wp_enqueue_script('dcp-tag-editor', plugins_url('assets/jquery.tag-editor.min.js', __FILE__), [], $ver, true);
    570                 wp_enqueue_script('heimdall-settings', plugins_url('assets/heimdall-settings.js', __FILE__), [], $ver, true);
    571 
    572             }
    573            
    574 
    575         }
    576 
    577 
    578         /**
    579          * records client activity
    580          * @since 1.0.0
    581          */
    582         public function record_activity()
    583         {
    584 
    585             global $wpdb, $post;
     267            }
     268        }
     269
     270
     271        /**
     272         * @since 1.3.1
     273         */
     274        static function get_request_type_page()
     275        {
     276
     277            global $post;
    586278
    587279            $type = 0;
    588280            $page = null;
    589281
    590             /**
     282             /**
    591283             * type 0 is undefined
    592              * type 1 is home page
    593              * type 2 is inner page
     284             * type 1 is homepage
     285             * type 2 is page
    594286             * type 3 is post
    595287             * type 4 is search
     288             * type 5 is 404
    596289             */
    597             if(is_home() || is_front_page())
    598             {
    599 
     290            if (is_home() || is_front_page()) {
    600291                $type = 1;
    601 
     292            } else if (is_404()) {
     293                $type = 5;
    602294            } else if (is_page() && !is_front_page()) {
    603 
    604295                $page = $post->ID;
    605 
    606296                $type = 2;
    607 
    608297            } else if (is_single()) {
    609 
    610298                $page = $post->ID;
    611 
    612299                $type = 3;
    613 
    614             }
     300            }
     301
     302            $type = apply_filters("heimdall--record-type", $type);
     303
     304            return [
     305                "page" => $page,
     306                "type" => $type
     307            ];
     308        }
     309
     310
     311        /**
     312         * @since 1.0.0
     313         */
     314        static function record_activity($type = null, $pid = null)
     315        {
     316
     317            global $wp;
     318
     319            $type_post_dt = self::get_request_type_page();
    615320
    616321            $ip = WP_Heimdall_Commons::get_ip_address();
    617322
    618             if($ip == null)
    619             {
     323            if ($ip == null) {
    620324                $ip = 'unknown';
    621325            }
    622326
    623             $wpdb->insert(
    624                 self::table_name(),
    625                 [
    626                     'time' => current_time('mysql' , 1),
    627                     'ip' => $ip,
    628                     'page' => $page,
    629                     'type' => $type,
    630                     'blog' => get_current_blog_id(),
    631                     'user' => get_current_user_id(),
    632                     'hook' => current_filter(),
    633                     'meta' => null
    634                 ]
     327            $filter = current_filter();
     328
     329            $url = add_query_arg($wp->query_vars, home_url($wp->request));
     330
     331            $metav2 = [];
     332
     333            if (!empty($ip) && $ip != "unknown") {
     334                $metav2["ip"] = $ip;
     335            }
     336
     337            $metav2["url"] = urlencode($url);
     338
     339            $metav2 = apply_filters("heimdall--record-metadata", $metav2);
     340
     341            $metav2 = json_encode($metav2, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
     342
     343            WP_Heimdall_Database::insert_once(
     344                $ip,
     345                is_null($pid) ?  $type_post_dt["page"] : $pid,
     346                is_null($type) ? $type_post_dt["type"] : $type,
     347                $filter,
     348                $type_post_dt["type"] == 5 ? get_queried_object() : null,
     349                $metav2
    635350            );
    636351
    637             echo $wpdb->last_error;
    638 
    639         }
    640 
    641         private function get_style($v){
    642 
    643             $res = 0;
    644 
    645             // lt-50
    646             if($v < 50 && $v > 10 ) $res = 1;
    647            
    648             // lt-100
    649             if($v < 100 && $v > 50 ) $res = 2;
    650            
    651             // lt-500
    652             if($v < 500 && $v > 100 )  $res = 3;
    653            
    654             // gt-500
    655             if($v < 1000 && $v > 500 ) $res = 4;
    656 
    657             // gt-1k
    658             if($v < 5000 && $v > 1000) $res = 5;
    659            
    660             // gt-5k
    661             if($v < 10000 && $v > 5000) $res = 6;
    662            
    663             // em-10k
    664             if($v < 1000000 && $v > 10000) $res = 7;
    665            
    666             // em-1m
    667             if($v < 5000000 && $v > 1000000) $res = 8;
    668            
    669             // em-5m
    670             if($v > 5000000) $res = 9;
    671            
    672             return self::$styles[$res];
    673 
    674         }
    675 
    676 
    677         public static function addon_url($addon , $path)
    678         {
    679             return plugins_url("/addons/$addon/$path" , __FILE__);
    680         }
    681 
    682         /**
    683          * returns plugin version
    684          * @since 1.0.0
    685          */
    686         private function get_version()
    687         {
    688 
    689             return get_plugin_data(__FILE__)['Version'];
    690 
    691         }
    692 
     352        }
     353
     354
     355
     356        /**
     357         * @since 1.0.0
     358         */
     359        static function activate_addons()
     360        {
     361
     362            $addons_dir = __DIR__ . "/addons";
     363
     364            foreach (glob("$addons_dir/*", GLOB_ONLYDIR) as $addon) {
     365
     366                $name = basename($addon);
     367
     368                $path = path_join($addon, "{$name}.php");
     369
     370                if (file_exists($path)) {
     371
     372                    require_once $path;
     373                }
     374            }
     375
     376            foreach (self::$addons as $addon) {
     377                $class = "WP_HeimdallAddon_" . $addon;
     378                $class::init();
     379            }
     380        }
     381
     382
     383        /**
     384         * @since 1.0.0
     385         */
     386        static function addon_url($addon, $path)
     387        {
     388            $path = rtrim(ltrim($path, "/"), "/");
     389            return plugins_url("/addons/$addon/$path", __FILE__);
     390        }
    693391    }
    694 
    695392}
    696393
    697 $HEIMDALL_PLUGIN_INSTANCE = new WP_Heimdall_Plugin();
    698 
    699 require_once __DIR__ . "/addons/access/access.php";
    700 require_once __DIR__ . "/addons/most-used-keywords/most-used-keywords.php";
    701 require_once __DIR__ . "/addons/weekly-report/weekly-report.php";
     394WP_Heimdall_Plugin::init();
  • heimdall/trunk/includes/commons.php

    r2072236 r2340542  
    11<?php
    2 /*
    3  * Copyright 2018 Divan Kia Akam <info@divanhub.com>
    4  *
    5  * Licensed under the Apache License, Version 2.0 (the "License");
    6  * you may not use this file except in compliance with the License.
    7  * You may obtain a copy of the License at
    8  *
    9  *     http://www.apache.org/licenses/LICENSE-2.0
    10  *
    11  * Unless required by applicable law or agreed to in writing, software
    12  * distributed under the License is distributed on an "AS IS" BASIS,
    13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    14  * See the License for the specific language governing permissions and
    15  * limitations under the License.
     2
     3/**
     4 * MIT License <https://github.com/Rmanaf/wp-heimdall/blob/master/LICENSE>
     5 * Copyright (c) 2018 Arman Afzal <rman.afzal@gmail.com>
    166 */
    177
     
    2111
    2212        /**
    23          * returns client ip address
    2413         * @since 1.0.0
    2514         */
     
    2716        {
    2817
    29             foreach (['HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR'] as $key) {
     18            foreach ([
     19                'HTTP_CLIENT_IP',
     20                'HTTP_X_FORWARDED_FOR',
     21                'HTTP_X_FORWARDED',
     22                'HTTP_X_CLUSTER_CLIENT_IP',
     23                'HTTP_FORWARDED_FOR',
     24                'HTTP_FORWARDED',
     25                'REMOTE_ADDR'
     26                ] as $key) {
    3027
    3128                if (array_key_exists($key, $_SERVER) === true) {
  • heimdall/trunk/readme.txt

    r2105829 r2340542  
    33Tags: statistics, stat, heimdall
    44Requires at least: 4.5.0
    5 Tested up to: 5.2.1
    6 Requires PHP: 5.2.4
    7 Stable tag: 1.3.0
    8 License: Apache License, Version 2.0
     5Tested up to: 5.4.2
     6Stable tag: 1.3.1
     7License: MIT License
    98License URI: https://github.com/Rmanaf/wp-heimdall/blob/master/LICENSE
    109
    11 A simple way to tracking clients activities.
     10This plugin is for tracking your client activities.
     11
     12=== Description ===
     13
     14Once the plugin is activated, navigate to **Settings > General** in your WordPress Dashboard. On the **Heimdall** section, there you can find all the customization options.
  • heimdall/trunk/uninstall.php

    r2070772 r2340542  
    22
    33/**
    4  * Apache License, Version 2.0
    5  *
    6  * Copyright (C) 2018 Arman Afzal <rman.afzal@gmail.com>
    7  *
    8  * Licensed under the Apache License, Version 2.0 (the "License");
    9  * you may not use this file except in compliance with the License.
    10  * You may obtain a copy of the License at
    11  *
    12  *     http://www.apache.org/licenses/LICENSE-2.0
    13  *
    14  * Unless required by applicable law or agreed to in writing, software
    15  * distributed under the License is distributed on an "AS IS" BASIS,
    16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    17  * See the License for the specific language governing permissions and
    18  * limitations under the License.
     4 * MIT License <https://github.com/Rmanaf/wp-heimdall/blob/master/LICENSE>
     5 * Copyright (c) 2018 Arman Afzal <rman.afzal@gmail.com>
    196 */
    207
Note: See TracChangeset for help on using the changeset viewer.