New style wordpress

This enables automagic updates of WP

- Delete wordpress install
- Move theme(s) to top
- Move local plugins to ./plugins
- Simplify i18n
This commit is contained in:
nikolark committed 2017-07-05 01:03:17 +02:00
1 parent a631e727fa
commit 969c63c752
2711 files changed
+3815 -667632

No files matched your search

+4 -5
View File
@@ -1,11 +1,10 @@
wp/wp-content/uploads
wp/
wp-config.php
*~
*.swp
.sass-cache
.htaccess
stuff/
.idea
*.iml
wp/wp-content/themes/dns2015/bower_components
wp/wp-content/themes/dns2015/node_modules
.idea/
dns2015/bower_components
dns2015/node_modules
-45
View File
@@ -1,45 +0,0 @@
#
# Rewriting permalinks from 2003-2012.
#
# By prefixing the old news ID, we can separate them from event IDs
# which overlapped in the old DB.
#
# Ref: http://stackoverflow.com/questions/3063548/can-mod-rewrite-do-math
#
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# News articles
RewriteCond %{QUERY_STRING} ID=(\d{1})$
RewriteRule ^nyhet\.php$ /?p=1000%1 [R=301,L]
RewriteCond %{QUERY_STRING} ID=(\d{2})$
RewriteRule ^nyhet\.php$ /?p=100%1 [R=301,L]
RewriteCond %{QUERY_STRING} ID=(\d{3})$
RewriteRule ^nyhet\.php$ /?p=10%1 [R=301,L]
RewriteCond %{QUERY_STRING} ID=(\d{4})$
RewriteRule ^nyhet\.php$ /?p=1%1 [R=301,L]
RewriteRule ^nyheter\.php /aktuelt/ [R=301,L]
# Now events
RewriteCond %{QUERY_STRING} ID=(\d{1,4})$
RewriteRule ^vis\.php$ /?p=%1 [R=301,L]
RewriteRule ^prog\.php$ /program/ [R=301,L]
# Previously static pages
RewriteRule ^lokaler\.php$ http://viteboka.studentersamfundet.no/Lokaler [R=301,L]
RewriteRule ^historie\.php$ http://viteboka.studentersamfundet.no/Historie [R=301,L]
RewriteRule ^blimed\.php$ http://studentersamfundet.no/bli-med/ [R=301,L]
</IfModule>
# Wordpress stuff
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
+43 -13
View File
@@ -1,17 +1,47 @@
# Installation
## Install
# Get WP-CLI from http://wp-cli.org/
wp core download --path=wp
cd wp
cp wp-config-sample.php wp-config.php
vim wp-config.php # Update database settings
git submodule update --init
wp core config # create db first
wp core install # needs initial credentials
cd wp-content/themes
ln -s ../../../dns2015
# Translations
# Download wordpress i18n tools, see https://codex.wordpress.org/I18n_for_WordPress_Developers#Using_the_i18n_tools
# Create a symlink from wp-content to TOOLS_DIR/src
ln -s $REPO_ROOT/wp/ src
# Create .pot-file
php tools/i18n/makepot.php wp-theme src/wp-content/themes/differ2015/ src/wp-content/themes/differ2015/languages/differ2015.pot
# Open .pot-file with POEdit and start translating
# (in project root)
cd dns2015
npm install
bower install
gulp watch
## See also
# Install public plugins listed below
# (in project root)
cd wp
wp plugin install ...
https://edb.neuf.no/wiki/Studentersamfundet.no-web#Quick_start
# symlink in own plugins
wp core language install nb_NO
wp core language activate nb_NO
wp core language update
## Plugins
debug-bar
disable-comments
duplicate-post
json-api
redis-cache # needs to install object-cache.php
user-role-editor
wordpress-seo
wpdirauth
# own
neuf-associations
neuf-events
## Development tasks
fab build
fab watch
fab i18n
## Deployment
fab deploy
File renamed without changes.
File renamed without changes.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 945 B

After

Width:  |  Height:  |  Size: 945 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 960 B

After

Width:  |  Height:  |  Size: 960 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 894 B

After

Width:  |  Height:  |  Size: 894 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 61 KiB

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 984 B

After

Width:  |  Height:  |  Size: 984 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 433 B

After

Width:  |  Height:  |  Size: 433 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 510 B

After

Width:  |  Height:  |  Size: 510 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 933 B

After

Width:  |  Height:  |  Size: 933 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 477 B

After

Width:  |  Height:  |  Size: 477 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 819 B

After

Width:  |  Height:  |  Size: 819 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 61 KiB

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View File
File renamed without changes.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

File renamed without changes.
File renamed without changes.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 879 B

After

Width:  |  Height:  |  Size: 879 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -724,6 +724,8 @@ function neuf_event_format_starttime_year($post) {
}
return '';
}
/* FIXME: Move to neuf-events as function returning WP_Query */
function get_top_events_query() {
global $wpdb;
@@ -779,4 +781,9 @@ function wrap_iframes($content) {
return $content;
}
add_filter('the_content', 'wrap_iframes');
?>
/* Custom password reset URL */
function neuf_lostpassword_url( $pwd ) {
return 'https://brukerinfo.neuf.no/accounts/password/reset';
}
add_filter( 'lostpassword_url' , 'neuf_lostpassword_url');
@@ -80,6 +80,15 @@ gulp.task('extras', function () {
.pipe(gulp.dest('dist'));
});
gulp.task('i18n', function() {
return gulp.src('**/*.php')
.pipe($.wpPot({
domain: 'neuf',
package: 'EDB-gjengen'
} ))
.pipe(gulp.dest('languages/dns2015.pot'));
});
gulp.task('clean', function (cb) {
return del(['.tmp', 'dist'], cb);
});
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 2711 files, more files were not shown because too many files have changed in this diff. Show more