Commit ea08c00c authored by Erick Hitter's avatar Erick Hitter

Merge branch 'add/ci' into 'master'

Add PHPCS and update accordingly

See merge request !1
parents 5b04fadc 4481d54a
Pipeline #476 passed with stage
in 2 minutes and 25 seconds
# A set of files you probably don't want in your WordPress.org distribution
.distignore
.editorconfig
.git
.gitignore
.gitlab-ci.yml
.travis.yml
.DS_Store
Thumbs.db
behat.yml
bitbucket-pipelines.yml
bin
.circleci/config.yml
composer.json
composer.lock
Gruntfile.js
package.json
package-lock.json
phpunit.xml
phpunit.xml.dist
multisite.xml
multisite.xml.dist
.phpcs.xml
phpcs.xml
.phpcs.xml.dist
phpcs.xml.dist
README.md
wp-cli.local.yml
yarn.lock
tests
vendor
node_modules
*.sql
*.tar.gz
*.zip
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org
# WordPress Coding Standards
# https://make.wordpress.org/core/handbook/coding-standards/
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab
indent_size = 4
[{.jshintrc,*.json,*.yml}]
indent_style = space
indent_size = 2
[{*.txt,wp-config-sample.php}]
end_of_line = crlf
.DS_Store
phpcs.xml
phpunit.xml
Thumbs.db
wp-cli.local.yml
node_modules/
*.sql
*.tar.gz
*.zip
variables:
# Configure mysql service (https://hub.docker.com/_/mysql/)
MYSQL_DATABASE: wordpress_tests
MYSQL_ROOT_PASSWORD: mysql
cache:
paths:
- $HOME/.composer
- /root/.composer
before_script:
# Set up WordPress tests
- bash bin/install-wp-tests.sh $MYSQL_DATABASE root $MYSQL_ROOT_PASSWORD mysql latest true
# PHPUnit
- |
if [[ $(php -v) =~ "PHP 7." ]]; then
composer global require "phpunit/phpunit=6.1.*"
else
composer global require "phpunit/phpunit=4.8.*"
fi
# Install PHPCS and WPCS
- composer global require automattic/vipwpcs
- composer global require phpcompatibility/phpcompatibility-wp
- phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs,$HOME/.composer/vendor/automattic/vipwpcs,$HOME/.composer/vendor/phpcompatibility/php-compatibility,$HOME/.composer/vendor/phpcompatibility/phpcompatibility-paragonie,$HOME/.composer/vendor/phpcompatibility/phpcompatibility-wp
PHPunit:PHP7.2:MySQL:
image: containers.ethitter.com:443/docker/images/php:7.2
services:
- mysql:5.6
script:
- find . -type "f" -iname "*.php" | xargs -L "1" php -l
- phpcs -n
- phpunit
<?xml version="1.0"?>
<ruleset name="View All Posts Pages">
<description>Generally-applicable sniffs for WordPress plugins.</description>
<!-- What to scan -->
<file>.</file>
<exclude-pattern>/vendor/</exclude-pattern>
<exclude-pattern>/node_modules/</exclude-pattern>
<exclude-pattern>/tests/*</exclude-pattern>
<!-- How to scan -->
<!-- Usage instructions: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage -->
<!-- Annotated ruleset: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
<arg value="sp"/> <!-- Show sniff and progress -->
<arg name="basepath" value="./"/><!-- Strip the file paths down to the relevant bit -->
<arg name="colors"/>
<arg name="extensions" value="php"/>
<arg name="parallel" value="8"/><!-- Enables parallel processing when available for faster results. -->
<!-- Rules: Check PHP version compatibility -->
<!-- https://github.com/PHPCompatibility/PHPCompatibility#sniffing-your-code-for-compatibility-with-specific-php-versions -->
<config name="testVersion" value="7.2-"/>
<!-- https://github.com/PHPCompatibility/PHPCompatibilityWP -->
<rule ref="PHPCompatibilityWP"/>
<!-- Rules: WordPress Coding Standards -->
<!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards -->
<!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties -->
<config name="minimum_supported_wp_version" value="3.2.1"/>
<rule ref="WordPress" />
<rule ref="WordPressVIPMinimum" />
<rule ref="WordPress-VIP-Go" />
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<!-- Value: replace the function, class, and variable prefixes used. Separate multiple prefixes with a comma. -->
<property name="prefixes" type="array" value="view_all_posts_pages,vapp"/>
</properties>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<!-- Value: replace the text domain used. -->
<property name="text_domain" type="array" value="view_all_posts_pages"/>
</properties>
</rule>
<rule ref="WordPress.WhiteSpace.ControlStructureSpacing">
<properties>
<property name="blank_line_check" value="true"/>
</properties>
</rule>
</ruleset>
module.exports = function( grunt ) {
'use strict';
// Project configuration
grunt.initConfig( {
pkg: grunt.file.readJSON( 'package.json' ),
addtextdomain: {
options: {
textdomain: 'view_all_posts_pages',
},
update_all_domains: {
options: {
updateDomains: true
},
src: [ '*.php', '**/*.php', '!\.git/**/*', '!bin/**/*', '!node_modules/**/*', '!tests/**/*' ]
}
},
wp_readme_to_markdown: {
your_target: {
files: {
'README.md': 'readme.txt'
}
},
},
makepot: {
target: {
options: {
domainPath: '/languages',
exclude: [ '\.git/*', 'bin/*', 'node_modules/*', 'tests/*' ],
mainFile: 'view-all-posts-pages.php',
potFilename: 'view-all-posts-pages.pot',
potHeaders: {
poedit: true,
'x-poedit-keywordslist': true
},
type: 'wp-plugin',
updateTimestamp: true
}
}
},
} );
grunt.loadNpmTasks( 'grunt-wp-i18n' );
grunt.loadNpmTasks( 'grunt-wp-readme-to-markdown' );
grunt.registerTask( 'default', [ 'i18n','readme' ] );
grunt.registerTask( 'i18n', ['addtextdomain', 'makepot'] );
grunt.registerTask( 'readme', ['wp_readme_to_markdown'] );
grunt.util.linefeed = '\n';
};
# View All Post's Pages #
**Contributors:** ethitter, thinkoomph
**Donate link:** http://www.thinkoomph.com/plugins-modules/view-all-posts-pages/
**Tags:** view all, pages, paged, paged post, multipage, single view, single page, wp_link_pages, nextpage, next page, quicktag
**Requires at least:** 3.2.1
**Tested up to:** 5.0
**Stable tag:** 0.9.1
**License:** GPLv2 or later
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html
Provides a "view all" (single page) option for content paged using WordPress' &lt;!--nextpage--&gt; Quicktag (multipage posts).
## Description ##
Provides a "view all" (single page) option for posts, pages, and custom post types paged using WordPress' <a href="http://codex.wordpress.org/Write_Post_SubPanel#Quicktags" target="_blank"><code>&lt;!--nextpage--&gt;</code> Quicktag</a> (multipage posts).
Your theme must use `wp_link_pages()` to generate post page links, or you must use either the automatic or manual link capabilities provided in the plugin.
**IMPORTANT**: There are certain plugins that may interfere with this plugin's functionality. See the **FAQ** for more information.
## Installation ##
1. Upload view-all-posts-pages.php to /wp-content/plugins/.
2. Activate plugin through the WordPress Plugins menu.
3. Navigate to Options > Permalinks and click *Save Changes* to update navigation.
## Frequently Asked Questions ##
### Links don't work ###
First, navigate to Options > Permalinks in WP Admin, click *Save Changes*, and try again.
If clicking on a link takes you back to the post or page where the link appeared, see the **Known Plugin Conflicts** item below.
If, after reviewing the remaining FAQ, you are still experiencing problems, visit [http://www.thinkoomph.com/plugins-modules/view-all-posts-pages/](http://www.thinkoomph.com/plugins-modules/view-all-posts-pages/) and leave a comment detailing the problem.
### How do I add a link to my template? ###
The function `vapp_the_link` will add a link to the full-content version of whatever page it appears on. This function accepts the following arguments:
* **$link_text**: Set to text that should appear for the link. Defaults to *View All*.
* **$class**: Specifies the CSS class for the link. Defaults to *vapp*.
### Known Plugin Conflicts ###
This plugin is known to conflict with certain plugins, many pertaining to SEO and permalinks. Conflicting plugins include, but are not limited to, the following:
* **WordPress SEO by Yoast:** This plugin's `Permalink` options, particularly *Redirect attachment URL's to parent post URL* and *Redirect ugly URL's to clean permalinks. (Not recommended in many cases!)*, interfere with View All Post's Pages' ability to display full content. Both must be disabled, and the site's rewrite rules regenerated (by visiting Options > Permalinks and clicking *Save Changes*), for View All Post's Pages to function.
## Changelog ##
### 0.9.2 ###
* Introduce PHPCS tests
* Update plugin based on PHPCS results
### 0.9.1 ###
* Security update: correct misuse of `add_query_arg()` as identified by Sucuri: https://blog.sucuri.net/2015/04/security-advisory-xss-vulnerability-affecting-multiple-wordpress-plugins.html.
### 0.9 ###
* Move conditional registration of some filters to `init`, both to ensure external code can interact with filters and to avoid PHP notices.
### 0.8.1 ###
* Correct translation implementation issue introduced in v0.8.
### 0.8 ###
* When WordPress determines a request is a 404, don't activate the plugin's functionality.
* Convert the plugin to a singleton.
* Audit entire plugin for translation readyness.
* Correct phpdoc.
### 0.7 ###
* Further ensure that WordPress doesn't think a post is paged when viewing the full post content unpaged. Ensures that code checking the `$multipage` variable will function properly. Props @batmoo.
### 0.6.1 ###
* Revert change in is_view_all() method made in version 0.6 as it breaks the method, rendering the plugin inoperable.
### 0.6 ###
* Add additional rewrite rules for situations where verbose page rules are required.
* Disable canonical redirect when print template is requested.
* Update is_print() method to use WordPress API.
* Correct translation string implementation.
### 0.5 ###
* Change how post content is modified for View All display. Rather than using the `the_content` filter, global variables are overridden in the `the_post` action. Ensures that infinite loops don't result from shortcode processing and other uses of the `the_content` filter. Props to the WordPress.com VIP Support team (batmoo) and stevenkword.
* Introduces the `vapp_display_link` filter to allow plugins and themes to suppress the automatic View All link on specific posts. Return `false` to suppress the link. Filter also passes post ID, plugin options, and post object.
### 0.4.1 ###
* Eliminate use of plugins_loaded action since plugin has no dependencies on other plugins. All code previously located in the associated method has been moved to the class's constructor. Props danielbachhuber.
### 0.4 ###
* Add filter to disable rewrite rules notice.
* Apply esc_html() to link text during output.
* Update code to conform to WordPress Coding Standards.
### 0.3 ###
* Simplify rewrite rule creation, resolving 404 errors in most cases.
### 0.2 ###
* Change how wp_link_pages arguments are filtered to better support as-needed filtering.
### 0.1 ###
* Initial release
## Upgrade Notice ##
### 0.9.2 ###
Adds support for PHP 7.3 and fixes various PHPCS errors, neither of which should impact the plugin's functionality.
### 0.9.1 ###
Security update: correct misuse of `add_query_arg()` as identified by Sucuri: https://blog.sucuri.net/2015/04/security-advisory-xss-vulnerability-affecting-multiple-wordpress-plugins.html.
### 0.9 ###
Recommended update for anyone hoping to use plugin's filters to modify its behaviour.
### 0.8.1 ###
Recommended upgrade for anyone translating plugin's interface.
### 0.8 ###
Plugin won't unnecessarily execute its functionality if no posts are available and is now more thoroughly translatable.
### 0.7 ###
Further ensures plugins and themes correctly see a "View All" page as full post content.
### 0.6.1 ###
Resolves a problem where requests for view-all templates redirect to the article.
### 0.6 ###
Adds better support for sites that use verbose page rules, resolving situations where requests for view-all template redirect to the post.
### 0.5 ###
Infinite loops may result from previous method used to display entire post's content for the View All display. This update eliminates that possibility by using the the_post action rather than the the_content filter. Props to the WordPress.com VIP Support team (batmoo) and stevenkword.
### 0.4.1 ###
Eliminates use of plugins_loaded action since plugin has no dependencies on other plugins. All code previously located in the associated method has been moved to the class's constructor. props danielbachhuber.
### 0.4 ###
Adds filter to disable rewrite rules notice. Also applies esc_html() to link text when output since HTML isn't permitted in the link text.
### 0.3 ###
Simplifies rewrite rules, resolving 404 errors in most cases.
### 0.2 ###
Introduces helper function for wp_link_pages arguments and split filtering from plugin options.
#!/usr/bin/env bash
if [ $# -lt 3 ]; then
echo "usage: $0 <db-name> <db-user> <db-pass> [db-host] [wp-version] [skip-database-creation]"
exit 1
fi
DB_NAME=$1
DB_USER=$2
DB_PASS=$3
DB_HOST=${4-localhost}
WP_VERSION=${5-latest}
SKIP_DB_CREATE=${6-false}
TMPDIR=${TMPDIR-/tmp}
TMPDIR=$(echo $TMPDIR | sed -e "s/\/$//")
WP_TESTS_DIR=${WP_TESTS_DIR-$TMPDIR/wordpress-tests-lib}
WP_CORE_DIR=${WP_CORE_DIR-$TMPDIR/wordpress/}
download() {
if [ `which curl` ]; then
curl -s "$1" > "$2";
elif [ `which wget` ]; then
wget -nv -O "$2" "$1"
fi
}
if [[ $WP_VERSION =~ ^[0-9]+\.[0-9]+\-(beta|RC)[0-9]+$ ]]; then
WP_BRANCH=${WP_VERSION%\-*}
WP_TESTS_TAG="branches/$WP_BRANCH"
elif [[ $WP_VERSION =~ ^[0-9]+\.[0-9]+$ ]]; then
WP_TESTS_TAG="branches/$WP_VERSION"
elif [[ $WP_VERSION =~ [0-9]+\.[0-9]+\.[0-9]+ ]]; then
if [[ $WP_VERSION =~ [0-9]+\.[0-9]+\.[0] ]]; then
# version x.x.0 means the first release of the major version, so strip off the .0 and download version x.x
WP_TESTS_TAG="tags/${WP_VERSION%??}"
else
WP_TESTS_TAG="tags/$WP_VERSION"
fi
elif [[ $WP_VERSION == 'nightly' || $WP_VERSION == 'trunk' ]]; then
WP_TESTS_TAG="trunk"
else
# http serves a single offer, whereas https serves multiple. we only want one
download http://api.wordpress.org/core/version-check/1.7/ /tmp/wp-latest.json
grep '[0-9]+\.[0-9]+(\.[0-9]+)?' /tmp/wp-latest.json
LATEST_VERSION=$(grep -o '"version":"[^"]*' /tmp/wp-latest.json | sed 's/"version":"//')
if [[ -z "$LATEST_VERSION" ]]; then
echo "Latest WordPress version could not be found"
exit 1
fi
WP_TESTS_TAG="tags/$LATEST_VERSION"
fi
set -ex
install_wp() {
if [ -d $WP_CORE_DIR ]; then
return;
fi
mkdir -p $WP_CORE_DIR
if [[ $WP_VERSION == 'nightly' || $WP_VERSION == 'trunk' ]]; then
mkdir -p $TMPDIR/wordpress-nightly
download https://wordpress.org/nightly-builds/wordpress-latest.zip $TMPDIR/wordpress-nightly/wordpress-nightly.zip
unzip -q $TMPDIR/wordpress-nightly/wordpress-nightly.zip -d $TMPDIR/wordpress-nightly/
mv $TMPDIR/wordpress-nightly/wordpress/* $WP_CORE_DIR
else
if [ $WP_VERSION == 'latest' ]; then
local ARCHIVE_NAME='latest'
elif [[ $WP_VERSION =~ [0-9]+\.[0-9]+ ]]; then
# https serves multiple offers, whereas http serves single.
download https://api.wordpress.org/core/version-check/1.7/ $TMPDIR/wp-latest.json
if [[ $WP_VERSION =~ [0-9]+\.[0-9]+\.[0] ]]; then
# version x.x.0 means the first release of the major version, so strip off the .0 and download version x.x
LATEST_VERSION=${WP_VERSION%??}
else
# otherwise, scan the releases and get the most up to date minor version of the major release
local VERSION_ESCAPED=`echo $WP_VERSION | sed 's/\./\\\\./g'`
LATEST_VERSION=$(grep -o '"version":"'$VERSION_ESCAPED'[^"]*' $TMPDIR/wp-latest.json | sed 's/"version":"//' | head -1)
fi
if [[ -z "$LATEST_VERSION" ]]; then
local ARCHIVE_NAME="wordpress-$WP_VERSION"
else
local ARCHIVE_NAME="wordpress-$LATEST_VERSION"
fi
else
local ARCHIVE_NAME="wordpress-$WP_VERSION"
fi
download https://wordpress.org/${ARCHIVE_NAME}.tar.gz $TMPDIR/wordpress.tar.gz
tar --strip-components=1 -zxmf $TMPDIR/wordpress.tar.gz -C $WP_CORE_DIR
fi
download https://raw.github.com/markoheijnen/wp-mysqli/master/db.php $WP_CORE_DIR/wp-content/db.php
}
install_test_suite() {
# portable in-place argument for both GNU sed and Mac OSX sed
if [[ $(uname -s) == 'Darwin' ]]; then
local ioption='-i.bak'
else
local ioption='-i'
fi
# set up testing suite if it doesn't yet exist
if [ ! -d $WP_TESTS_DIR ]; then
# set up testing suite
mkdir -p $WP_TESTS_DIR
svn co --quiet https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/includes/ $WP_TESTS_DIR/includes
svn co --quiet https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/data/ $WP_TESTS_DIR/data
fi
if [ ! -f wp-tests-config.php ]; then
download https://develop.svn.wordpress.org/${WP_TESTS_TAG}/wp-tests-config-sample.php "$WP_TESTS_DIR"/wp-tests-config.php
# remove all forward slashes in the end
WP_CORE_DIR=$(echo $WP_CORE_DIR | sed "s:/\+$::")
sed $ioption "s:dirname( __FILE__ ) . '/src/':'$WP_CORE_DIR/':" "$WP_TESTS_DIR"/wp-tests-config.php
sed $ioption "s/youremptytestdbnamehere/$DB_NAME/" "$WP_TESTS_DIR"/wp-tests-config.php
sed $ioption "s/yourusernamehere/$DB_USER/" "$WP_TESTS_DIR"/wp-tests-config.php
sed $ioption "s/yourpasswordhere/$DB_PASS/" "$WP_TESTS_DIR"/wp-tests-config.php
sed $ioption "s|localhost|${DB_HOST}|" "$WP_TESTS_DIR"/wp-tests-config.php
fi
}
install_db() {
if [ ${SKIP_DB_CREATE} = "true" ]; then
return 0
fi
# parse DB_HOST for port or socket references
local PARTS=(${DB_HOST//\:/ })
local DB_HOSTNAME=${PARTS[0]};
local DB_SOCK_OR_PORT=${PARTS[1]};
local EXTRA=""
if ! [ -z $DB_HOSTNAME ] ; then
if [ $(echo $DB_SOCK_OR_PORT | grep -e '^[0-9]\{1,\}$') ]; then
EXTRA=" --host=$DB_HOSTNAME --port=$DB_SOCK_OR_PORT --protocol=tcp"
elif ! [ -z $DB_SOCK_OR_PORT ] ; then
EXTRA=" --socket=$DB_SOCK_OR_PORT"
elif ! [ -z $DB_HOSTNAME ] ; then
EXTRA=" --host=$DB_HOSTNAME --protocol=tcp"
fi
fi
# create database
mysqladmin create $DB_NAME --user="$DB_USER" --password="$DB_PASS"$EXTRA
}
install_wp
install_test_suite
install_db
# Copyright (C) 2019 Erick Hitter & Oomph, Inc.
# This file is distributed under the same license as the View All Posts Pages package.
msgid ""
msgstr ""
"Project-Id-Version: View All Posts Pages 0.9.2\n"
"Report-Msgid-Bugs-To: "
"https://wordpress.org/support/plugin/view-all-posts-pages\n"
"POT-Creation-Date: 2019-02-05 18:43:53+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2019-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"X-Generator: grunt-wp-i18n 0.5.4\n"
"X-Poedit-KeywordsList: "
"__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_"
"attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n"
"Language: en\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-Country: United States\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-Basepath: ../\n"
"X-Poedit-SearchPath-0: .\n"
"X-Poedit-Bookmarks: \n"
"X-Textdomain-Support: yes\n"
#: view-all-posts-pages.php:179 view-all-posts-pages.php:186
msgid "View All"
msgstr ""
#: view-all-posts-pages.php:464 view-all-posts-pages.php:495
#. translators: 1: Plugin name.
#. translators: 1: WordPress function name.
msgid "%s Options"
msgstr ""
#: view-all-posts-pages.php:499
msgid ""
"A \"view all\" link can be appended to WordPress' standard page navigation "
"using the options below."
msgstr ""
#: view-all-posts-pages.php:503
msgid "Automatically append link to post's page navigation?"
msgstr ""
#: view-all-posts-pages.php:505 view-all-posts-pages.php:548
msgid "Yes"
msgstr ""
#: view-all-posts-pages.php:506 view-all-posts-pages.php:549
msgid "No"
msgstr ""
#: view-all-posts-pages.php:510 view-all-posts-pages.php:576
msgid "Link text:"
msgstr ""
#: view-all-posts-pages.php:516 view-all-posts-pages.php:582
msgid "Link's CSS class(es):"
msgstr ""
#: view-all-posts-pages.php:520 view-all-posts-pages.php:586
msgid ""
"Be aware that Internet Explorer will only interpret the first two CSS "
"classes."
msgstr ""
#: view-all-posts-pages.php:524 view-all-posts-pages.php:561
msgid "Display automatically on:"
msgstr ""
#: view-all-posts-pages.php:540
msgid "Standalone Link Options"
msgstr ""
#: view-all-posts-pages.php:542
msgid ""
"In addition to appending the \"view all\" link to WordPress' standard "
"navigation, link(s) can be added above and below post content."
msgstr ""
#: view-all-posts-pages.php:546
msgid "Automatically add links based on settings below?"
msgstr ""
#: view-all-posts-pages.php:553
msgid "Automatically place link:"
msgstr ""
#: view-all-posts-pages.php:555
msgid "Above content"
msgstr ""
#: view-all-posts-pages.php:556
msgid "Below content"
msgstr ""
#: view-all-posts-pages.php:557
msgid "Above and below content"
msgstr ""
#: view-all-posts-pages.php:590
msgid "Link's priority:"
msgstr ""
#: view-all-posts-pages.php:594
msgid ""
"Priority determines when the link is added to a post's content. You can use "
"the above setting to modulate the link's placement."
msgstr ""
#: view-all-posts-pages.php:595
msgid ""
"The default value is <strong>10</strong>. Lower values mean the link will "
"be added earlier, while higher values will add the link later."
msgstr ""
#: view-all-posts-pages.php:739
msgid "View All Post's Pages"
msgstr ""
#: view-all-posts-pages.php:744
#. translators: 1: Permalinks settings page URL.
msgid ""
"You must refresh your site's permalinks before <em>View All Post's "
"Pages</em> is fully activated. To do so, go to <a "
"href=\"%s\">Permalinks</a> and click the <strong><em>Save "
"Changes</em></strong> button at the bottom of the screen."
msgstr ""
#: view-all-posts-pages.php:756
#. translators: 1: URL to dismiss admin notice.
msgid "When finished, click <a href=\"%s\">here</a> to hide this message."
msgstr ""
#. Plugin Name of the plugin/theme
msgid "View All Posts Pages"
msgstr ""
#. Plugin URI of the plugin/theme
msgid "http://www.oomphinc.com/plugins-modules/view-all-posts-pages/"
msgstr ""
#. Description of the plugin/theme
msgid ""
"Provides a \"view all\" (single page) option for posts, pages, and custom "
"post types paged using WordPress' <a "
"href=\"http://codex.wordpress.org/Write_Post_SubPanel#Quicktags\" "
"target=\"_blank\"><code>&lt;!--nextpage--&gt;</code> Quicktag</a> "
"(multipage posts)."
msgstr ""
#. Author of the plugin/theme
msgid "Erick Hitter & Oomph, Inc."
msgstr ""
#. Author URI of the plugin/theme
msgid "http://www.oomphinc.com/"
msgstr ""
\ No newline at end of file
{
"name": "view-all-posts-pages",
"version": "0.1.0",
"main": "Gruntfile.js",
"author": "Erick Hitter & Oomph, Inc.",
"devDependencies": {
"grunt": "~0.4.5",
"grunt-wp-i18n": "~0.5.0",
"grunt-wp-readme-to-markdown": "~1.0.0"
}
}
<?xml version="1.0"?>
<phpunit
bootstrap="tests/bootstrap.php"
backupGlobals="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
>
<testsuites>
<testsuite>
<directory prefix="test-" suffix=".php">./tests/</directory>
<exclude>./tests/test-sample.php</exclude>
</testsuite>
</testsuites>
</phpunit>
......@@ -3,7 +3,7 @@ Contributors: ethitter, thinkoomph
Donate link: http://www.thinkoomph.com/plugins-modules/view-all-posts-pages/
Tags: view all, pages, paged, paged post, multipage, single view, single page, wp_link_pages, nextpage, next page, quicktag
Requires at least: 3.2.1
Tested up to: 4.6
Tested up to: 5.0
Stable tag: 0.9.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
......@@ -45,6 +45,10 @@ This plugin is known to conflict with certain plugins, many pertaining to SEO an
== Changelog ==
= 0.9.2 =
* Introduce PHPCS tests
* Update plugin based on PHPCS results
= 0.9.1 =
* Security update: correct misuse of `add_query_arg()` as identified by Sucuri: https://blog.sucuri.net/2015/04/security-advisory-xss-vulnerability-affecting-multiple-wordpress-plugins.html.
......@@ -95,6 +99,9 @@ This plugin is known to conflict with certain plugins, many pertaining to SEO an
== Upgrade Notice ==
= 0.9.2 =
Adds support for PHP 7.3 and fixes various PHPCS errors, neither of which should impact the plugin's functionality.
= 0.9.1 =
Security update: correct misuse of `add_query_arg()` as identified by Sucuri: https://blog.sucuri.net/2015/04/security-advisory-xss-vulnerability-affecting-multiple-wordpress-plugins.html.
......
<?php
/**
* PHPUnit bootstrap file
*
* @package View_All_Posts_Pages
*/
$_tests_dir = getenv( 'WP_TESTS_DIR' );
if ( ! $_tests_dir ) {
$_tests_dir = rtrim( sys_get_temp_dir(), '/\\' ) . '/wordpress-tests-lib';
}
if ( ! file_exists( $_tests_dir . '/includes/functions.php' ) ) {
echo "Could not find $_tests_dir/includes/functions.php, have you run bin/install-wp-tests.sh ?" . PHP_EOL; // WPCS: XSS ok.
exit( 1 );
}
// Give access to tests_add_filter() function.
require_once $_tests_dir . '/includes/functions.php';
/**
* Manually load the plugin being tested.
*/
function _manually_load_plugin() {
require dirname( dirname( __FILE__ ) ) . '/view-all-posts-pages.php';
}
tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );