Plugin Directory

Changeset 2268789


Ignore:
Timestamp:
03/27/2020 05:04:03 AM (6 years ago)
Author:
khratos
Message:

Global code refactoring in order to use classes and namespaces, and ensure compatibility with latest version of WordPress and PHP

Location:
pe-category-filter/trunk
Files:
120 added
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • pe-category-filter/trunk/README.md

    r1743524 r2268789  
    11## Synopsis
    22
    3 This is WordPress plugin that has been around for nearly 6 years now. It allows you to *exclude* posts that belong to certain categories of your *home page*, while they will still be reachable
    4 from the inner sections of your site.
     3This is a WordPress plugin that has been around for nearly 9 years now. It allows you to *exclude* posts that belong to certain categories from your *home page*, while still being reachable from the inner sections of your site.
    54
    6 This is an ad-hoc solution that aims to do *one* thing, and do it *right*, with near the smallest footprint possible. So please note the following:
     5This is an ad-hoc solution that aims to do **one** thing, and do it **right**, with the smallest footprint possible (hopefully). So please note the following:
    76
    8 * The functionality of this plugin can not be limited to a given widget on the home page. Example:
     7* The functionality of this plugin can not be limited to a given widget on the home page. For example:
    98
    10 Given a the category "MyCategory" from which you want to exclude posts on the **home page**, and at the same time you want to display posts of "MyCategory" in a widget that is also located **in the home page**, will not be possible.
     9Given a the category "MyCategory" from which you want to exclude posts on the **home page**, and at the same time you want to display posts of the same "MyCategory" in a widget that is also located **in the home page**, will not be possible.
    1110
    12 Such a functionality, in my opinion, would be overkilling because what you are looking for is not to *exclude* everything and do one exception, instead you should *allow* everything and do one exception.
     11Such a functionality, in my opinion, would be overkilling and does not represent the approach taken by this plugin.
    1312
    1413* The focus of this plugin is simplicity, performance and correctness of the code.
     
    2019* http://slackware-es.com - Spanish version of the Slackware Linux project's website.
    2120
    22 ## Motivation
     21## Background story
    2322
    24 I decided to maintain the code in Github in order to make it available to a bigger audience.
     23I decided to maintain the code in Github in order to make it available to a bigger audience. I'm not necessarily an SVN fan, and the WordPress SVN repositories are not intended for development.
    2524
    2625## Installation
    2726
    28 1. Upload `pecf_catfilter` to the `/wp-content/plugins/` directory
     271. Upload `pe-category-filter` directory to your `/wp-content/plugins/` directory
    29282. Activate the plugin through the 'Plugins' menu in WordPress
    30293. Go to 'Settings' and choose which categories' posts you want to _exclude_ from the Home Page
    3130
     31**If you manage your WordPress installation using composer, follow this instructions:**
     32
     331. Add the following in the `requirements` section of your `composer.json` file:
     34
     35```
     36  "require": {
     37    "wpackagist-plugin/pe-category-filter":"^1.3"
     38  },
     39```
     40
     412. Add the following to the `repositories` section of your `composer.json` file:
     42
     43```
     44  "repositories" : [
     45      {
     46          "type":"composer",
     47          "url":"https://wpackagist.org"
     48      }
     49  ]
     50```
     51
     523. Run `composer install`
     53
     54**A third installation method if you are using composer is to add the Github:**
     55
     561. Add the following in the `requirements` section of your `composer.json` file:
     57
     58```
     59  "require": {
     60      "pavel_espinal/pe-category-filter":"^1.4.0"
     61  },
     62```
     63
     642. Add the following to the `repositories` section of your `composer.json` file:
     65
     66```
     67  "repositories" : [
     68      {
     69          "type":"git",
     70          "url":"https://github.com/jespinal/PE-Category-Filter.git"
     71      }
     72  ]
     73```
     74
     753. Run `composer install`
     76
     77
    3278Note: the simplest way to install it is to search for it through the WordPress plugin search bar.
  • pe-category-filter/trunk/pecf_menu_form.php

    r513918 r2268789  
    11<div class="wrap">
    22    <form method="post" action="options.php">
    3 <?php settings_fields( 'pecf_option-group' ); ?>
    4 <?php do_settings_sections('pecf_categ-menu'); ?>
     3        <?php settings_fields('pecf_option-group'); ?>
     4        <?php do_settings_sections('pecf-category-filter-page'); ?>
    55        <p class="submit">
    66            <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
  • pe-category-filter/trunk/readme.txt

    r1743524 r2268789  
    22Contributors: khratos
    33Tags: category, filter, category filter, exclude post, home page, exclude from home, pecf
    4 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=U8W8GKD6KM2G8
     4Donate link: https://www.patreon.com/pavel_espinal
     5Requires PHP: 5.6
    56Requires at least: 3.0
    6 Tested up to: 4.8.2
    7 Stable tag: 1.3
     7Tested up to: 5.3.2
     8Stable tag: 1.4.0
    89
    910This plugin allows you to exclude posts that belong to certain categories from your home page.
     
    1112== Description ==
    1213
    13 This plugin allows you to **exclude** posts that belong to certain categories from your **home page**, while they will still be reachable
    14 from the inner sections of your site.
     14This plugin allows you to **exclude** posts that belong to certain categories from your **home page**, while still being reachable from the inner sections of your site.
    1515
    16 This is an ad-hoc solution that aims to do **one** thing, and do it **right**, with near the smallest footprint possible. So please note the following:
     16This is an ad-hoc solution that aims to do **one** thing, and do it **right**, with the smallest footprint possible (hopefully). So please note the following:
    1717
    18 * The functionality of this plugin can not be limited to a given widget on the home page. Example:
     18* The functionality of this plugin can not be limited to a given widget on the home page. For example:
    1919
    20 Given a the category "MyCategory" from which you want to exclude posts on the **home page**, and at the same time you want to display posts of "MyCategory" in a widget that is also located **in the home page**, will not be possible.
     20Given a the category "MyCategory" from which you want to exclude posts on the **home page**, and at the same time you want to display posts of the same "MyCategory" in a widget that is also located **in the home page**, will not be possible.
    2121
    22 Such a functionality, in my opinion, would be overkilling because what you are looking for is not to *exclude* everything and do one exception, instead you should *allow* everything and do one exception.
     22Such a functionality, in my opinion, would be overkilling and does not represent the approach taken by this plugin.
    2323
    2424* The focus of this plugin is simplicity, performance and correctness of the code.
     
    3030* http://slackware-es.com - Spanish version of the Slackware Linux project's website (Spanish)
    3131
    32 
    3332== Installation ==
    3433
    35 1. Upload `pecf_catfilter` to the `/wp-content/plugins/` directory
     341. Upload `pe-category-filter` directory to your `/wp-content/plugins/` directory
    36352. Activate the plugin through the 'Plugins' menu in WordPress
    37363. Go to 'Settings' and choose which categories' posts you want to _exclude_ from the Home Page
     37
     38If you manage your WordPress installation using composer, follow this instructions:
     39
     401. Add the following in the `requirements` section of your `composer.json` file:
     41
     42```
     43  "require": {
     44    "wpackagist-plugin/pe-category-filter":"^1.3"
     45  },
     46```
     47
     482. Add the following to the `repositories` section of your `composer.json` file:
     49
     50```
     51  "repositories" : [
     52      {
     53          "type":"composer",
     54          "url":"https://wpackagist.org"
     55      }
     56  ]
     57```
     58
     593. Run `composer install`
     60
     61A third installation method if you are using composer is to add the Github:
     62
     631. Add the following in the `requirements` section of your `composer.json` file:
     64
     65```
     66  "require": {
     67      "pavel_espinal/pe-category-filter":"^1.4.0"
     68  },
     69```
     70
     712. Add the following to the `repositories` section of your `composer.json` file:
     72
     73```
     74  "repositories" : [
     75      {
     76          "type":"git",
     77          "url":"https://github.com/jespinal/PE-Category-Filter.git"
     78      }
     79  ]
     80```
     81
     823. Run `composer install`
    3883
    3984== Frequently Asked Questions ==
     
    67112* Adding the GitHub README.md file (this plugin is now also hosted on github).
    68113* Corrections to "readme" file/documentation.
     114
     115= 1.4.0 =
     116* Global code refactoring in order to use classes, namespaces and to ensure compatibility with latest WordPress and PHP versions.
     117* Included a package definition using a `composer.json` file in order to allow installation from **Github**.
     118* Included a `phpcs.xml` configuration file for `phpcs`.
     119* Switched to semantic versioning system for releases.
     120
     121== Upgrade Notice ==
     122
     123= 1.4.0 =
     124Global code assessment for compatibility with latest versions of WordPress and recent versions of PHP. Note: requires plugin reactivation.
Note: See TracChangeset for help on using the changeset viewer.