New style wordpress
This enables automagic updates of WP - Delete wordpress install - Move theme(s) to top - Move local plugins to ./plugins - Simplify i18n
No files matched your search
@@ -1,11 +1,10 @@
|
|||||||
wp/wp-content/uploads
|
wp/
|
||||||
wp-config.php
|
wp-config.php
|
||||||
*~
|
*~
|
||||||
*.swp
|
*.swp
|
||||||
.sass-cache
|
.sass-cache
|
||||||
.htaccess
|
.htaccess
|
||||||
stuff/
|
stuff/
|
||||||
.idea
|
.idea/
|
||||||
*.iml
|
dns2015/bower_components
|
||||||
wp/wp-content/themes/dns2015/bower_components
|
dns2015/node_modules
|
||||||
wp/wp-content/themes/dns2015/node_modules
|
|
||||||
@@ -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>
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,17 +1,47 @@
|
|||||||
# Installation
|
## Install
|
||||||
|
# Get WP-CLI from http://wp-cli.org/
|
||||||
|
wp core download --path=wp
|
||||||
cd wp
|
cd wp
|
||||||
cp wp-config-sample.php wp-config.php
|
wp core config # create db first
|
||||||
vim wp-config.php # Update database settings
|
wp core install # needs initial credentials
|
||||||
git submodule update --init
|
cd wp-content/themes
|
||||||
|
ln -s ../../../dns2015
|
||||||
|
|
||||||
|
# (in project root)
|
||||||
|
cd dns2015
|
||||||
|
npm install
|
||||||
|
bower install
|
||||||
|
gulp watch
|
||||||
|
|
||||||
|
# Install public plugins listed below
|
||||||
|
# (in project root)
|
||||||
|
cd wp
|
||||||
|
wp plugin install ...
|
||||||
|
|
||||||
# Translations
|
# symlink in own plugins
|
||||||
# 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
|
|
||||||
|
|
||||||
## See also
|
wp core language install nb_NO
|
||||||
|
wp core language activate nb_NO
|
||||||
|
wp core language update
|
||||||
|
|
||||||
https://edb.neuf.no/wiki/Studentersamfundet.no-web#Quick_start
|
## 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
|
||||||
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 945 B After Width: | Height: | Size: 945 B |
|
Before Width: | Height: | Size: 960 B After Width: | Height: | Size: 960 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 894 B After Width: | Height: | Size: 894 B |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 984 B After Width: | Height: | Size: 984 B |
|
Before Width: | Height: | Size: 433 B After Width: | Height: | Size: 433 B |
|
Before Width: | Height: | Size: 510 B After Width: | Height: | Size: 510 B |
|
Before Width: | Height: | Size: 933 B After Width: | Height: | Size: 933 B |
|
Before Width: | Height: | Size: 477 B After Width: | Height: | Size: 477 B |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 819 B After Width: | Height: | Size: 819 B |
|
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 879 B After Width: | Height: | Size: 879 B |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
@@ -724,6 +724,8 @@ function neuf_event_format_starttime_year($post) {
|
|||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* FIXME: Move to neuf-events as function returning WP_Query */
|
||||||
function get_top_events_query() {
|
function get_top_events_query() {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
|
||||||
@@ -779,4 +781,9 @@ function wrap_iframes($content) {
|
|||||||
return $content;
|
return $content;
|
||||||
}
|
}
|
||||||
add_filter('the_content', 'wrap_iframes');
|
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'));
|
.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) {
|
gulp.task('clean', function (cb) {
|
||||||
return del(['.tmp', 'dist'], cb);
|
return del(['.tmp', 'dist'], cb);
|
||||||
});
|
});
|
||||||