stump-cli 0.1.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +1 -0
- data/README.md +9 -5
- data/bin/stump-cli +77 -27
- data/lib/{wp/.gitignore → .gitignore.erb} +2 -2
- data/lib/stump-cli/version.rb +1 -1
- data/lib/style.erb +11 -0
- data/stump-cli.gemspec +2 -0
- metadata +56 -1268
- data/lib/wp/Movefile-example +0 -62
- data/lib/wp/README.md +0 -25
- data/lib/wp/index.php +0 -17
- data/lib/wp/license.txt +0 -385
- data/lib/wp/readme.html +0 -96
- data/lib/wp/wp-activate.php +0 -131
- data/lib/wp/wp-admin/about.php +0 -193
- data/lib/wp/wp-admin/admin-ajax.php +0 -98
- data/lib/wp/wp-admin/admin-footer.php +0 -99
- data/lib/wp/wp-admin/admin-functions.php +0 -15
- data/lib/wp/wp-admin/admin-header.php +0 -243
- data/lib/wp/wp-admin/admin-post.php +0 -71
- data/lib/wp/wp-admin/admin.php +0 -347
- data/lib/wp/wp-admin/async-upload.php +0 -114
- data/lib/wp/wp-admin/comment.php +0 -299
- data/lib/wp/wp-admin/credits.php +0 -192
- data/lib/wp/wp-admin/css/about-rtl.css +0 -446
- data/lib/wp/wp-admin/css/about.css +0 -446
- data/lib/wp/wp-admin/css/admin-menu-rtl.css +0 -917
- data/lib/wp/wp-admin/css/admin-menu.css +0 -917
- data/lib/wp/wp-admin/css/color-picker-rtl.css +0 -127
- data/lib/wp/wp-admin/css/color-picker-rtl.min.css +0 -1
- data/lib/wp/wp-admin/css/color-picker.css +0 -127
- data/lib/wp/wp-admin/css/color-picker.min.css +0 -1
- data/lib/wp/wp-admin/css/colors/_admin.scss +0 -525
- data/lib/wp/wp-admin/css/colors/_mixins.scss +0 -43
- data/lib/wp/wp-admin/css/colors/_variables.scss +0 -58
- data/lib/wp/wp-admin/css/colors/blue/colors-rtl.css +0 -341
- data/lib/wp/wp-admin/css/colors/blue/colors-rtl.min.css +0 -1
- data/lib/wp/wp-admin/css/colors/blue/colors.css +0 -341
- data/lib/wp/wp-admin/css/colors/blue/colors.min.css +0 -1
- data/lib/wp/wp-admin/css/colors/blue/colors.scss +0 -11
- data/lib/wp/wp-admin/css/colors/coffee/colors-rtl.css +0 -341
- data/lib/wp/wp-admin/css/colors/coffee/colors-rtl.min.css +0 -1
- data/lib/wp/wp-admin/css/colors/coffee/colors.css +0 -341
- data/lib/wp/wp-admin/css/colors/coffee/colors.min.css +0 -1
- data/lib/wp/wp-admin/css/colors/coffee/colors.scss +0 -7
- data/lib/wp/wp-admin/css/colors/ectoplasm/colors-rtl.css +0 -341
- data/lib/wp/wp-admin/css/colors/ectoplasm/colors-rtl.min.css +0 -1
- data/lib/wp/wp-admin/css/colors/ectoplasm/colors.css +0 -341
- data/lib/wp/wp-admin/css/colors/ectoplasm/colors.min.css +0 -1
- data/lib/wp/wp-admin/css/colors/ectoplasm/colors.scss +0 -8
- data/lib/wp/wp-admin/css/colors/light/colors-rtl.css +0 -349
- data/lib/wp/wp-admin/css/colors/light/colors-rtl.min.css +0 -1
- data/lib/wp/wp-admin/css/colors/light/colors.css +0 -349
- data/lib/wp/wp-admin/css/colors/light/colors.min.css +0 -1
- data/lib/wp/wp-admin/css/colors/light/colors.scss +0 -38
- data/lib/wp/wp-admin/css/colors/midnight/colors-rtl.css +0 -341
- data/lib/wp/wp-admin/css/colors/midnight/colors-rtl.min.css +0 -1
- data/lib/wp/wp-admin/css/colors/midnight/colors.css +0 -341
- data/lib/wp/wp-admin/css/colors/midnight/colors.min.css +0 -1
- data/lib/wp/wp-admin/css/colors/midnight/colors.scss +0 -5
- data/lib/wp/wp-admin/css/colors/ocean/colors-rtl.css +0 -341
- data/lib/wp/wp-admin/css/colors/ocean/colors-rtl.min.css +0 -1
- data/lib/wp/wp-admin/css/colors/ocean/colors.css +0 -341
- data/lib/wp/wp-admin/css/colors/ocean/colors.min.css +0 -1
- data/lib/wp/wp-admin/css/colors/ocean/colors.scss +0 -8
- data/lib/wp/wp-admin/css/colors/sunrise/colors-rtl.css +0 -341
- data/lib/wp/wp-admin/css/colors/sunrise/colors-rtl.min.css +0 -1
- data/lib/wp/wp-admin/css/colors/sunrise/colors.css +0 -341
- data/lib/wp/wp-admin/css/colors/sunrise/colors.min.css +0 -1
- data/lib/wp/wp-admin/css/colors/sunrise/colors.scss +0 -6
- data/lib/wp/wp-admin/css/common-rtl.css +0 -3212
- data/lib/wp/wp-admin/css/common.css +0 -3212
- data/lib/wp/wp-admin/css/customize-controls-rtl.css +0 -889
- data/lib/wp/wp-admin/css/customize-controls-rtl.min.css +0 -1
- data/lib/wp/wp-admin/css/customize-controls.css +0 -889
- data/lib/wp/wp-admin/css/customize-controls.min.css +0 -1
- data/lib/wp/wp-admin/css/customize-widgets-rtl.css +0 -603
- data/lib/wp/wp-admin/css/customize-widgets-rtl.min.css +0 -1
- data/lib/wp/wp-admin/css/customize-widgets.css +0 -603
- data/lib/wp/wp-admin/css/customize-widgets.min.css +0 -1
- data/lib/wp/wp-admin/css/dashboard-rtl.css +0 -1116
- data/lib/wp/wp-admin/css/dashboard.css +0 -1116
- data/lib/wp/wp-admin/css/deprecated-media-rtl.css +0 -371
- data/lib/wp/wp-admin/css/deprecated-media-rtl.min.css +0 -1
- data/lib/wp/wp-admin/css/deprecated-media.css +0 -371
- data/lib/wp/wp-admin/css/deprecated-media.min.css +0 -1
- data/lib/wp/wp-admin/css/edit-rtl.css +0 -1501
- data/lib/wp/wp-admin/css/edit.css +0 -1501
- data/lib/wp/wp-admin/css/farbtastic-rtl.css +0 -41
- data/lib/wp/wp-admin/css/farbtastic.css +0 -41
- data/lib/wp/wp-admin/css/forms-rtl.css +0 -992
- data/lib/wp/wp-admin/css/forms.css +0 -992
- data/lib/wp/wp-admin/css/ie-rtl.css +0 -785
- data/lib/wp/wp-admin/css/ie-rtl.min.css +0 -1
- data/lib/wp/wp-admin/css/ie.css +0 -785
- data/lib/wp/wp-admin/css/ie.min.css +0 -1
- data/lib/wp/wp-admin/css/install-rtl.css +0 -389
- data/lib/wp/wp-admin/css/install-rtl.min.css +0 -1
- data/lib/wp/wp-admin/css/install.css +0 -389
- data/lib/wp/wp-admin/css/install.min.css +0 -1
- data/lib/wp/wp-admin/css/l10n-rtl.css +0 -101
- data/lib/wp/wp-admin/css/l10n.css +0 -101
- data/lib/wp/wp-admin/css/list-tables-rtl.css +0 -1875
- data/lib/wp/wp-admin/css/list-tables.css +0 -1875
- data/lib/wp/wp-admin/css/login-rtl.css +0 -269
- data/lib/wp/wp-admin/css/login-rtl.min.css +0 -1
- data/lib/wp/wp-admin/css/login.css +0 -269
- data/lib/wp/wp-admin/css/login.min.css +0 -1
- data/lib/wp/wp-admin/css/media-rtl.css +0 -1196
- data/lib/wp/wp-admin/css/media.css +0 -1196
- data/lib/wp/wp-admin/css/nav-menus-rtl.css +0 -857
- data/lib/wp/wp-admin/css/nav-menus.css +0 -857
- data/lib/wp/wp-admin/css/press-this-rtl.css +0 -458
- data/lib/wp/wp-admin/css/press-this.css +0 -458
- data/lib/wp/wp-admin/css/revisions-rtl.css +0 -574
- data/lib/wp/wp-admin/css/revisions.css +0 -574
- data/lib/wp/wp-admin/css/themes-rtl.css +0 -1732
- data/lib/wp/wp-admin/css/themes.css +0 -1732
- data/lib/wp/wp-admin/css/widgets-rtl.css +0 -577
- data/lib/wp/wp-admin/css/widgets.css +0 -577
- data/lib/wp/wp-admin/css/wp-admin-rtl.css +0 -14
- data/lib/wp/wp-admin/css/wp-admin-rtl.min.css +0 -1
- data/lib/wp/wp-admin/css/wp-admin.css +0 -14
- data/lib/wp/wp-admin/css/wp-admin.min.css +0 -1
- data/lib/wp/wp-admin/custom-background.php +0 -482
- data/lib/wp/wp-admin/custom-header.php +0 -1366
- data/lib/wp/wp-admin/customize.php +0 -278
- data/lib/wp/wp-admin/edit-comments.php +0 -254
- data/lib/wp/wp-admin/edit-form-advanced.php +0 -636
- data/lib/wp/wp-admin/edit-form-comment.php +0 -160
- data/lib/wp/wp-admin/edit-link-form.php +0 -150
- data/lib/wp/wp-admin/edit-tag-form.php +0 -204
- data/lib/wp/wp-admin/edit-tags.php +0 -591
- data/lib/wp/wp-admin/edit.php +0 -330
- data/lib/wp/wp-admin/export.php +0 -243
- data/lib/wp/wp-admin/freedoms.php +0 -57
- data/lib/wp/wp-admin/images/align-center-2x.png +0 -0
- data/lib/wp/wp-admin/images/align-center.png +0 -0
- data/lib/wp/wp-admin/images/align-left-2x.png +0 -0
- data/lib/wp/wp-admin/images/align-left.png +0 -0
- data/lib/wp/wp-admin/images/align-none-2x.png +0 -0
- data/lib/wp/wp-admin/images/align-none.png +0 -0
- data/lib/wp/wp-admin/images/align-right-2x.png +0 -0
- data/lib/wp/wp-admin/images/align-right.png +0 -0
- data/lib/wp/wp-admin/images/arrows-2x.png +0 -0
- data/lib/wp/wp-admin/images/arrows.png +0 -0
- data/lib/wp/wp-admin/images/bubble_bg-2x.gif +0 -0
- data/lib/wp/wp-admin/images/bubble_bg.gif +0 -0
- data/lib/wp/wp-admin/images/comment-grey-bubble-2x.png +0 -0
- data/lib/wp/wp-admin/images/comment-grey-bubble.png +0 -0
- data/lib/wp/wp-admin/images/date-button-2x.gif +0 -0
- data/lib/wp/wp-admin/images/date-button.gif +0 -0
- data/lib/wp/wp-admin/images/generic.png +0 -0
- data/lib/wp/wp-admin/images/icons32-2x.png +0 -0
- data/lib/wp/wp-admin/images/icons32-vs-2x.png +0 -0
- data/lib/wp/wp-admin/images/icons32-vs.png +0 -0
- data/lib/wp/wp-admin/images/icons32.png +0 -0
- data/lib/wp/wp-admin/images/imgedit-icons-2x.png +0 -0
- data/lib/wp/wp-admin/images/imgedit-icons.png +0 -0
- data/lib/wp/wp-admin/images/list-2x.png +0 -0
- data/lib/wp/wp-admin/images/list.png +0 -0
- data/lib/wp/wp-admin/images/loading.gif +0 -0
- data/lib/wp/wp-admin/images/marker.png +0 -0
- data/lib/wp/wp-admin/images/mask.png +0 -0
- data/lib/wp/wp-admin/images/media-button-2x.png +0 -0
- data/lib/wp/wp-admin/images/media-button-image.gif +0 -0
- data/lib/wp/wp-admin/images/media-button-music.gif +0 -0
- data/lib/wp/wp-admin/images/media-button-other.gif +0 -0
- data/lib/wp/wp-admin/images/media-button-video.gif +0 -0
- data/lib/wp/wp-admin/images/media-button.png +0 -0
- data/lib/wp/wp-admin/images/menu-2x.png +0 -0
- data/lib/wp/wp-admin/images/menu-vs-2x.png +0 -0
- data/lib/wp/wp-admin/images/menu-vs.png +0 -0
- data/lib/wp/wp-admin/images/menu.png +0 -0
- data/lib/wp/wp-admin/images/no.png +0 -0
- data/lib/wp/wp-admin/images/post-formats-vs.png +0 -0
- data/lib/wp/wp-admin/images/post-formats.png +0 -0
- data/lib/wp/wp-admin/images/post-formats32-vs.png +0 -0
- data/lib/wp/wp-admin/images/post-formats32.png +0 -0
- data/lib/wp/wp-admin/images/resize-2x.gif +0 -0
- data/lib/wp/wp-admin/images/resize-rtl-2x.gif +0 -0
- data/lib/wp/wp-admin/images/resize-rtl.gif +0 -0
- data/lib/wp/wp-admin/images/resize.gif +0 -0
- data/lib/wp/wp-admin/images/se.png +0 -0
- data/lib/wp/wp-admin/images/sort-2x.gif +0 -0
- data/lib/wp/wp-admin/images/sort.gif +0 -0
- data/lib/wp/wp-admin/images/spinner-2x.gif +0 -0
- data/lib/wp/wp-admin/images/spinner.gif +0 -0
- data/lib/wp/wp-admin/images/stars-2x.png +0 -0
- data/lib/wp/wp-admin/images/stars.png +0 -0
- data/lib/wp/wp-admin/images/w-logo-blue.png +0 -0
- data/lib/wp/wp-admin/images/w-logo-white.png +0 -0
- data/lib/wp/wp-admin/images/wheel.png +0 -0
- data/lib/wp/wp-admin/images/wordpress-logo-white.svg +0 -1
- data/lib/wp/wp-admin/images/wordpress-logo.png +0 -0
- data/lib/wp/wp-admin/images/wordpress-logo.svg +0 -1
- data/lib/wp/wp-admin/images/wpspin_light-2x.gif +0 -0
- data/lib/wp/wp-admin/images/wpspin_light.gif +0 -0
- data/lib/wp/wp-admin/images/xit-2x.gif +0 -0
- data/lib/wp/wp-admin/images/xit.gif +0 -0
- data/lib/wp/wp-admin/images/yes.png +0 -0
- data/lib/wp/wp-admin/import.php +0 -132
- data/lib/wp/wp-admin/includes/admin.php +0 -74
- data/lib/wp/wp-admin/includes/ajax-actions.php +0 -2762
- data/lib/wp/wp-admin/includes/bookmark.php +0 -305
- data/lib/wp/wp-admin/includes/class-ftp-pure.php +0 -190
- data/lib/wp/wp-admin/includes/class-ftp-sockets.php +0 -250
- data/lib/wp/wp-admin/includes/class-ftp.php +0 -907
- data/lib/wp/wp-admin/includes/class-pclzip.php +0 -5687
- data/lib/wp/wp-admin/includes/class-wp-comments-list-table.php +0 -637
- data/lib/wp/wp-admin/includes/class-wp-filesystem-base.php +0 -815
- data/lib/wp/wp-admin/includes/class-wp-filesystem-direct.php +0 -384
- data/lib/wp/wp-admin/includes/class-wp-filesystem-ftpext.php +0 -415
- data/lib/wp/wp-admin/includes/class-wp-filesystem-ftpsockets.php +0 -352
- data/lib/wp/wp-admin/includes/class-wp-filesystem-ssh2.php +0 -392
- data/lib/wp/wp-admin/includes/class-wp-importer.php +0 -302
- data/lib/wp/wp-admin/includes/class-wp-links-list-table.php +0 -207
- data/lib/wp/wp-admin/includes/class-wp-list-table.php +0 -1080
- data/lib/wp/wp-admin/includes/class-wp-media-list-table.php +0 -574
- data/lib/wp/wp-admin/includes/class-wp-ms-sites-list-table.php +0 -402
- data/lib/wp/wp-admin/includes/class-wp-ms-themes-list-table.php +0 -459
- data/lib/wp/wp-admin/includes/class-wp-ms-users-list-table.php +0 -303
- data/lib/wp/wp-admin/includes/class-wp-plugin-install-list-table.php +0 -490
- data/lib/wp/wp-admin/includes/class-wp-plugins-list-table.php +0 -605
- data/lib/wp/wp-admin/includes/class-wp-posts-list-table.php +0 -1306
- data/lib/wp/wp-admin/includes/class-wp-terms-list-table.php +0 -466
- data/lib/wp/wp-admin/includes/class-wp-theme-install-list-table.php +0 -431
- data/lib/wp/wp-admin/includes/class-wp-themes-list-table.php +0 -279
- data/lib/wp/wp-admin/includes/class-wp-upgrader-skins.php +0 -767
- data/lib/wp/wp-admin/includes/class-wp-upgrader.php +0 -2676
- data/lib/wp/wp-admin/includes/class-wp-users-list-table.php +0 -459
- data/lib/wp/wp-admin/includes/comment.php +0 -171
- data/lib/wp/wp-admin/includes/continents-cities.php +0 -493
- data/lib/wp/wp-admin/includes/dashboard.php +0 -1333
- data/lib/wp/wp-admin/includes/deprecated.php +0 -1190
- data/lib/wp/wp-admin/includes/export.php +0 -508
- data/lib/wp/wp-admin/includes/file.php +0 -1152
- data/lib/wp/wp-admin/includes/image-edit.php +0 -828
- data/lib/wp/wp-admin/includes/image.php +0 -598
- data/lib/wp/wp-admin/includes/import.php +0 -206
- data/lib/wp/wp-admin/includes/list-table.php +0 -113
- data/lib/wp/wp-admin/includes/media.php +0 -3012
- data/lib/wp/wp-admin/includes/menu.php +0 -322
- data/lib/wp/wp-admin/includes/meta-boxes.php +0 -1119
- data/lib/wp/wp-admin/includes/misc.php +0 -845
- data/lib/wp/wp-admin/includes/ms-deprecated.php +0 -78
- data/lib/wp/wp-admin/includes/ms.php +0 -814
- data/lib/wp/wp-admin/includes/nav-menu.php +0 -1328
- data/lib/wp/wp-admin/includes/plugin-install.php +0 -550
- data/lib/wp/wp-admin/includes/plugin.php +0 -1899
- data/lib/wp/wp-admin/includes/post.php +0 -1661
- data/lib/wp/wp-admin/includes/revision.php +0 -228
- data/lib/wp/wp-admin/includes/schema.php +0 -1038
- data/lib/wp/wp-admin/includes/screen.php +0 -1179
- data/lib/wp/wp-admin/includes/taxonomy.php +0 -284
- data/lib/wp/wp-admin/includes/template.php +0 -2157
- data/lib/wp/wp-admin/includes/theme-install.php +0 -205
- data/lib/wp/wp-admin/includes/theme.php +0 -474
- data/lib/wp/wp-admin/includes/translation-install.php +0 -240
- data/lib/wp/wp-admin/includes/update-core.php +0 -1186
- data/lib/wp/wp-admin/includes/update.php +0 -432
- data/lib/wp/wp-admin/includes/upgrade.php +0 -2218
- data/lib/wp/wp-admin/includes/user.php +0 -442
- data/lib/wp/wp-admin/includes/widgets.php +0 -245
- data/lib/wp/wp-admin/index.php +0 -131
- data/lib/wp/wp-admin/install-helper.php +0 -199
- data/lib/wp/wp-admin/install.php +0 -305
- data/lib/wp/wp-admin/js/accordion.js +0 -143
- data/lib/wp/wp-admin/js/accordion.min.js +0 -1
- data/lib/wp/wp-admin/js/color-picker.js +0 -155
- data/lib/wp/wp-admin/js/color-picker.min.js +0 -1
- data/lib/wp/wp-admin/js/comment.js +0 -50
- data/lib/wp/wp-admin/js/comment.min.js +0 -1
- data/lib/wp/wp-admin/js/common.js +0 -804
- data/lib/wp/wp-admin/js/common.min.js +0 -1
- data/lib/wp/wp-admin/js/custom-background.js +0 -75
- data/lib/wp/wp-admin/js/custom-background.min.js +0 -1
- data/lib/wp/wp-admin/js/custom-header.js +0 -61
- data/lib/wp/wp-admin/js/customize-controls.js +0 -1305
- data/lib/wp/wp-admin/js/customize-controls.min.js +0 -1
- data/lib/wp/wp-admin/js/customize-widgets.js +0 -1882
- data/lib/wp/wp-admin/js/customize-widgets.min.js +0 -1
- data/lib/wp/wp-admin/js/dashboard.js +0 -190
- data/lib/wp/wp-admin/js/dashboard.min.js +0 -1
- data/lib/wp/wp-admin/js/edit-comments.js +0 -625
- data/lib/wp/wp-admin/js/edit-comments.min.js +0 -1
- data/lib/wp/wp-admin/js/editor-expand.js +0 -705
- data/lib/wp/wp-admin/js/editor-expand.min.js +0 -1
- data/lib/wp/wp-admin/js/editor.js +0 -324
- data/lib/wp/wp-admin/js/editor.min.js +0 -1
- data/lib/wp/wp-admin/js/farbtastic.js +0 -276
- data/lib/wp/wp-admin/js/gallery.js +0 -237
- data/lib/wp/wp-admin/js/gallery.min.js +0 -1
- data/lib/wp/wp-admin/js/image-edit.js +0 -633
- data/lib/wp/wp-admin/js/image-edit.min.js +0 -1
- data/lib/wp/wp-admin/js/inline-edit-post.js +0 -359
- data/lib/wp/wp-admin/js/inline-edit-post.min.js +0 -1
- data/lib/wp/wp-admin/js/inline-edit-tax.js +0 -142
- data/lib/wp/wp-admin/js/inline-edit-tax.min.js +0 -1
- data/lib/wp/wp-admin/js/iris.min.js +0 -4
- data/lib/wp/wp-admin/js/language-chooser.js +0 -26
- data/lib/wp/wp-admin/js/language-chooser.min.js +0 -1
- data/lib/wp/wp-admin/js/link.js +0 -69
- data/lib/wp/wp-admin/js/link.min.js +0 -1
- data/lib/wp/wp-admin/js/media-gallery.js +0 -26
- data/lib/wp/wp-admin/js/media-gallery.min.js +0 -1
- data/lib/wp/wp-admin/js/media-upload.js +0 -69
- data/lib/wp/wp-admin/js/media-upload.min.js +0 -1
- data/lib/wp/wp-admin/js/media.js +0 -111
- data/lib/wp/wp-admin/js/media.min.js +0 -1
- data/lib/wp/wp-admin/js/nav-menu.js +0 -1205
- data/lib/wp/wp-admin/js/nav-menu.min.js +0 -1
- data/lib/wp/wp-admin/js/password-strength-meter.js +0 -75
- data/lib/wp/wp-admin/js/password-strength-meter.min.js +0 -1
- data/lib/wp/wp-admin/js/plugin-install.js +0 -76
- data/lib/wp/wp-admin/js/plugin-install.min.js +0 -1
- data/lib/wp/wp-admin/js/post.js +0 -1094
- data/lib/wp/wp-admin/js/post.min.js +0 -1
- data/lib/wp/wp-admin/js/postbox.js +0 -199
- data/lib/wp/wp-admin/js/postbox.min.js +0 -1
- data/lib/wp/wp-admin/js/revisions.js +0 -1110
- data/lib/wp/wp-admin/js/revisions.min.js +0 -1
- data/lib/wp/wp-admin/js/set-post-thumbnail.js +0 -24
- data/lib/wp/wp-admin/js/set-post-thumbnail.min.js +0 -1
- data/lib/wp/wp-admin/js/svg-painter.js +0 -240
- data/lib/wp/wp-admin/js/svg-painter.min.js +0 -1
- data/lib/wp/wp-admin/js/tags.js +0 -72
- data/lib/wp/wp-admin/js/tags.min.js +0 -1
- data/lib/wp/wp-admin/js/theme.js +0 -1691
- data/lib/wp/wp-admin/js/theme.min.js +0 -1
- data/lib/wp/wp-admin/js/updates.js +0 -65
- data/lib/wp/wp-admin/js/updates.min.js +0 -1
- data/lib/wp/wp-admin/js/user-profile.js +0 -127
- data/lib/wp/wp-admin/js/user-profile.min.js +0 -1
- data/lib/wp/wp-admin/js/user-suggest.js +0 -30
- data/lib/wp/wp-admin/js/user-suggest.min.js +0 -1
- data/lib/wp/wp-admin/js/widgets.js +0 -494
- data/lib/wp/wp-admin/js/widgets.min.js +0 -1
- data/lib/wp/wp-admin/js/word-count.js +0 -44
- data/lib/wp/wp-admin/js/word-count.min.js +0 -1
- data/lib/wp/wp-admin/js/wp-fullscreen.js +0 -704
- data/lib/wp/wp-admin/js/wp-fullscreen.min.js +0 -1
- data/lib/wp/wp-admin/js/xfn.js +0 -17
- data/lib/wp/wp-admin/js/xfn.min.js +0 -1
- data/lib/wp/wp-admin/link-add.php +0 -29
- data/lib/wp/wp-admin/link-manager.php +0 -99
- data/lib/wp/wp-admin/link-parse-opml.php +0 -84
- data/lib/wp/wp-admin/link.php +0 -117
- data/lib/wp/wp-admin/load-scripts.php +0 -162
- data/lib/wp/wp-admin/load-styles.php +0 -153
- data/lib/wp/wp-admin/maint/repair.php +0 -124
- data/lib/wp/wp-admin/media-new.php +0 -84
- data/lib/wp/wp-admin/media-upload.php +0 -100
- data/lib/wp/wp-admin/media.php +0 -146
- data/lib/wp/wp-admin/menu-header.php +0 -227
- data/lib/wp/wp-admin/menu.php +0 -255
- data/lib/wp/wp-admin/moderation.php +0 -12
- data/lib/wp/wp-admin/ms-admin.php +0 -13
- data/lib/wp/wp-admin/ms-delete-site.php +0 -91
- data/lib/wp/wp-admin/ms-edit.php +0 -13
- data/lib/wp/wp-admin/ms-options.php +0 -12
- data/lib/wp/wp-admin/ms-sites.php +0 -13
- data/lib/wp/wp-admin/ms-themes.php +0 -13
- data/lib/wp/wp-admin/ms-upgrade-network.php +0 -13
- data/lib/wp/wp-admin/ms-users.php +0 -13
- data/lib/wp/wp-admin/my-sites.php +0 -145
- data/lib/wp/wp-admin/nav-menus.php +0 -798
- data/lib/wp/wp-admin/network.php +0 -561
- data/lib/wp/wp-admin/network/about.php +0 -16
- data/lib/wp/wp-admin/network/admin.php +0 -32
- data/lib/wp/wp-admin/network/credits.php +0 -16
- data/lib/wp/wp-admin/network/edit.php +0 -42
- data/lib/wp/wp-admin/network/freedoms.php +0 -16
- data/lib/wp/wp-admin/network/index.php +0 -79
- data/lib/wp/wp-admin/network/menu.php +0 -63
- data/lib/wp/wp-admin/network/plugin-editor.php +0 -16
- data/lib/wp/wp-admin/network/plugin-install.php +0 -19
- data/lib/wp/wp-admin/network/plugins.php +0 -16
- data/lib/wp/wp-admin/network/profile.php +0 -16
- data/lib/wp/wp-admin/network/settings.php +0 -347
- data/lib/wp/wp-admin/network/setup.php +0 -16
- data/lib/wp/wp-admin/network/site-info.php +0 -178
- data/lib/wp/wp-admin/network/site-new.php +0 -153
- data/lib/wp/wp-admin/network/site-settings.php +0 -173
- data/lib/wp/wp-admin/network/site-themes.php +0 -185
- data/lib/wp/wp-admin/network/site-users.php +0 -319
- data/lib/wp/wp-admin/network/sites.php +0 -275
- data/lib/wp/wp-admin/network/theme-editor.php +0 -16
- data/lib/wp/wp-admin/network/theme-install.php +0 -19
- data/lib/wp/wp-admin/network/themes.php +0 -291
- data/lib/wp/wp-admin/network/update-core.php +0 -16
- data/lib/wp/wp-admin/network/update.php +0 -19
- data/lib/wp/wp-admin/network/upgrade.php +0 -120
- data/lib/wp/wp-admin/network/user-edit.php +0 -16
- data/lib/wp/wp-admin/network/user-new.php +0 -106
- data/lib/wp/wp-admin/network/users.php +0 -296
- data/lib/wp/wp-admin/options-discussion.php +0 -273
- data/lib/wp/wp-admin/options-general.php +0 -355
- data/lib/wp/wp-admin/options-head.php +0 -18
- data/lib/wp/wp-admin/options-media.php +0 -136
- data/lib/wp/wp-admin/options-permalink.php +0 -289
- data/lib/wp/wp-admin/options-reading.php +0 -184
- data/lib/wp/wp-admin/options-writing.php +0 -194
- data/lib/wp/wp-admin/options.php +0 -265
- data/lib/wp/wp-admin/plugin-editor.php +0 -279
- data/lib/wp/wp-admin/plugin-install.php +0 -134
- data/lib/wp/wp-admin/plugins.php +0 -474
- data/lib/wp/wp-admin/post-new.php +0 -74
- data/lib/wp/wp-admin/post.php +0 -318
- data/lib/wp/wp-admin/press-this.php +0 -691
- data/lib/wp/wp-admin/profile.php +0 -18
- data/lib/wp/wp-admin/revision.php +0 -221
- data/lib/wp/wp-admin/setup-config.php +0 -345
- data/lib/wp/wp-admin/theme-editor.php +0 -243
- data/lib/wp/wp-admin/theme-install.php +0 -278
- data/lib/wp/wp-admin/themes.php +0 -374
- data/lib/wp/wp-admin/tools.php +0 -75
- data/lib/wp/wp-admin/update-core.php +0 -653
- data/lib/wp/wp-admin/update.php +0 -272
- data/lib/wp/wp-admin/upgrade-functions.php +0 -12
- data/lib/wp/wp-admin/upgrade.php +0 -116
- data/lib/wp/wp-admin/upload.php +0 -292
- data/lib/wp/wp-admin/user-edit.php +0 -557
- data/lib/wp/wp-admin/user-new.php +0 -439
- data/lib/wp/wp-admin/user/about.php +0 -13
- data/lib/wp/wp-admin/user/admin.php +0 -32
- data/lib/wp/wp-admin/user/credits.php +0 -13
- data/lib/wp/wp-admin/user/freedoms.php +0 -13
- data/lib/wp/wp-admin/user/index.php +0 -12
- data/lib/wp/wp-admin/user/menu.php +0 -22
- data/lib/wp/wp-admin/user/profile.php +0 -12
- data/lib/wp/wp-admin/user/user-edit.php +0 -12
- data/lib/wp/wp-admin/users.php +0 -460
- data/lib/wp/wp-admin/widgets.php +0 -442
- data/lib/wp/wp-blog-header.php +0 -18
- data/lib/wp/wp-comments-post.php +0 -164
- data/lib/wp/wp-config-sample.php +0 -80
- data/lib/wp/wp-content/index.php +0 -2
- data/lib/wp/wp-content/plugins/hello.php +0 -82
- data/lib/wp/wp-content/plugins/index.php +0 -2
- data/lib/wp/wp-content/themes/index.php +0 -2
- data/lib/wp/wp-content/themes/stump/.editorconfig +0 -11
- data/lib/wp/wp-content/themes/stump/.jshintrc +0 -16
- data/lib/wp/wp-content/themes/stump/404.php +0 -13
- data/lib/wp/wp-content/themes/stump/CHANGELOG.md +0 -333
- data/lib/wp/wp-content/themes/stump/CONTRIBUTING.md +0 -121
- data/lib/wp/wp-content/themes/stump/Gruntfile.js +0 -151
- data/lib/wp/wp-content/themes/stump/LICENSE.md +0 -19
- data/lib/wp/wp-content/themes/stump/assets/coffee/build/.gitkeep +0 -0
- data/lib/wp/wp-content/themes/stump/assets/css/editor-style.css +0 -548
- data/lib/wp/wp-content/themes/stump/assets/fonts/glyphicons-halflings-regular.eot +0 -0
- data/lib/wp/wp-content/themes/stump/assets/fonts/glyphicons-halflings-regular.svg +0 -229
- data/lib/wp/wp-content/themes/stump/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/lib/wp/wp-content/themes/stump/assets/fonts/glyphicons-halflings-regular.woff +0 -0
- data/lib/wp/wp-content/themes/stump/assets/img/.gitignore +0 -0
- data/lib/wp/wp-content/themes/stump/assets/js/_main.js +0 -63
- data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/affix.js +0 -137
- data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/alert.js +0 -88
- data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/button.js +0 -107
- data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/carousel.js +0 -205
- data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/collapse.js +0 -170
- data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/dropdown.js +0 -147
- data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/modal.js +0 -243
- data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/popover.js +0 -110
- data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/scrollspy.js +0 -153
- data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/tab.js +0 -125
- data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/tooltip.js +0 -399
- data/lib/wp/wp-content/themes/stump/assets/js/plugins/bootstrap/transition.js +0 -48
- data/lib/wp/wp-content/themes/stump/assets/js/scripts.min.js +0 -1
- data/lib/wp/wp-content/themes/stump/assets/js/vendor/jquery-1.11.0.min.js +0 -4
- data/lib/wp/wp-content/themes/stump/assets/js/vendor/modernizr-2.7.0.min.js +0 -4
- data/lib/wp/wp-content/themes/stump/assets/sass/app.scss +0 -9
- data/lib/wp/wp-content/themes/stump/assets/sass/core/_variables.scss +0 -1
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_alerts.scss +0 -67
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_badges.scss +0 -55
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_bootstrap.scss +0 -49
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_breadcrumbs.scss +0 -26
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_button-groups.scss +0 -226
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_buttons.scss +0 -159
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_carousel.scss +0 -232
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_close.scss +0 -35
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_code.scss +0 -63
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_component-animations.scss +0 -29
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_dropdowns.scss +0 -213
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_forms.scss +0 -436
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_glyphicons.scss +0 -233
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_grid.scss +0 -84
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_input-groups.scss +0 -162
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_jumbotron.scss +0 -44
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_labels.scss +0 -64
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_list-group.scss +0 -110
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_media.scss +0 -56
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_mixins.scss +0 -947
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_modals.scss +0 -139
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_navbar.scss +0 -620
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_navs.scss +0 -242
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_normalize.scss +0 -423
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_pager.scss +0 -55
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_pagination.scss +0 -88
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_panels.scss +0 -241
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_popovers.scss +0 -133
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_print.scss +0 -101
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_progress-bars.scss +0 -80
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_responsive-utilities.scss +0 -74
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_scaffolding.scss +0 -134
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_tables.scss +0 -233
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_theme.scss +0 -247
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_thumbnails.scss +0 -38
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_tooltip.scss +0 -95
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_type.scss +0 -284
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_utilities.scss +0 -56
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_variables.scss +0 -833
- data/lib/wp/wp-content/themes/stump/assets/vendor/bootstrap/_wells.scss +0 -29
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/_bourbon-deprecated-upcoming.scss +0 -13
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/_bourbon.scss +0 -59
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_button.scss +0 -273
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_clearfix.scss +0 -29
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_font-family.scss +0 -5
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_hide-text.scss +0 -5
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_html5-input-types.scss +0 -56
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_position.scss +0 -42
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_prefixer.scss +0 -49
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_retina-image.scss +0 -32
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_size.scss +0 -44
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_timing-functions.scss +0 -32
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/addons/_triangle.scss +0 -45
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_animation.scss +0 -52
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_appearance.scss +0 -3
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_backface-visibility.scss +0 -6
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_background-image.scss +0 -48
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_background.scss +0 -103
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_border-image.scss +0 -55
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_border-radius.scss +0 -22
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_box-sizing.scss +0 -4
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_columns.scss +0 -47
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_flex-box.scss +0 -52
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_font-face.scss +0 -23
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_hidpi-media-query.scss +0 -10
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_image-rendering.scss +0 -13
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_inline-block.scss +0 -8
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_keyframes.scss +0 -43
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_linear-gradient.scss +0 -41
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_perspective.scss +0 -8
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_placeholder.scss +0 -29
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_radial-gradient.scss +0 -44
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_transform.scss +0 -15
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_transition.scss +0 -34
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/css3/_user-select.scss +0 -3
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_compact.scss +0 -11
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_flex-grid.scss +0 -39
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_grid-width.scss +0 -13
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_linear-gradient.scss +0 -13
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_modular-scale.scss +0 -40
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_px-to-em.scss +0 -8
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_radial-gradient.scss +0 -23
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_tint-shade.scss +0 -9
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/functions/_transition-property-name.scss +0 -22
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_deprecated-webkit-gradient.scss +0 -39
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_gradient-positions-parser.scss +0 -13
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_linear-positions-parser.scss +0 -61
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_radial-arg-parser.scss +0 -69
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_radial-positions-parser.scss +0 -18
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_render-gradients.scss +0 -26
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_shape-size-stripper.scss +0 -10
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan.sass +0 -11
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan/_grid.sass +0 -161
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan/_mixins.sass +0 -63
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan/_utilities.sass +0 -24
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan/_variables.sass +0 -42
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/_neat-helpers.scss +0 -8
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/_neat.scss +0 -21
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/functions/_new-breakpoint.scss +0 -16
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/functions/_private.scss +0 -107
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/functions/_px-to-em.scss +0 -3
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_fill-parent.scss +0 -7
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_grid.scss +0 -5
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_media.scss +0 -51
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_omega.scss +0 -79
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_outer-container.scss +0 -8
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_pad.scss +0 -8
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_private.scss +0 -50
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_reset.scss +0 -12
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_row.scss +0 -17
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_shift.scss +0 -9
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_span-columns.scss +0 -38
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_to-deprecate.scss +0 -57
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/grid/_visual-grid.scss +0 -41
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/settings/_grid.scss +0 -7
- data/lib/wp/wp-content/themes/stump/assets/vendor/manhattan/neat/settings/_visual-grid.scss +0 -5
- data/lib/wp/wp-content/themes/stump/base.php +0 -36
- data/lib/wp/wp-content/themes/stump/functions.php +0 -19
- data/lib/wp/wp-content/themes/stump/index.php +0 -21
- data/lib/wp/wp-content/themes/stump/lang/ar.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/ar.po +0 -270
- data/lib/wp/wp-content/themes/stump/lang/bg_BG.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/bg_BG.po +0 -338
- data/lib/wp/wp-content/themes/stump/lang/ca.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/ca.po +0 -517
- data/lib/wp/wp-content/themes/stump/lang/da_DK.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/da_DK.po +0 -305
- data/lib/wp/wp-content/themes/stump/lang/de_DE.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/de_DE.po +0 -271
- data/lib/wp/wp-content/themes/stump/lang/el.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/el.po +0 -319
- data/lib/wp/wp-content/themes/stump/lang/es_ES.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/es_ES.po +0 -270
- data/lib/wp/wp-content/themes/stump/lang/et.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/et.po +0 -262
- data/lib/wp/wp-content/themes/stump/lang/fa_IR.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/fa_IR.po +0 -273
- data/lib/wp/wp-content/themes/stump/lang/fi_FI.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/fi_FI.po +0 -367
- data/lib/wp/wp-content/themes/stump/lang/fr_FR.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/fr_FR.po +0 -336
- data/lib/wp/wp-content/themes/stump/lang/he_IL.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/he_IL.po +0 -336
- data/lib/wp/wp-content/themes/stump/lang/hu_HU.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/hu_HU.po +0 -271
- data/lib/wp/wp-content/themes/stump/lang/id_ID.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/id_ID.po +0 -278
- data/lib/wp/wp-content/themes/stump/lang/it_IT.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/it_IT.po +0 -269
- data/lib/wp/wp-content/themes/stump/lang/ja.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/ja.po +0 -267
- data/lib/wp/wp-content/themes/stump/lang/ko_KR.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/ko_KR.po +0 -282
- data/lib/wp/wp-content/themes/stump/lang/mk_MK.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/mk_MK.po +0 -297
- data/lib/wp/wp-content/themes/stump/lang/ms_MY.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/ms_MY.po +0 -342
- data/lib/wp/wp-content/themes/stump/lang/nb_NO.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/nb_NO.po +0 -517
- data/lib/wp/wp-content/themes/stump/lang/nl_NL.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/nl_NL.po +0 -261
- data/lib/wp/wp-content/themes/stump/lang/nn_NO.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/nn_NO.po +0 -517
- data/lib/wp/wp-content/themes/stump/lang/pl_PL.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/pl_PL.po +0 -283
- data/lib/wp/wp-content/themes/stump/lang/pt_BR.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/pt_BR.po +0 -394
- data/lib/wp/wp-content/themes/stump/lang/ro_RO.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/ro_RO.po +0 -271
- data/lib/wp/wp-content/themes/stump/lang/roots.pot +0 -244
- data/lib/wp/wp-content/themes/stump/lang/ru_RU.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/ru_RU.po +0 -255
- data/lib/wp/wp-content/themes/stump/lang/sk_SK.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/sk_SK.po +0 -267
- data/lib/wp/wp-content/themes/stump/lang/sr_RS.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/sr_RS.pot +0 -261
- data/lib/wp/wp-content/themes/stump/lang/sv_SE.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/sv_SE.po +0 -323
- data/lib/wp/wp-content/themes/stump/lang/tr_TR.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/tr_TR.po +0 -405
- data/lib/wp/wp-content/themes/stump/lang/vi_VN.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/vi_VN.po +0 -516
- data/lib/wp/wp-content/themes/stump/lang/zh_CN.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/zh_CN.po +0 -329
- data/lib/wp/wp-content/themes/stump/lang/zh_TW.mo +0 -0
- data/lib/wp/wp-content/themes/stump/lang/zh_TW.po +0 -261
- data/lib/wp/wp-content/themes/stump/lib/activation.php +0 -215
- data/lib/wp/wp-content/themes/stump/lib/cleanup.php +0 -261
- data/lib/wp/wp-content/themes/stump/lib/comments.php +0 -52
- data/lib/wp/wp-content/themes/stump/lib/config.php +0 -79
- data/lib/wp/wp-content/themes/stump/lib/custom.php +0 -4
- data/lib/wp/wp-content/themes/stump/lib/gallery.php +0 -130
- data/lib/wp/wp-content/themes/stump/lib/init.php +0 -25
- data/lib/wp/wp-content/themes/stump/lib/nav.php +0 -93
- data/lib/wp/wp-content/themes/stump/lib/relative-urls.php +0 -50
- data/lib/wp/wp-content/themes/stump/lib/scripts.php +0 -67
- data/lib/wp/wp-content/themes/stump/lib/sidebar.php +0 -43
- data/lib/wp/wp-content/themes/stump/lib/titles.php +0 -37
- data/lib/wp/wp-content/themes/stump/lib/utils.php +0 -14
- data/lib/wp/wp-content/themes/stump/lib/widgets.php +0 -133
- data/lib/wp/wp-content/themes/stump/lib/wrapper.php +0 -49
- data/lib/wp/wp-content/themes/stump/package.json +0 -32
- data/lib/wp/wp-content/themes/stump/page.php +0 -2
- data/lib/wp/wp-content/themes/stump/screenshot.png +0 -0
- data/lib/wp/wp-content/themes/stump/single.php +0 -1
- data/lib/wp/wp-content/themes/stump/style.css +0 -11
- data/lib/wp/wp-content/themes/stump/template-custom.php +0 -8
- data/lib/wp/wp-content/themes/stump/templates/comment.php +0 -14
- data/lib/wp/wp-content/themes/stump/templates/comments.php +0 -80
- data/lib/wp/wp-content/themes/stump/templates/content-page.php +0 -4
- data/lib/wp/wp-content/themes/stump/templates/content-single.php +0 -15
- data/lib/wp/wp-content/themes/stump/templates/content.php +0 -9
- data/lib/wp/wp-content/themes/stump/templates/entry-meta.php +0 -2
- data/lib/wp/wp-content/themes/stump/templates/footer.php +0 -8
- data/lib/wp/wp-content/themes/stump/templates/head.php +0 -12
- data/lib/wp/wp-content/themes/stump/templates/header-top-navbar.php +0 -21
- data/lib/wp/wp-content/themes/stump/templates/header.php +0 -14
- data/lib/wp/wp-content/themes/stump/templates/page-header.php +0 -5
- data/lib/wp/wp-content/themes/stump/templates/searchform.php +0 -9
- data/lib/wp/wp-content/themes/stump/templates/sidebar.php +0 -1
- data/lib/wp/wp-cron.php +0 -115
- data/lib/wp/wp-includes/ID3/getid3.lib.php +0 -1376
- data/lib/wp/wp-includes/ID3/getid3.php +0 -1796
- data/lib/wp/wp-includes/ID3/license.commercial.txt +0 -27
- data/lib/wp/wp-includes/ID3/license.txt +0 -29
- data/lib/wp/wp-includes/ID3/module.audio-video.asf.php +0 -2013
- data/lib/wp/wp-includes/ID3/module.audio-video.flv.php +0 -745
- data/lib/wp/wp-includes/ID3/module.audio-video.matroska.php +0 -1751
- data/lib/wp/wp-includes/ID3/module.audio-video.quicktime.php +0 -2246
- data/lib/wp/wp-includes/ID3/module.audio-video.riff.php +0 -2586
- data/lib/wp/wp-includes/ID3/module.audio.ac3.php +0 -474
- data/lib/wp/wp-includes/ID3/module.audio.dts.php +0 -291
- data/lib/wp/wp-includes/ID3/module.audio.flac.php +0 -443
- data/lib/wp/wp-includes/ID3/module.audio.mp3.php +0 -2012
- data/lib/wp/wp-includes/ID3/module.audio.ogg.php +0 -756
- data/lib/wp/wp-includes/ID3/module.tag.apetag.php +0 -371
- data/lib/wp/wp-includes/ID3/module.tag.id3v1.php +0 -360
- data/lib/wp/wp-includes/ID3/module.tag.id3v2.php +0 -3424
- data/lib/wp/wp-includes/ID3/module.tag.lyrics3.php +0 -294
- data/lib/wp/wp-includes/ID3/readme.txt +0 -604
- data/lib/wp/wp-includes/SimplePie/Author.php +0 -157
- data/lib/wp/wp-includes/SimplePie/Cache.php +0 -133
- data/lib/wp/wp-includes/SimplePie/Cache/Base.php +0 -114
- data/lib/wp/wp-includes/SimplePie/Cache/DB.php +0 -137
- data/lib/wp/wp-includes/SimplePie/Cache/File.php +0 -173
- data/lib/wp/wp-includes/SimplePie/Cache/Memcache.php +0 -183
- data/lib/wp/wp-includes/SimplePie/Cache/MySQL.php +0 -438
- data/lib/wp/wp-includes/SimplePie/Caption.php +0 -210
- data/lib/wp/wp-includes/SimplePie/Category.php +0 -157
- data/lib/wp/wp-includes/SimplePie/Content/Type/Sniffer.php +0 -332
- data/lib/wp/wp-includes/SimplePie/Copyright.php +0 -130
- data/lib/wp/wp-includes/SimplePie/Core.php +0 -57
- data/lib/wp/wp-includes/SimplePie/Credit.php +0 -156
- data/lib/wp/wp-includes/SimplePie/Decode/HTML/Entities.php +0 -617
- data/lib/wp/wp-includes/SimplePie/Enclosure.php +0 -1380
- data/lib/wp/wp-includes/SimplePie/Exception.php +0 -52
- data/lib/wp/wp-includes/SimplePie/File.php +0 -292
- data/lib/wp/wp-includes/SimplePie/HTTP/Parser.php +0 -500
- data/lib/wp/wp-includes/SimplePie/IRI.php +0 -1238
- data/lib/wp/wp-includes/SimplePie/Item.php +0 -2964
- data/lib/wp/wp-includes/SimplePie/Locator.php +0 -372
- data/lib/wp/wp-includes/SimplePie/Misc.php +0 -2247
- data/lib/wp/wp-includes/SimplePie/Net/IPv6.php +0 -276
- data/lib/wp/wp-includes/SimplePie/Parse/Date.php +0 -983
- data/lib/wp/wp-includes/SimplePie/Parser.php +0 -407
- data/lib/wp/wp-includes/SimplePie/Rating.php +0 -129
- data/lib/wp/wp-includes/SimplePie/Registry.php +0 -225
- data/lib/wp/wp-includes/SimplePie/Restriction.php +0 -155
- data/lib/wp/wp-includes/SimplePie/Sanitize.php +0 -554
- data/lib/wp/wp-includes/SimplePie/Source.php +0 -611
- data/lib/wp/wp-includes/SimplePie/XML/Declaration/Parser.php +0 -362
- data/lib/wp/wp-includes/SimplePie/gzdecode.php +0 -371
- data/lib/wp/wp-includes/Text/Diff.php +0 -450
- data/lib/wp/wp-includes/Text/Diff/Engine/native.php +0 -436
- data/lib/wp/wp-includes/Text/Diff/Engine/shell.php +0 -162
- data/lib/wp/wp-includes/Text/Diff/Engine/string.php +0 -248
- data/lib/wp/wp-includes/Text/Diff/Engine/xdiff.php +0 -64
- data/lib/wp/wp-includes/Text/Diff/Renderer.php +0 -235
- data/lib/wp/wp-includes/Text/Diff/Renderer/inline.php +0 -206
- data/lib/wp/wp-includes/admin-bar.php +0 -870
- data/lib/wp/wp-includes/atomlib.php +0 -352
- data/lib/wp/wp-includes/author-template.php +0 -471
- data/lib/wp/wp-includes/bookmark-template.php +0 -298
- data/lib/wp/wp-includes/bookmark.php +0 -416
- data/lib/wp/wp-includes/cache.php +0 -704
- data/lib/wp/wp-includes/canonical.php +0 -586
- data/lib/wp/wp-includes/capabilities.php +0 -1539
- data/lib/wp/wp-includes/category-template.php +0 -1407
- data/lib/wp/wp-includes/category.php +0 -343
- data/lib/wp/wp-includes/certificates/ca-bundle.crt +0 -3785
- data/lib/wp/wp-includes/class-IXR.php +0 -1100
- data/lib/wp/wp-includes/class-feed.php +0 -140
- data/lib/wp/wp-includes/class-http.php +0 -2245
- data/lib/wp/wp-includes/class-json.php +0 -936
- data/lib/wp/wp-includes/class-oembed.php +0 -579
- data/lib/wp/wp-includes/class-phpass.php +0 -260
- data/lib/wp/wp-includes/class-phpmailer.php +0 -3265
- data/lib/wp/wp-includes/class-pop3.php +0 -652
- data/lib/wp/wp-includes/class-simplepie.php +0 -3119
- data/lib/wp/wp-includes/class-smtp.php +0 -943
- data/lib/wp/wp-includes/class-snoopy.php +0 -1256
- data/lib/wp/wp-includes/class-wp-admin-bar.php +0 -517
- data/lib/wp/wp-includes/class-wp-ajax-response.php +0 -199
- data/lib/wp/wp-includes/class-wp-customize-control.php +0 -1124
- data/lib/wp/wp-includes/class-wp-customize-manager.php +0 -1272
- data/lib/wp/wp-includes/class-wp-customize-panel.php +0 -200
- data/lib/wp/wp-includes/class-wp-customize-section.php +0 -196
- data/lib/wp/wp-includes/class-wp-customize-setting.php +0 -554
- data/lib/wp/wp-includes/class-wp-customize-widgets.php +0 -1556
- data/lib/wp/wp-includes/class-wp-editor.php +0 -1435
- data/lib/wp/wp-includes/class-wp-embed.php +0 -373
- data/lib/wp/wp-includes/class-wp-error.php +0 -276
- data/lib/wp/wp-includes/class-wp-http-ixr-client.php +0 -97
- data/lib/wp/wp-includes/class-wp-image-editor-gd.php +0 -459
- data/lib/wp/wp-includes/class-wp-image-editor-imagick.php +0 -512
- data/lib/wp/wp-includes/class-wp-image-editor.php +0 -475
- data/lib/wp/wp-includes/class-wp-theme.php +0 -1235
- data/lib/wp/wp-includes/class-wp-walker.php +0 -471
- data/lib/wp/wp-includes/class-wp-xmlrpc-server.php +0 -5984
- data/lib/wp/wp-includes/class-wp.php +0 -782
- data/lib/wp/wp-includes/class.wp-dependencies.php +0 -509
- data/lib/wp/wp-includes/class.wp-scripts.php +0 -247
- data/lib/wp/wp-includes/class.wp-styles.php +0 -210
- data/lib/wp/wp-includes/comment-template.php +0 -2286
- data/lib/wp/wp-includes/comment.php +0 -2606
- data/lib/wp/wp-includes/compat.php +0 -125
- data/lib/wp/wp-includes/cron.php +0 -469
- data/lib/wp/wp-includes/css/admin-bar-rtl.css +0 -1099
- data/lib/wp/wp-includes/css/admin-bar-rtl.min.css +0 -1
- data/lib/wp/wp-includes/css/admin-bar.css +0 -1099
- data/lib/wp/wp-includes/css/admin-bar.min.css +0 -1
- data/lib/wp/wp-includes/css/buttons-rtl.css +0 -364
- data/lib/wp/wp-includes/css/buttons-rtl.min.css +0 -1
- data/lib/wp/wp-includes/css/buttons.css +0 -364
- data/lib/wp/wp-includes/css/buttons.min.css +0 -1
- data/lib/wp/wp-includes/css/dashicons.css +0 -893
- data/lib/wp/wp-includes/css/dashicons.min.css +0 -1
- data/lib/wp/wp-includes/css/editor-rtl.css +0 -1993
- data/lib/wp/wp-includes/css/editor-rtl.min.css +0 -1
- data/lib/wp/wp-includes/css/editor.css +0 -1993
- data/lib/wp/wp-includes/css/editor.min.css +0 -1
- data/lib/wp/wp-includes/css/jquery-ui-dialog-rtl.css +0 -343
- data/lib/wp/wp-includes/css/jquery-ui-dialog-rtl.min.css +0 -19
- data/lib/wp/wp-includes/css/jquery-ui-dialog.css +0 -343
- data/lib/wp/wp-includes/css/jquery-ui-dialog.min.css +0 -19
- data/lib/wp/wp-includes/css/media-views-rtl.css +0 -2568
- data/lib/wp/wp-includes/css/media-views-rtl.min.css +0 -1
- data/lib/wp/wp-includes/css/media-views.css +0 -2568
- data/lib/wp/wp-includes/css/media-views.min.css +0 -1
- data/lib/wp/wp-includes/css/wp-auth-check-rtl.css +0 -100
- data/lib/wp/wp-includes/css/wp-auth-check-rtl.min.css +0 -1
- data/lib/wp/wp-includes/css/wp-auth-check.css +0 -100
- data/lib/wp/wp-includes/css/wp-auth-check.min.css +0 -1
- data/lib/wp/wp-includes/css/wp-pointer-rtl.css +0 -212
- data/lib/wp/wp-includes/css/wp-pointer-rtl.min.css +0 -1
- data/lib/wp/wp-includes/css/wp-pointer.css +0 -212
- data/lib/wp/wp-includes/css/wp-pointer.min.css +0 -1
- data/lib/wp/wp-includes/date.php +0 -475
- data/lib/wp/wp-includes/default-constants.php +0 -323
- data/lib/wp/wp-includes/default-filters.php +0 -307
- data/lib/wp/wp-includes/default-widgets.php +0 -1423
- data/lib/wp/wp-includes/deprecated.php +0 -3501
- data/lib/wp/wp-includes/feed-atom-comments.php +0 -115
- data/lib/wp/wp-includes/feed-atom.php +0 -87
- data/lib/wp/wp-includes/feed-rdf.php +0 -81
- data/lib/wp/wp-includes/feed-rss.php +0 -46
- data/lib/wp/wp-includes/feed-rss2-comments.php +0 -97
- data/lib/wp/wp-includes/feed-rss2.php +0 -115
- data/lib/wp/wp-includes/feed.php +0 -659
- data/lib/wp/wp-includes/fonts/dashicons.eot +0 -0
- data/lib/wp/wp-includes/fonts/dashicons.svg +0 -250
- data/lib/wp/wp-includes/fonts/dashicons.ttf +0 -0
- data/lib/wp/wp-includes/fonts/dashicons.woff +0 -0
- data/lib/wp/wp-includes/formatting.php +0 -4006
- data/lib/wp/wp-includes/functions.php +0 -4631
- data/lib/wp/wp-includes/functions.wp-scripts.php +0 -258
- data/lib/wp/wp-includes/functions.wp-styles.php +0 -245
- data/lib/wp/wp-includes/general-template.php +0 -2982
- data/lib/wp/wp-includes/http.php +0 -551
- data/lib/wp/wp-includes/images/admin-bar-sprite-2x.png +0 -0
- data/lib/wp/wp-includes/images/admin-bar-sprite.png +0 -0
- data/lib/wp/wp-includes/images/arrow-pointer-blue-2x.png +0 -0
- data/lib/wp/wp-includes/images/arrow-pointer-blue.png +0 -0
- data/lib/wp/wp-includes/images/blank.gif +0 -0
- data/lib/wp/wp-includes/images/crystal/archive.png +0 -0
- data/lib/wp/wp-includes/images/crystal/audio.png +0 -0
- data/lib/wp/wp-includes/images/crystal/code.png +0 -0
- data/lib/wp/wp-includes/images/crystal/default.png +0 -0
- data/lib/wp/wp-includes/images/crystal/document.png +0 -0
- data/lib/wp/wp-includes/images/crystal/interactive.png +0 -0
- data/lib/wp/wp-includes/images/crystal/license.txt +0 -9
- data/lib/wp/wp-includes/images/crystal/spreadsheet.png +0 -0
- data/lib/wp/wp-includes/images/crystal/text.png +0 -0
- data/lib/wp/wp-includes/images/crystal/video.png +0 -0
- data/lib/wp/wp-includes/images/down_arrow-2x.gif +0 -0
- data/lib/wp/wp-includes/images/down_arrow.gif +0 -0
- data/lib/wp/wp-includes/images/icon-pointer-flag-2x.png +0 -0
- data/lib/wp/wp-includes/images/icon-pointer-flag.png +0 -0
- data/lib/wp/wp-includes/images/media/archive.png +0 -0
- data/lib/wp/wp-includes/images/media/audio.png +0 -0
- data/lib/wp/wp-includes/images/media/code.png +0 -0
- data/lib/wp/wp-includes/images/media/default.png +0 -0
- data/lib/wp/wp-includes/images/media/document.png +0 -0
- data/lib/wp/wp-includes/images/media/interactive.png +0 -0
- data/lib/wp/wp-includes/images/media/spreadsheet.png +0 -0
- data/lib/wp/wp-includes/images/media/text.png +0 -0
- data/lib/wp/wp-includes/images/media/video.png +0 -0
- data/lib/wp/wp-includes/images/rss-2x.png +0 -0
- data/lib/wp/wp-includes/images/rss.png +0 -0
- data/lib/wp/wp-includes/images/smilies/icon_arrow.gif +0 -0
- data/lib/wp/wp-includes/images/smilies/icon_biggrin.gif +0 -0
- data/lib/wp/wp-includes/images/smilies/icon_confused.gif +0 -0
- data/lib/wp/wp-includes/images/smilies/icon_cool.gif +0 -0
- data/lib/wp/wp-includes/images/smilies/icon_cry.gif +0 -0
- data/lib/wp/wp-includes/images/smilies/icon_eek.gif +0 -0
- data/lib/wp/wp-includes/images/smilies/icon_evil.gif +0 -0
- data/lib/wp/wp-includes/images/smilies/icon_exclaim.gif +0 -0
- data/lib/wp/wp-includes/images/smilies/icon_idea.gif +0 -0
- data/lib/wp/wp-includes/images/smilies/icon_lol.gif +0 -0
- data/lib/wp/wp-includes/images/smilies/icon_mad.gif +0 -0
- data/lib/wp/wp-includes/images/smilies/icon_mrgreen.gif +0 -0
- data/lib/wp/wp-includes/images/smilies/icon_neutral.gif +0 -0
- data/lib/wp/wp-includes/images/smilies/icon_question.gif +0 -0
- data/lib/wp/wp-includes/images/smilies/icon_razz.gif +0 -0
- data/lib/wp/wp-includes/images/smilies/icon_redface.gif +0 -0
- data/lib/wp/wp-includes/images/smilies/icon_rolleyes.gif +0 -0
- data/lib/wp/wp-includes/images/smilies/icon_sad.gif +0 -0
- data/lib/wp/wp-includes/images/smilies/icon_smile.gif +0 -0
- data/lib/wp/wp-includes/images/smilies/icon_surprised.gif +0 -0
- data/lib/wp/wp-includes/images/smilies/icon_twisted.gif +0 -0
- data/lib/wp/wp-includes/images/smilies/icon_wink.gif +0 -0
- data/lib/wp/wp-includes/images/spinner-2x.gif +0 -0
- data/lib/wp/wp-includes/images/spinner.gif +0 -0
- data/lib/wp/wp-includes/images/toggle-arrow-2x.png +0 -0
- data/lib/wp/wp-includes/images/toggle-arrow.png +0 -0
- data/lib/wp/wp-includes/images/uploader-icons-2x.png +0 -0
- data/lib/wp/wp-includes/images/uploader-icons.png +0 -0
- data/lib/wp/wp-includes/images/wlw/wp-comments.png +0 -0
- data/lib/wp/wp-includes/images/wlw/wp-icon.png +0 -0
- data/lib/wp/wp-includes/images/wlw/wp-watermark.png +0 -0
- data/lib/wp/wp-includes/images/wpicons-2x.png +0 -0
- data/lib/wp/wp-includes/images/wpicons.png +0 -0
- data/lib/wp/wp-includes/images/wpspin-2x.gif +0 -0
- data/lib/wp/wp-includes/images/wpspin.gif +0 -0
- data/lib/wp/wp-includes/images/xit-2x.gif +0 -0
- data/lib/wp/wp-includes/images/xit.gif +0 -0
- data/lib/wp/wp-includes/js/admin-bar.js +0 -365
- data/lib/wp/wp-includes/js/admin-bar.min.js +0 -1
- data/lib/wp/wp-includes/js/autosave.js +0 -589
- data/lib/wp/wp-includes/js/autosave.min.js +0 -1
- data/lib/wp/wp-includes/js/backbone.min.js +0 -1
- data/lib/wp/wp-includes/js/colorpicker.js +0 -707
- data/lib/wp/wp-includes/js/colorpicker.min.js +0 -1
- data/lib/wp/wp-includes/js/comment-reply.js +0 -47
- data/lib/wp/wp-includes/js/comment-reply.min.js +0 -1
- data/lib/wp/wp-includes/js/crop/cropper.css +0 -165
- data/lib/wp/wp-includes/js/crop/cropper.js +0 -516
- data/lib/wp/wp-includes/js/crop/marqueeHoriz.gif +0 -0
- data/lib/wp/wp-includes/js/crop/marqueeVert.gif +0 -0
- data/lib/wp/wp-includes/js/customize-base.js +0 -617
- data/lib/wp/wp-includes/js/customize-base.min.js +0 -1
- data/lib/wp/wp-includes/js/customize-loader.js +0 -246
- data/lib/wp/wp-includes/js/customize-loader.min.js +0 -1
- data/lib/wp/wp-includes/js/customize-models.js +0 -247
- data/lib/wp/wp-includes/js/customize-models.min.js +0 -1
- data/lib/wp/wp-includes/js/customize-preview-widgets.js +0 -129
- data/lib/wp/wp-includes/js/customize-preview-widgets.min.js +0 -1
- data/lib/wp/wp-includes/js/customize-preview.js +0 -154
- data/lib/wp/wp-includes/js/customize-preview.min.js +0 -1
- data/lib/wp/wp-includes/js/customize-views.js +0 -231
- data/lib/wp/wp-includes/js/customize-views.min.js +0 -1
- data/lib/wp/wp-includes/js/heartbeat.js +0 -738
- data/lib/wp/wp-includes/js/heartbeat.min.js +0 -1
- data/lib/wp/wp-includes/js/hoverIntent.js +0 -115
- data/lib/wp/wp-includes/js/hoverIntent.min.js +0 -1
- data/lib/wp/wp-includes/js/imgareaselect/border-anim-h.gif +0 -0
- data/lib/wp/wp-includes/js/imgareaselect/border-anim-v.gif +0 -0
- data/lib/wp/wp-includes/js/imgareaselect/imgareaselect.css +0 -41
- data/lib/wp/wp-includes/js/imgareaselect/jquery.imgareaselect.js +0 -1205
- data/lib/wp/wp-includes/js/imgareaselect/jquery.imgareaselect.min.js +0 -1
- data/lib/wp/wp-includes/js/jcrop/Jcrop.gif +0 -0
- data/lib/wp/wp-includes/js/jcrop/jquery.Jcrop.min.css +0 -29
- data/lib/wp/wp-includes/js/jcrop/jquery.Jcrop.min.js +0 -22
- data/lib/wp/wp-includes/js/jquery/jquery-migrate.js +0 -521
- data/lib/wp/wp-includes/js/jquery/jquery-migrate.min.js +0 -2
- data/lib/wp/wp-includes/js/jquery/jquery.color.min.js +0 -2
- data/lib/wp/wp-includes/js/jquery/jquery.form.js +0 -1193
- data/lib/wp/wp-includes/js/jquery/jquery.form.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/jquery.hotkeys.js +0 -134
- data/lib/wp/wp-includes/js/jquery/jquery.hotkeys.min.js +0 -1
- data/lib/wp/wp-includes/js/jquery/jquery.js +0 -5
- data/lib/wp/wp-includes/js/jquery/jquery.masonry.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/jquery.query.js +0 -11
- data/lib/wp/wp-includes/js/jquery/jquery.schedule.js +0 -36
- data/lib/wp/wp-includes/js/jquery/jquery.serialize-object.js +0 -31
- data/lib/wp/wp-includes/js/jquery/jquery.table-hotkeys.js +0 -99
- data/lib/wp/wp-includes/js/jquery/jquery.table-hotkeys.min.js +0 -1
- data/lib/wp/wp-includes/js/jquery/jquery.ui.touch-punch.js +0 -11
- data/lib/wp/wp-includes/js/jquery/suggest.js +0 -316
- data/lib/wp/wp-includes/js/jquery/suggest.min.js +0 -1
- data/lib/wp/wp-includes/js/jquery/ui/accordion.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/autocomplete.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/button.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/core.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/datepicker.min.js +0 -12
- data/lib/wp/wp-includes/js/jquery/ui/dialog.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/draggable.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/droppable.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/effect-blind.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/effect-bounce.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/effect-clip.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/effect-drop.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/effect-explode.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/effect-fade.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/effect-fold.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/effect-highlight.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/effect-puff.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/effect-pulsate.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/effect-scale.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/effect-shake.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/effect-size.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/effect-slide.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/effect-transfer.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/effect.min.js +0 -21
- data/lib/wp/wp-includes/js/jquery/ui/menu.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/mouse.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/position.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/progressbar.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/resizable.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/selectable.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/selectmenu.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/slider.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/sortable.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/spinner.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/tabs.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/tooltip.min.js +0 -11
- data/lib/wp/wp-includes/js/jquery/ui/widget.min.js +0 -11
- data/lib/wp/wp-includes/js/json2.js +0 -480
- data/lib/wp/wp-includes/js/json2.min.js +0 -1
- data/lib/wp/wp-includes/js/masonry.min.js +0 -1
- data/lib/wp/wp-includes/js/mce-view.js +0 -829
- data/lib/wp/wp-includes/js/mce-view.min.js +0 -1
- data/lib/wp/wp-includes/js/media-audiovideo.js +0 -831
- data/lib/wp/wp-includes/js/media-audiovideo.min.js +0 -1
- data/lib/wp/wp-includes/js/media-editor.js +0 -1114
- data/lib/wp/wp-includes/js/media-editor.min.js +0 -1
- data/lib/wp/wp-includes/js/media-grid.js +0 -732
- data/lib/wp/wp-includes/js/media-grid.min.js +0 -1
- data/lib/wp/wp-includes/js/media-models.js +0 -1362
- data/lib/wp/wp-includes/js/media-models.min.js +0 -1
- data/lib/wp/wp-includes/js/media-views.js +0 -7484
- data/lib/wp/wp-includes/js/media-views.min.js +0 -3
- data/lib/wp/wp-includes/js/mediaelement/background.png +0 -0
- data/lib/wp/wp-includes/js/mediaelement/bigplay.png +0 -0
- data/lib/wp/wp-includes/js/mediaelement/bigplay.svg +0 -1
- data/lib/wp/wp-includes/js/mediaelement/controls.png +0 -0
- data/lib/wp/wp-includes/js/mediaelement/controls.svg +0 -1
- data/lib/wp/wp-includes/js/mediaelement/flashmediaelement.swf +0 -0
- data/lib/wp/wp-includes/js/mediaelement/loading.gif +0 -0
- data/lib/wp/wp-includes/js/mediaelement/mediaelement-and-player.min.js +0 -181
- data/lib/wp/wp-includes/js/mediaelement/mediaelementplayer.min.css +0 -1
- data/lib/wp/wp-includes/js/mediaelement/silverlightmediaelement.xap +0 -0
- data/lib/wp/wp-includes/js/mediaelement/wp-mediaelement.css +0 -274
- data/lib/wp/wp-includes/js/mediaelement/wp-mediaelement.js +0 -34
- data/lib/wp/wp-includes/js/mediaelement/wp-playlist.js +0 -175
- data/lib/wp/wp-includes/js/plupload/handlers.js +0 -488
- data/lib/wp/wp-includes/js/plupload/handlers.min.js +0 -1
- data/lib/wp/wp-includes/js/plupload/license.txt +0 -339
- data/lib/wp/wp-includes/js/plupload/plupload.flash.swf +0 -0
- data/lib/wp/wp-includes/js/plupload/plupload.full.min.js +0 -28
- data/lib/wp/wp-includes/js/plupload/plupload.silverlight.xap +0 -0
- data/lib/wp/wp-includes/js/plupload/wp-plupload.js +0 -376
- data/lib/wp/wp-includes/js/plupload/wp-plupload.min.js +0 -1
- data/lib/wp/wp-includes/js/quicktags.js +0 -652
- data/lib/wp/wp-includes/js/quicktags.min.js +0 -1
- data/lib/wp/wp-includes/js/shortcode.js +0 -356
- data/lib/wp/wp-includes/js/shortcode.min.js +0 -1
- data/lib/wp/wp-includes/js/swfobject.js +0 -4
- data/lib/wp/wp-includes/js/swfupload/handlers.js +0 -376
- data/lib/wp/wp-includes/js/swfupload/handlers.min.js +0 -1
- data/lib/wp/wp-includes/js/swfupload/license.txt +0 -32
- data/lib/wp/wp-includes/js/swfupload/plugins/swfupload.cookies.js +0 -53
- data/lib/wp/wp-includes/js/swfupload/plugins/swfupload.queue.js +0 -98
- data/lib/wp/wp-includes/js/swfupload/plugins/swfupload.speed.js +0 -342
- data/lib/wp/wp-includes/js/swfupload/plugins/swfupload.swfobject.js +0 -105
- data/lib/wp/wp-includes/js/swfupload/swfupload.js +0 -980
- data/lib/wp/wp-includes/js/swfupload/swfupload.swf +0 -0
- data/lib/wp/wp-includes/js/thickbox/loadingAnimation.gif +0 -0
- data/lib/wp/wp-includes/js/thickbox/macFFBgHack.png +0 -0
- data/lib/wp/wp-includes/js/thickbox/thickbox.css +0 -138
- data/lib/wp/wp-includes/js/thickbox/thickbox.js +0 -314
- data/lib/wp/wp-includes/js/tinymce/langs/wp-langs-en.js +0 -519
- data/lib/wp/wp-includes/js/tinymce/license.txt +0 -504
- data/lib/wp/wp-includes/js/tinymce/plugins/charmap/plugin.js +0 -370
- data/lib/wp/wp-includes/js/tinymce/plugins/charmap/plugin.min.js +0 -1
- data/lib/wp/wp-includes/js/tinymce/plugins/colorpicker/plugin.js +0 -112
- data/lib/wp/wp-includes/js/tinymce/plugins/colorpicker/plugin.min.js +0 -1
- data/lib/wp/wp-includes/js/tinymce/plugins/compat3x/css/dialog.css +0 -212
- data/lib/wp/wp-includes/js/tinymce/plugins/compat3x/plugin.js +0 -304
- data/lib/wp/wp-includes/js/tinymce/plugins/compat3x/plugin.min.js +0 -1
- data/lib/wp/wp-includes/js/tinymce/plugins/directionality/plugin.js +0 -64
- data/lib/wp/wp-includes/js/tinymce/plugins/directionality/plugin.min.js +0 -1
- data/lib/wp/wp-includes/js/tinymce/plugins/fullscreen/plugin.js +0 -136
- data/lib/wp/wp-includes/js/tinymce/plugins/fullscreen/plugin.min.js +0 -1
- data/lib/wp/wp-includes/js/tinymce/plugins/hr/plugin.js +0 -30
- data/lib/wp/wp-includes/js/tinymce/plugins/hr/plugin.min.js +0 -1
- data/lib/wp/wp-includes/js/tinymce/plugins/image/plugin.js +0 -450
- data/lib/wp/wp-includes/js/tinymce/plugins/image/plugin.min.js +0 -1
- data/lib/wp/wp-includes/js/tinymce/plugins/lists/plugin.js +0 -786
- data/lib/wp/wp-includes/js/tinymce/plugins/lists/plugin.min.js +0 -1
- data/lib/wp/wp-includes/js/tinymce/plugins/media/moxieplayer.swf +0 -0
- data/lib/wp/wp-includes/js/tinymce/plugins/media/plugin.js +0 -774
- data/lib/wp/wp-includes/js/tinymce/plugins/media/plugin.min.js +0 -1
- data/lib/wp/wp-includes/js/tinymce/plugins/paste/plugin.js +0 -1553
- data/lib/wp/wp-includes/js/tinymce/plugins/paste/plugin.min.js +0 -1
- data/lib/wp/wp-includes/js/tinymce/plugins/tabfocus/plugin.js +0 -125
- data/lib/wp/wp-includes/js/tinymce/plugins/tabfocus/plugin.min.js +0 -1
- data/lib/wp/wp-includes/js/tinymce/plugins/textcolor/plugin.js +0 -272
- data/lib/wp/wp-includes/js/tinymce/plugins/textcolor/plugin.min.js +0 -1
- data/lib/wp/wp-includes/js/tinymce/plugins/wordpress/plugin.js +0 -513
- data/lib/wp/wp-includes/js/tinymce/plugins/wordpress/plugin.min.js +0 -1
- data/lib/wp/wp-includes/js/tinymce/plugins/wpautoresize/plugin.js +0 -207
- data/lib/wp/wp-includes/js/tinymce/plugins/wpautoresize/plugin.min.js +0 -1
- data/lib/wp/wp-includes/js/tinymce/plugins/wpdialogs/plugin.js +0 -92
- data/lib/wp/wp-includes/js/tinymce/plugins/wpdialogs/plugin.min.js +0 -1
- data/lib/wp/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js +0 -1035
- data/lib/wp/wp-includes/js/tinymce/plugins/wpeditimage/plugin.min.js +0 -1
- data/lib/wp/wp-includes/js/tinymce/plugins/wpfullscreen/plugin.js +0 -78
- data/lib/wp/wp-includes/js/tinymce/plugins/wpfullscreen/plugin.min.js +0 -1
- data/lib/wp/wp-includes/js/tinymce/plugins/wpgallery/plugin.js +0 -130
- data/lib/wp/wp-includes/js/tinymce/plugins/wpgallery/plugin.min.js +0 -1
- data/lib/wp/wp-includes/js/tinymce/plugins/wplink/plugin.js +0 -63
- data/lib/wp/wp-includes/js/tinymce/plugins/wplink/plugin.min.js +0 -1
- data/lib/wp/wp-includes/js/tinymce/plugins/wpview/plugin.js +0 -694
- data/lib/wp/wp-includes/js/tinymce/plugins/wpview/plugin.min.js +0 -1
- data/lib/wp/wp-includes/js/tinymce/skins/lightgray/content.inline.min.css +0 -1
- data/lib/wp/wp-includes/js/tinymce/skins/lightgray/content.min.css +0 -1
- data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/readme.md +0 -1
- data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.eot +0 -0
- data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.svg +0 -62
- data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.ttf +0 -0
- data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.woff +0 -0
- data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
- data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.svg +0 -63
- data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
- data/lib/wp/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
- data/lib/wp/wp-includes/js/tinymce/skins/lightgray/img/anchor.gif +0 -0
- data/lib/wp/wp-includes/js/tinymce/skins/lightgray/img/loader.gif +0 -0
- data/lib/wp/wp-includes/js/tinymce/skins/lightgray/img/object.gif +0 -0
- data/lib/wp/wp-includes/js/tinymce/skins/lightgray/img/trans.gif +0 -0
- data/lib/wp/wp-includes/js/tinymce/skins/lightgray/skin.ie7.min.css +0 -1
- data/lib/wp/wp-includes/js/tinymce/skins/lightgray/skin.min.css +0 -1
- data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/audio.png +0 -0
- data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/dashicon-edit.png +0 -0
- data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/dashicon-no-alt.png +0 -0
- data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/embedded.png +0 -0
- data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/gallery-2x.png +0 -0
- data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/gallery.png +0 -0
- data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/more-2x.png +0 -0
- data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/more.png +0 -0
- data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/pagebreak-2x.png +0 -0
- data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/pagebreak.png +0 -0
- data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/playlist-audio.png +0 -0
- data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/playlist-video.png +0 -0
- data/lib/wp/wp-includes/js/tinymce/skins/wordpress/images/video.png +0 -0
- data/lib/wp/wp-includes/js/tinymce/skins/wordpress/wp-content.css +0 -618
- data/lib/wp/wp-includes/js/tinymce/themes/modern/theme.js +0 -617
- data/lib/wp/wp-includes/js/tinymce/themes/modern/theme.min.js +0 -1
- data/lib/wp/wp-includes/js/tinymce/tiny_mce_popup.js +0 -539
- data/lib/wp/wp-includes/js/tinymce/tinymce.min.js +0 -11
- data/lib/wp/wp-includes/js/tinymce/utils/editable_selects.js +0 -70
- data/lib/wp/wp-includes/js/tinymce/utils/form_utils.js +0 -210
- data/lib/wp/wp-includes/js/tinymce/utils/mctabs.js +0 -164
- data/lib/wp/wp-includes/js/tinymce/utils/validate.js +0 -252
- data/lib/wp/wp-includes/js/tinymce/wp-mce-help.php +0 -145
- data/lib/wp/wp-includes/js/tinymce/wp-tinymce.js.gz +0 -0
- data/lib/wp/wp-includes/js/tinymce/wp-tinymce.php +0 -39
- data/lib/wp/wp-includes/js/tw-sack.js +0 -193
- data/lib/wp/wp-includes/js/tw-sack.min.js +0 -1
- data/lib/wp/wp-includes/js/underscore.min.js +0 -1
- data/lib/wp/wp-includes/js/utils.js +0 -197
- data/lib/wp/wp-includes/js/utils.min.js +0 -1
- data/lib/wp/wp-includes/js/wp-ajax-response.js +0 -64
- data/lib/wp/wp-includes/js/wp-ajax-response.min.js +0 -1
- data/lib/wp/wp-includes/js/wp-auth-check.js +0 -112
- data/lib/wp/wp-includes/js/wp-auth-check.min.js +0 -1
- data/lib/wp/wp-includes/js/wp-backbone.js +0 -386
- data/lib/wp/wp-includes/js/wp-backbone.min.js +0 -1
- data/lib/wp/wp-includes/js/wp-list-revisions.js +0 -24
- data/lib/wp/wp-includes/js/wp-list-revisions.min.js +0 -1
- data/lib/wp/wp-includes/js/wp-lists.js +0 -469
- data/lib/wp/wp-includes/js/wp-lists.min.js +0 -1
- data/lib/wp/wp-includes/js/wp-pointer.js +0 -282
- data/lib/wp/wp-includes/js/wp-pointer.min.js +0 -1
- data/lib/wp/wp-includes/js/wp-util.js +0 -106
- data/lib/wp/wp-includes/js/wp-util.min.js +0 -1
- data/lib/wp/wp-includes/js/wpdialog.js +0 -19
- data/lib/wp/wp-includes/js/wpdialog.min.js +0 -1
- data/lib/wp/wp-includes/js/wplink.js +0 -615
- data/lib/wp/wp-includes/js/wplink.min.js +0 -1
- data/lib/wp/wp-includes/js/zxcvbn-async.js +0 -18
- data/lib/wp/wp-includes/js/zxcvbn-async.min.js +0 -1
- data/lib/wp/wp-includes/js/zxcvbn.min.js +0 -47
- data/lib/wp/wp-includes/kses.php +0 -1526
- data/lib/wp/wp-includes/l10n.php +0 -908
- data/lib/wp/wp-includes/link-template.php +0 -3141
- data/lib/wp/wp-includes/load.php +0 -828
- data/lib/wp/wp-includes/locale.php +0 -368
- data/lib/wp/wp-includes/media-template.php +0 -1235
- data/lib/wp/wp-includes/media.php +0 -3329
- data/lib/wp/wp-includes/meta.php +0 -1221
- data/lib/wp/wp-includes/ms-blogs.php +0 -939
- data/lib/wp/wp-includes/ms-default-constants.php +0 -153
- data/lib/wp/wp-includes/ms-default-filters.php +0 -82
- data/lib/wp/wp-includes/ms-deprecated.php +0 -347
- data/lib/wp/wp-includes/ms-files.php +0 -82
- data/lib/wp/wp-includes/ms-functions.php +0 -2476
- data/lib/wp/wp-includes/ms-load.php +0 -458
- data/lib/wp/wp-includes/ms-settings.php +0 -213
- data/lib/wp/wp-includes/nav-menu-template.php +0 -678
- data/lib/wp/wp-includes/nav-menu.php +0 -895
- data/lib/wp/wp-includes/option.php +0 -1440
- data/lib/wp/wp-includes/pluggable-deprecated.php +0 -192
- data/lib/wp/wp-includes/pluggable.php +0 -2283
- data/lib/wp/wp-includes/plugin.php +0 -920
- data/lib/wp/wp-includes/pomo/entry.php +0 -78
- data/lib/wp/wp-includes/pomo/mo.php +0 -262
- data/lib/wp/wp-includes/pomo/po.php +0 -384
- data/lib/wp/wp-includes/pomo/streams.php +0 -209
- data/lib/wp/wp-includes/pomo/translations.php +0 -275
- data/lib/wp/wp-includes/post-formats.php +0 -243
- data/lib/wp/wp-includes/post-template.php +0 -1766
- data/lib/wp/wp-includes/post-thumbnail-template.php +0 -142
- data/lib/wp/wp-includes/post.php +0 -5842
- data/lib/wp/wp-includes/query.php +0 -4666
- data/lib/wp/wp-includes/registration-functions.php +0 -7
- data/lib/wp/wp-includes/registration.php +0 -7
- data/lib/wp/wp-includes/revision.php +0 -657
- data/lib/wp/wp-includes/rewrite.php +0 -2180
- data/lib/wp/wp-includes/rss-functions.php +0 -9
- data/lib/wp/wp-includes/rss.php +0 -936
- data/lib/wp/wp-includes/script-loader.php +0 -1045
- data/lib/wp/wp-includes/session.php +0 -430
- data/lib/wp/wp-includes/shortcodes.php +0 -410
- data/lib/wp/wp-includes/taxonomy.php +0 -4006
- data/lib/wp/wp-includes/template-loader.php +0 -76
- data/lib/wp/wp-includes/template.php +0 -505
- data/lib/wp/wp-includes/theme-compat/comments-popup.php +0 -128
- data/lib/wp/wp-includes/theme-compat/comments.php +0 -101
- data/lib/wp/wp-includes/theme-compat/footer.php +0 -30
- data/lib/wp/wp-includes/theme-compat/header.php +0 -49
- data/lib/wp/wp-includes/theme-compat/sidebar.php +0 -83
- data/lib/wp/wp-includes/theme.php +0 -2014
- data/lib/wp/wp-includes/update.php +0 -674
- data/lib/wp/wp-includes/user.php +0 -2292
- data/lib/wp/wp-includes/vars.php +0 -144
- data/lib/wp/wp-includes/version.php +0 -35
- data/lib/wp/wp-includes/widgets.php +0 -1514
- data/lib/wp/wp-includes/wlwmanifest.xml +0 -43
- data/lib/wp/wp-includes/wp-db.php +0 -2190
- data/lib/wp/wp-includes/wp-diff.php +0 -523
- data/lib/wp/wp-links-opml.php +0 -80
- data/lib/wp/wp-load.php +0 -73
- data/lib/wp/wp-login.php +0 -952
- data/lib/wp/wp-mail.php +0 -260
- data/lib/wp/wp-settings.php +0 -374
- data/lib/wp/wp-signup.php +0 -749
- data/lib/wp/wp-trackback.php +0 -127
- data/lib/wp/xmlrpc.php +0 -101
@@ -1,2180 +0,0 @@
|
|
1
|
-
<?php
|
2
|
-
/**
|
3
|
-
* WordPress Rewrite API
|
4
|
-
*
|
5
|
-
* @package WordPress
|
6
|
-
* @subpackage Rewrite
|
7
|
-
*/
|
8
|
-
|
9
|
-
/**
|
10
|
-
* Add a straight rewrite rule.
|
11
|
-
*
|
12
|
-
* @see WP_Rewrite::add_rule() for long description.
|
13
|
-
* @since 2.1.0
|
14
|
-
*
|
15
|
-
* @param string $regex Regular Expression to match request against.
|
16
|
-
* @param string $redirect Page to redirect to.
|
17
|
-
* @param string $after Optional, default is 'bottom'. Where to add rule, can also be 'top'.
|
18
|
-
*/
|
19
|
-
function add_rewrite_rule($regex, $redirect, $after = 'bottom') {
|
20
|
-
global $wp_rewrite;
|
21
|
-
$wp_rewrite->add_rule($regex, $redirect, $after);
|
22
|
-
}
|
23
|
-
|
24
|
-
/**
|
25
|
-
* Add a new rewrite tag (like %postname%).
|
26
|
-
*
|
27
|
-
* The $query parameter is optional. If it is omitted you must ensure that
|
28
|
-
* you call this on, or before, the 'init' hook. This is because $query defaults
|
29
|
-
* to "$tag=", and for this to work a new query var has to be added.
|
30
|
-
*
|
31
|
-
* @see WP_Rewrite::add_rewrite_tag()
|
32
|
-
* @since 2.1.0
|
33
|
-
*
|
34
|
-
* @param string $tag Name of the new rewrite tag.
|
35
|
-
* @param string $regex Regular expression to substitute the tag for in rewrite rules.
|
36
|
-
* @param string $query String to append to the rewritten query. Must end in '='. Optional.
|
37
|
-
*/
|
38
|
-
function add_rewrite_tag( $tag, $regex, $query = '' ) {
|
39
|
-
// validate the tag's name
|
40
|
-
if ( strlen( $tag ) < 3 || $tag[0] != '%' || $tag[ strlen($tag) - 1 ] != '%' )
|
41
|
-
return;
|
42
|
-
|
43
|
-
global $wp_rewrite, $wp;
|
44
|
-
|
45
|
-
if ( empty( $query ) ) {
|
46
|
-
$qv = trim( $tag, '%' );
|
47
|
-
$wp->add_query_var( $qv );
|
48
|
-
$query = $qv . '=';
|
49
|
-
}
|
50
|
-
|
51
|
-
$wp_rewrite->add_rewrite_tag( $tag, $regex, $query );
|
52
|
-
}
|
53
|
-
|
54
|
-
/**
|
55
|
-
* Add permalink structure.
|
56
|
-
*
|
57
|
-
* @see WP_Rewrite::add_permastruct()
|
58
|
-
* @since 3.0.0
|
59
|
-
*
|
60
|
-
* @param string $name Name for permalink structure.
|
61
|
-
* @param string $struct Permalink structure.
|
62
|
-
* @param array $args Optional configuration for building the rules from the permalink structure,
|
63
|
-
* see {@link WP_Rewrite::add_permastruct()} for full details.
|
64
|
-
*/
|
65
|
-
function add_permastruct( $name, $struct, $args = array() ) {
|
66
|
-
global $wp_rewrite;
|
67
|
-
|
68
|
-
// backwards compatibility for the old parameters: $with_front and $ep_mask
|
69
|
-
if ( ! is_array( $args ) )
|
70
|
-
$args = array( 'with_front' => $args );
|
71
|
-
if ( func_num_args() == 4 )
|
72
|
-
$args['ep_mask'] = func_get_arg( 3 );
|
73
|
-
|
74
|
-
return $wp_rewrite->add_permastruct( $name, $struct, $args );
|
75
|
-
}
|
76
|
-
|
77
|
-
/**
|
78
|
-
* Add a new feed type like /atom1/.
|
79
|
-
*
|
80
|
-
* @since 2.1.0
|
81
|
-
*
|
82
|
-
* @param string $feedname
|
83
|
-
* @param callback $function Callback to run on feed display.
|
84
|
-
* @return string Feed action name.
|
85
|
-
*/
|
86
|
-
function add_feed($feedname, $function) {
|
87
|
-
global $wp_rewrite;
|
88
|
-
if ( ! in_array($feedname, $wp_rewrite->feeds) ) //override the file if it is
|
89
|
-
$wp_rewrite->feeds[] = $feedname;
|
90
|
-
$hook = 'do_feed_' . $feedname;
|
91
|
-
// Remove default function hook
|
92
|
-
remove_action($hook, $hook);
|
93
|
-
add_action($hook, $function, 10, 1);
|
94
|
-
return $hook;
|
95
|
-
}
|
96
|
-
|
97
|
-
/**
|
98
|
-
* Remove rewrite rules and then recreate rewrite rules.
|
99
|
-
*
|
100
|
-
* @see WP_Rewrite::flush_rules()
|
101
|
-
* @since 3.0.0
|
102
|
-
*
|
103
|
-
* @param bool $hard Whether to update .htaccess (hard flush) or just update
|
104
|
-
* rewrite_rules transient (soft flush). Default is true (hard).
|
105
|
-
*/
|
106
|
-
function flush_rewrite_rules( $hard = true ) {
|
107
|
-
global $wp_rewrite;
|
108
|
-
$wp_rewrite->flush_rules( $hard );
|
109
|
-
}
|
110
|
-
|
111
|
-
/**
|
112
|
-
* Endpoint Mask for default, which is nothing.
|
113
|
-
*
|
114
|
-
* @since 2.1.0
|
115
|
-
*/
|
116
|
-
define('EP_NONE', 0);
|
117
|
-
|
118
|
-
/**
|
119
|
-
* Endpoint Mask for Permalink.
|
120
|
-
*
|
121
|
-
* @since 2.1.0
|
122
|
-
*/
|
123
|
-
define('EP_PERMALINK', 1);
|
124
|
-
|
125
|
-
/**
|
126
|
-
* Endpoint Mask for Attachment.
|
127
|
-
*
|
128
|
-
* @since 2.1.0
|
129
|
-
*/
|
130
|
-
define('EP_ATTACHMENT', 2);
|
131
|
-
|
132
|
-
/**
|
133
|
-
* Endpoint Mask for date.
|
134
|
-
*
|
135
|
-
* @since 2.1.0
|
136
|
-
*/
|
137
|
-
define('EP_DATE', 4);
|
138
|
-
|
139
|
-
/**
|
140
|
-
* Endpoint Mask for year
|
141
|
-
*
|
142
|
-
* @since 2.1.0
|
143
|
-
*/
|
144
|
-
define('EP_YEAR', 8);
|
145
|
-
|
146
|
-
/**
|
147
|
-
* Endpoint Mask for month.
|
148
|
-
*
|
149
|
-
* @since 2.1.0
|
150
|
-
*/
|
151
|
-
define('EP_MONTH', 16);
|
152
|
-
|
153
|
-
/**
|
154
|
-
* Endpoint Mask for day.
|
155
|
-
*
|
156
|
-
* @since 2.1.0
|
157
|
-
*/
|
158
|
-
define('EP_DAY', 32);
|
159
|
-
|
160
|
-
/**
|
161
|
-
* Endpoint Mask for root.
|
162
|
-
*
|
163
|
-
* @since 2.1.0
|
164
|
-
*/
|
165
|
-
define('EP_ROOT', 64);
|
166
|
-
|
167
|
-
/**
|
168
|
-
* Endpoint Mask for comments.
|
169
|
-
*
|
170
|
-
* @since 2.1.0
|
171
|
-
*/
|
172
|
-
define('EP_COMMENTS', 128);
|
173
|
-
|
174
|
-
/**
|
175
|
-
* Endpoint Mask for searches.
|
176
|
-
*
|
177
|
-
* @since 2.1.0
|
178
|
-
*/
|
179
|
-
define('EP_SEARCH', 256);
|
180
|
-
|
181
|
-
/**
|
182
|
-
* Endpoint Mask for categories.
|
183
|
-
*
|
184
|
-
* @since 2.1.0
|
185
|
-
*/
|
186
|
-
define('EP_CATEGORIES', 512);
|
187
|
-
|
188
|
-
/**
|
189
|
-
* Endpoint Mask for tags.
|
190
|
-
*
|
191
|
-
* @since 2.3.0
|
192
|
-
*/
|
193
|
-
define('EP_TAGS', 1024);
|
194
|
-
|
195
|
-
/**
|
196
|
-
* Endpoint Mask for authors.
|
197
|
-
*
|
198
|
-
* @since 2.1.0
|
199
|
-
*/
|
200
|
-
define('EP_AUTHORS', 2048);
|
201
|
-
|
202
|
-
/**
|
203
|
-
* Endpoint Mask for pages.
|
204
|
-
*
|
205
|
-
* @since 2.1.0
|
206
|
-
*/
|
207
|
-
define('EP_PAGES', 4096);
|
208
|
-
|
209
|
-
/**
|
210
|
-
* Endpoint Mask for all archive views.
|
211
|
-
*
|
212
|
-
* @since 3.7.0
|
213
|
-
*/
|
214
|
-
define( 'EP_ALL_ARCHIVES', EP_DATE | EP_YEAR | EP_MONTH | EP_DAY | EP_CATEGORIES | EP_TAGS | EP_AUTHORS );
|
215
|
-
|
216
|
-
/**
|
217
|
-
* Endpoint Mask for everything.
|
218
|
-
*
|
219
|
-
* @since 2.1.0
|
220
|
-
*/
|
221
|
-
define( 'EP_ALL', EP_PERMALINK | EP_ATTACHMENT | EP_ROOT | EP_COMMENTS | EP_SEARCH | EP_PAGES | EP_ALL_ARCHIVES );
|
222
|
-
|
223
|
-
/**
|
224
|
-
* Add an endpoint, like /trackback/.
|
225
|
-
*
|
226
|
-
* Adding an endpoint creates extra rewrite rules for each of the matching
|
227
|
-
* places specified by the provided bitmask. For example:
|
228
|
-
*
|
229
|
-
* <code>
|
230
|
-
* add_rewrite_endpoint( 'json', EP_PERMALINK | EP_PAGES );
|
231
|
-
* </code>
|
232
|
-
*
|
233
|
-
* will add a new rewrite rule ending with "json(/(.*))?/?$" for every permastruct
|
234
|
-
* that describes a permalink (post) or page. This is rewritten to "json=$match"
|
235
|
-
* where $match is the part of the URL matched by the endpoint regex (e.g. "foo" in
|
236
|
-
* "<permalink>/json/foo/").
|
237
|
-
*
|
238
|
-
* A new query var with the same name as the endpoint will also be created.
|
239
|
-
*
|
240
|
-
* When specifying $places ensure that you are using the EP_* constants (or a
|
241
|
-
* combination of them using the bitwise OR operator) as their values are not
|
242
|
-
* guaranteed to remain static (especially EP_ALL).
|
243
|
-
*
|
244
|
-
* Be sure to flush the rewrite rules - flush_rewrite_rules() - when your plugin gets
|
245
|
-
* activated and deactivated.
|
246
|
-
*
|
247
|
-
* @since 2.1.0
|
248
|
-
* @see WP_Rewrite::add_endpoint()
|
249
|
-
* @global object $wp_rewrite
|
250
|
-
*
|
251
|
-
* @param string $name Name of the endpoint.
|
252
|
-
* @param int $places Endpoint mask describing the places the endpoint should be added.
|
253
|
-
* @param string $query_var Name of the corresponding query variable. Defaults to $name.
|
254
|
-
*/
|
255
|
-
function add_rewrite_endpoint( $name, $places, $query_var = null ) {
|
256
|
-
global $wp_rewrite;
|
257
|
-
$wp_rewrite->add_endpoint( $name, $places, $query_var );
|
258
|
-
}
|
259
|
-
|
260
|
-
/**
|
261
|
-
* Filter the URL base for taxonomies.
|
262
|
-
*
|
263
|
-
* To remove any manually prepended /index.php/.
|
264
|
-
*
|
265
|
-
* @access private
|
266
|
-
* @since 2.6.0
|
267
|
-
*
|
268
|
-
* @param string $base The taxonomy base that we're going to filter
|
269
|
-
* @return string
|
270
|
-
*/
|
271
|
-
function _wp_filter_taxonomy_base( $base ) {
|
272
|
-
if ( !empty( $base ) ) {
|
273
|
-
$base = preg_replace( '|^/index\.php/|', '', $base );
|
274
|
-
$base = trim( $base, '/' );
|
275
|
-
}
|
276
|
-
return $base;
|
277
|
-
}
|
278
|
-
|
279
|
-
/**
|
280
|
-
* Examine a url and try to determine the post ID it represents.
|
281
|
-
*
|
282
|
-
* Checks are supposedly from the hosted site blog.
|
283
|
-
*
|
284
|
-
* @since 1.0.0
|
285
|
-
*
|
286
|
-
* @param string $url Permalink to check.
|
287
|
-
* @return int Post ID, or 0 on failure.
|
288
|
-
*/
|
289
|
-
function url_to_postid($url) {
|
290
|
-
global $wp_rewrite;
|
291
|
-
|
292
|
-
/**
|
293
|
-
* Filter the URL to derive the post ID from.
|
294
|
-
*
|
295
|
-
* @since 2.2.0
|
296
|
-
*
|
297
|
-
* @param string $url The URL to derive the post ID from.
|
298
|
-
*/
|
299
|
-
$url = apply_filters( 'url_to_postid', $url );
|
300
|
-
|
301
|
-
// First, check to see if there is a 'p=N' or 'page_id=N' to match against
|
302
|
-
if ( preg_match('#[?&](p|page_id|attachment_id)=(\d+)#', $url, $values) ) {
|
303
|
-
$id = absint($values[2]);
|
304
|
-
if ( $id )
|
305
|
-
return $id;
|
306
|
-
}
|
307
|
-
|
308
|
-
// Check to see if we are using rewrite rules
|
309
|
-
$rewrite = $wp_rewrite->wp_rewrite_rules();
|
310
|
-
|
311
|
-
// Not using rewrite rules, and 'p=N' and 'page_id=N' methods failed, so we're out of options
|
312
|
-
if ( empty($rewrite) )
|
313
|
-
return 0;
|
314
|
-
|
315
|
-
// Get rid of the #anchor
|
316
|
-
$url_split = explode('#', $url);
|
317
|
-
$url = $url_split[0];
|
318
|
-
|
319
|
-
// Get rid of URL ?query=string
|
320
|
-
$url_split = explode('?', $url);
|
321
|
-
$url = $url_split[0];
|
322
|
-
|
323
|
-
// Add 'www.' if it is absent and should be there
|
324
|
-
if ( false !== strpos(home_url(), '://www.') && false === strpos($url, '://www.') )
|
325
|
-
$url = str_replace('://', '://www.', $url);
|
326
|
-
|
327
|
-
// Strip 'www.' if it is present and shouldn't be
|
328
|
-
if ( false === strpos(home_url(), '://www.') )
|
329
|
-
$url = str_replace('://www.', '://', $url);
|
330
|
-
|
331
|
-
// Strip 'index.php/' if we're not using path info permalinks
|
332
|
-
if ( !$wp_rewrite->using_index_permalinks() )
|
333
|
-
$url = str_replace( $wp_rewrite->index . '/', '', $url );
|
334
|
-
|
335
|
-
if ( false !== strpos( trailingslashit( $url ), home_url( '/' ) ) ) {
|
336
|
-
// Chop off http://domain.com/[path]
|
337
|
-
$url = str_replace(home_url(), '', $url);
|
338
|
-
} else {
|
339
|
-
// Chop off /path/to/blog
|
340
|
-
$home_path = parse_url( home_url( '/' ) );
|
341
|
-
$home_path = isset( $home_path['path'] ) ? $home_path['path'] : '' ;
|
342
|
-
$url = preg_replace( sprintf( '#^%s#', preg_quote( $home_path ) ), '', trailingslashit( $url ) );
|
343
|
-
}
|
344
|
-
|
345
|
-
// Trim leading and lagging slashes
|
346
|
-
$url = trim($url, '/');
|
347
|
-
|
348
|
-
$request = $url;
|
349
|
-
$post_type_query_vars = array();
|
350
|
-
|
351
|
-
foreach ( get_post_types( array() , 'objects' ) as $post_type => $t ) {
|
352
|
-
if ( ! empty( $t->query_var ) )
|
353
|
-
$post_type_query_vars[ $t->query_var ] = $post_type;
|
354
|
-
}
|
355
|
-
|
356
|
-
// Look for matches.
|
357
|
-
$request_match = $request;
|
358
|
-
foreach ( (array)$rewrite as $match => $query) {
|
359
|
-
|
360
|
-
// If the requesting file is the anchor of the match, prepend it
|
361
|
-
// to the path info.
|
362
|
-
if ( !empty($url) && ($url != $request) && (strpos($match, $url) === 0) )
|
363
|
-
$request_match = $url . '/' . $request;
|
364
|
-
|
365
|
-
if ( preg_match("#^$match#", $request_match, $matches) ) {
|
366
|
-
|
367
|
-
if ( $wp_rewrite->use_verbose_page_rules && preg_match( '/pagename=\$matches\[([0-9]+)\]/', $query, $varmatch ) ) {
|
368
|
-
// this is a verbose page match, lets check to be sure about it
|
369
|
-
if ( ! get_page_by_path( $matches[ $varmatch[1] ] ) )
|
370
|
-
continue;
|
371
|
-
}
|
372
|
-
|
373
|
-
// Got a match.
|
374
|
-
// Trim the query of everything up to the '?'.
|
375
|
-
$query = preg_replace("!^.+\?!", '', $query);
|
376
|
-
|
377
|
-
// Substitute the substring matches into the query.
|
378
|
-
$query = addslashes(WP_MatchesMapRegex::apply($query, $matches));
|
379
|
-
|
380
|
-
// Filter out non-public query vars
|
381
|
-
global $wp;
|
382
|
-
parse_str( $query, $query_vars );
|
383
|
-
$query = array();
|
384
|
-
foreach ( (array) $query_vars as $key => $value ) {
|
385
|
-
if ( in_array( $key, $wp->public_query_vars ) ){
|
386
|
-
$query[$key] = $value;
|
387
|
-
if ( isset( $post_type_query_vars[$key] ) ) {
|
388
|
-
$query['post_type'] = $post_type_query_vars[$key];
|
389
|
-
$query['name'] = $value;
|
390
|
-
}
|
391
|
-
}
|
392
|
-
}
|
393
|
-
|
394
|
-
// Do the query
|
395
|
-
$query = new WP_Query( $query );
|
396
|
-
if ( ! empty( $query->posts ) && $query->is_singular )
|
397
|
-
return $query->post->ID;
|
398
|
-
else
|
399
|
-
return 0;
|
400
|
-
}
|
401
|
-
}
|
402
|
-
return 0;
|
403
|
-
}
|
404
|
-
|
405
|
-
/**
|
406
|
-
* WordPress Rewrite Component.
|
407
|
-
*
|
408
|
-
* The WordPress Rewrite class writes the rewrite module rules to the .htaccess
|
409
|
-
* file. It also handles parsing the request to get the correct setup for the
|
410
|
-
* WordPress Query class.
|
411
|
-
*
|
412
|
-
* The Rewrite along with WP class function as a front controller for WordPress.
|
413
|
-
* You can add rules to trigger your page view and processing using this
|
414
|
-
* component. The full functionality of a front controller does not exist,
|
415
|
-
* meaning you can't define how the template files load based on the rewrite
|
416
|
-
* rules.
|
417
|
-
*
|
418
|
-
* @since 1.5.0
|
419
|
-
*/
|
420
|
-
class WP_Rewrite {
|
421
|
-
/**
|
422
|
-
* Permalink structure for posts.
|
423
|
-
*
|
424
|
-
* @since 1.5.0
|
425
|
-
* @access private
|
426
|
-
* @var string
|
427
|
-
*/
|
428
|
-
var $permalink_structure;
|
429
|
-
|
430
|
-
/**
|
431
|
-
* Whether to add trailing slashes.
|
432
|
-
*
|
433
|
-
* @since 2.2.0
|
434
|
-
* @access private
|
435
|
-
* @var bool
|
436
|
-
*/
|
437
|
-
var $use_trailing_slashes;
|
438
|
-
|
439
|
-
/**
|
440
|
-
* Base for the author permalink structure (example.com/$author_base/authorname).
|
441
|
-
*
|
442
|
-
* @since 1.5.0
|
443
|
-
* @access private
|
444
|
-
* @var string
|
445
|
-
*/
|
446
|
-
var $author_base = 'author';
|
447
|
-
|
448
|
-
/**
|
449
|
-
* Permalink structure for author archives.
|
450
|
-
*
|
451
|
-
* @since 1.5.0
|
452
|
-
* @access private
|
453
|
-
* @var string
|
454
|
-
*/
|
455
|
-
var $author_structure;
|
456
|
-
|
457
|
-
/**
|
458
|
-
* Permalink structure for date archives.
|
459
|
-
*
|
460
|
-
* @since 1.5.0
|
461
|
-
* @access private
|
462
|
-
* @var string
|
463
|
-
*/
|
464
|
-
var $date_structure;
|
465
|
-
|
466
|
-
/**
|
467
|
-
* Permalink structure for pages.
|
468
|
-
*
|
469
|
-
* @since 1.5.0
|
470
|
-
* @access private
|
471
|
-
* @var string
|
472
|
-
*/
|
473
|
-
var $page_structure;
|
474
|
-
|
475
|
-
/**
|
476
|
-
* Base of the search permalink structure (example.com/$search_base/query).
|
477
|
-
*
|
478
|
-
* @since 1.5.0
|
479
|
-
* @access private
|
480
|
-
* @var string
|
481
|
-
*/
|
482
|
-
var $search_base = 'search';
|
483
|
-
|
484
|
-
/**
|
485
|
-
* Permalink structure for searches.
|
486
|
-
*
|
487
|
-
* @since 1.5.0
|
488
|
-
* @access private
|
489
|
-
* @var string
|
490
|
-
*/
|
491
|
-
var $search_structure;
|
492
|
-
|
493
|
-
/**
|
494
|
-
* Comments permalink base.
|
495
|
-
*
|
496
|
-
* @since 1.5.0
|
497
|
-
* @access private
|
498
|
-
* @var string
|
499
|
-
*/
|
500
|
-
var $comments_base = 'comments';
|
501
|
-
|
502
|
-
/**
|
503
|
-
* Pagination permalink base.
|
504
|
-
*
|
505
|
-
* @since 3.1.0
|
506
|
-
* @access private
|
507
|
-
* @var string
|
508
|
-
*/
|
509
|
-
var $pagination_base = 'page';
|
510
|
-
|
511
|
-
/**
|
512
|
-
* Feed permalink base.
|
513
|
-
*
|
514
|
-
* @since 1.5.0
|
515
|
-
* @access private
|
516
|
-
* @var string
|
517
|
-
*/
|
518
|
-
var $feed_base = 'feed';
|
519
|
-
|
520
|
-
/**
|
521
|
-
* Comments feed permalink structure.
|
522
|
-
*
|
523
|
-
* @since 1.5.0
|
524
|
-
* @access private
|
525
|
-
* @var string
|
526
|
-
*/
|
527
|
-
var $comments_feed_structure;
|
528
|
-
|
529
|
-
/**
|
530
|
-
* Feed request permalink structure.
|
531
|
-
*
|
532
|
-
* @since 1.5.0
|
533
|
-
* @access private
|
534
|
-
* @var string
|
535
|
-
*/
|
536
|
-
var $feed_structure;
|
537
|
-
|
538
|
-
/**
|
539
|
-
* The static portion of the post permalink structure.
|
540
|
-
*
|
541
|
-
* If the permalink structure is "/archive/%post_id%" then the front
|
542
|
-
* is "/archive/". If the permalink structure is "/%year%/%postname%/"
|
543
|
-
* then the front is "/".
|
544
|
-
*
|
545
|
-
* @see WP_Rewrite::init()
|
546
|
-
* @since 1.5.0
|
547
|
-
* @access private
|
548
|
-
* @var string
|
549
|
-
*/
|
550
|
-
var $front;
|
551
|
-
|
552
|
-
/**
|
553
|
-
* The prefix for all permalink structures.
|
554
|
-
*
|
555
|
-
* If PATHINFO/index permalinks are in use then the root is the value of
|
556
|
-
* {@link WP_Rewrite::$index} with a trailing slash appended. Otherwise
|
557
|
-
* the root will be empty.
|
558
|
-
*
|
559
|
-
* @see WP_Rewrite::init()
|
560
|
-
* @see WP_Rewrite::using_index_permalinks()
|
561
|
-
* @since 1.5.0
|
562
|
-
* @access private
|
563
|
-
* @var string
|
564
|
-
*/
|
565
|
-
var $root = '';
|
566
|
-
|
567
|
-
/**
|
568
|
-
* The name of the index file which is the entry point to all requests.
|
569
|
-
*
|
570
|
-
* @since 1.5.0
|
571
|
-
* @access public
|
572
|
-
* @var string
|
573
|
-
*/
|
574
|
-
public $index = 'index.php';
|
575
|
-
|
576
|
-
/**
|
577
|
-
* Variable name to use for regex matches in the rewritten query.
|
578
|
-
*
|
579
|
-
* @since 1.5.0
|
580
|
-
* @access private
|
581
|
-
* @var string
|
582
|
-
*/
|
583
|
-
var $matches = '';
|
584
|
-
|
585
|
-
/**
|
586
|
-
* Rewrite rules to match against the request to find the redirect or query.
|
587
|
-
*
|
588
|
-
* @since 1.5.0
|
589
|
-
* @access private
|
590
|
-
* @var array
|
591
|
-
*/
|
592
|
-
var $rules;
|
593
|
-
|
594
|
-
/**
|
595
|
-
* Additional rules added external to the rewrite class.
|
596
|
-
*
|
597
|
-
* Those not generated by the class, see add_rewrite_rule().
|
598
|
-
*
|
599
|
-
* @since 2.1.0
|
600
|
-
* @access private
|
601
|
-
* @var array
|
602
|
-
*/
|
603
|
-
var $extra_rules = array();
|
604
|
-
|
605
|
-
/**
|
606
|
-
* Additional rules that belong at the beginning to match first.
|
607
|
-
*
|
608
|
-
* Those not generated by the class, see add_rewrite_rule().
|
609
|
-
*
|
610
|
-
* @since 2.3.0
|
611
|
-
* @access private
|
612
|
-
* @var array
|
613
|
-
*/
|
614
|
-
var $extra_rules_top = array();
|
615
|
-
|
616
|
-
/**
|
617
|
-
* Rules that don't redirect to WordPress' index.php.
|
618
|
-
*
|
619
|
-
* These rules are written to the mod_rewrite portion of the .htaccess,
|
620
|
-
* and are added by {@link add_external_rule()}.
|
621
|
-
*
|
622
|
-
* @since 2.1.0
|
623
|
-
* @access private
|
624
|
-
* @var array
|
625
|
-
*/
|
626
|
-
var $non_wp_rules = array();
|
627
|
-
|
628
|
-
/**
|
629
|
-
* Extra permalink structures, e.g. categories, added by {@link add_permastruct()}.
|
630
|
-
*
|
631
|
-
* @since 2.1.0
|
632
|
-
* @access private
|
633
|
-
* @var array
|
634
|
-
*/
|
635
|
-
var $extra_permastructs = array();
|
636
|
-
|
637
|
-
/**
|
638
|
-
* Endpoints (like /trackback/) added by {@link add_rewrite_endpoint()}.
|
639
|
-
*
|
640
|
-
* @since 2.1.0
|
641
|
-
* @access private
|
642
|
-
* @var array
|
643
|
-
*/
|
644
|
-
var $endpoints;
|
645
|
-
|
646
|
-
/**
|
647
|
-
* Whether to write every mod_rewrite rule for WordPress into the .htaccess file.
|
648
|
-
*
|
649
|
-
* This is off by default, turning it on might print a lot of rewrite rules
|
650
|
-
* to the .htaccess file.
|
651
|
-
*
|
652
|
-
* @see WP_Rewrite::mod_rewrite_rules()
|
653
|
-
* @since 2.0.0
|
654
|
-
* @access public
|
655
|
-
* @var bool
|
656
|
-
*/
|
657
|
-
public $use_verbose_rules = false;
|
658
|
-
|
659
|
-
/**
|
660
|
-
* Could post permalinks be confused with those of pages?
|
661
|
-
*
|
662
|
-
* If the first rewrite tag in the post permalink structure is one that could
|
663
|
-
* also match a page name (e.g. %postname% or %author%) then this flag is
|
664
|
-
* set to true. Prior to WordPress 3.3 this flag indicated that every page
|
665
|
-
* would have a set of rules added to the top of the rewrite rules array.
|
666
|
-
* Now it tells {@link WP::parse_request()} to check if a URL matching the
|
667
|
-
* page permastruct is actually a page before accepting it.
|
668
|
-
*
|
669
|
-
* @link https://core.trac.wordpress.org/ticket/16687
|
670
|
-
* @see WP_Rewrite::init()
|
671
|
-
* @since 2.5.0
|
672
|
-
* @access public
|
673
|
-
* @var bool
|
674
|
-
*/
|
675
|
-
public $use_verbose_page_rules = true;
|
676
|
-
|
677
|
-
/**
|
678
|
-
* Rewrite tags that can be used in permalink structures.
|
679
|
-
*
|
680
|
-
* These are translated into the regular expressions stored in
|
681
|
-
* {@link WP_Rewrite::$rewritereplace} and are rewritten to the
|
682
|
-
* query variables listed in {@link WP_Rewrite::$queryreplace}.
|
683
|
-
*
|
684
|
-
* Additional tags can be added with {@link add_rewrite_tag()}.
|
685
|
-
*
|
686
|
-
* @since 1.5.0
|
687
|
-
* @access private
|
688
|
-
* @var array
|
689
|
-
*/
|
690
|
-
var $rewritecode = array(
|
691
|
-
'%year%',
|
692
|
-
'%monthnum%',
|
693
|
-
'%day%',
|
694
|
-
'%hour%',
|
695
|
-
'%minute%',
|
696
|
-
'%second%',
|
697
|
-
'%postname%',
|
698
|
-
'%post_id%',
|
699
|
-
'%author%',
|
700
|
-
'%pagename%',
|
701
|
-
'%search%'
|
702
|
-
);
|
703
|
-
|
704
|
-
/**
|
705
|
-
* Regular expressions to be substituted into rewrite rules in place
|
706
|
-
* of rewrite tags, see {@link WP_Rewrite::$rewritecode}.
|
707
|
-
*
|
708
|
-
* @since 1.5.0
|
709
|
-
* @access private
|
710
|
-
* @var array
|
711
|
-
*/
|
712
|
-
var $rewritereplace = array(
|
713
|
-
'([0-9]{4})',
|
714
|
-
'([0-9]{1,2})',
|
715
|
-
'([0-9]{1,2})',
|
716
|
-
'([0-9]{1,2})',
|
717
|
-
'([0-9]{1,2})',
|
718
|
-
'([0-9]{1,2})',
|
719
|
-
'([^/]+)',
|
720
|
-
'([0-9]+)',
|
721
|
-
'([^/]+)',
|
722
|
-
'([^/]+?)',
|
723
|
-
'(.+)'
|
724
|
-
);
|
725
|
-
|
726
|
-
/**
|
727
|
-
* Query variables that rewrite tags map to, see {@link WP_Rewrite::$rewritecode}.
|
728
|
-
*
|
729
|
-
* @since 1.5.0
|
730
|
-
* @access private
|
731
|
-
* @var array
|
732
|
-
*/
|
733
|
-
var $queryreplace = array(
|
734
|
-
'year=',
|
735
|
-
'monthnum=',
|
736
|
-
'day=',
|
737
|
-
'hour=',
|
738
|
-
'minute=',
|
739
|
-
'second=',
|
740
|
-
'name=',
|
741
|
-
'p=',
|
742
|
-
'author_name=',
|
743
|
-
'pagename=',
|
744
|
-
's='
|
745
|
-
);
|
746
|
-
|
747
|
-
/**
|
748
|
-
* Supported default feeds.
|
749
|
-
*
|
750
|
-
* @since 1.5.0
|
751
|
-
* @access private
|
752
|
-
* @var array
|
753
|
-
*/
|
754
|
-
var $feeds = array( 'feed', 'rdf', 'rss', 'rss2', 'atom' );
|
755
|
-
|
756
|
-
/**
|
757
|
-
* Whether permalinks are being used.
|
758
|
-
*
|
759
|
-
* This can be either rewrite module or permalink in the HTTP query string.
|
760
|
-
*
|
761
|
-
* @since 1.5.0
|
762
|
-
* @access public
|
763
|
-
*
|
764
|
-
* @return bool True, if permalinks are enabled.
|
765
|
-
*/
|
766
|
-
public function using_permalinks() {
|
767
|
-
return ! empty($this->permalink_structure);
|
768
|
-
}
|
769
|
-
|
770
|
-
/**
|
771
|
-
* Whether permalinks are being used and rewrite module is not enabled.
|
772
|
-
*
|
773
|
-
* Means that permalink links are enabled and index.php is in the URL.
|
774
|
-
*
|
775
|
-
* @since 1.5.0
|
776
|
-
* @access public
|
777
|
-
*
|
778
|
-
* @return bool
|
779
|
-
*/
|
780
|
-
public function using_index_permalinks() {
|
781
|
-
if ( empty($this->permalink_structure) )
|
782
|
-
return false;
|
783
|
-
|
784
|
-
// If the index is not in the permalink, we're using mod_rewrite.
|
785
|
-
if ( preg_match('#^/*' . $this->index . '#', $this->permalink_structure) )
|
786
|
-
return true;
|
787
|
-
|
788
|
-
return false;
|
789
|
-
}
|
790
|
-
|
791
|
-
/**
|
792
|
-
* Whether permalinks are being used and rewrite module is enabled.
|
793
|
-
*
|
794
|
-
* Using permalinks and index.php is not in the URL.
|
795
|
-
*
|
796
|
-
* @since 1.5.0
|
797
|
-
* @access public
|
798
|
-
*
|
799
|
-
* @return bool
|
800
|
-
*/
|
801
|
-
public function using_mod_rewrite_permalinks() {
|
802
|
-
if ( $this->using_permalinks() && ! $this->using_index_permalinks() )
|
803
|
-
return true;
|
804
|
-
else
|
805
|
-
return false;
|
806
|
-
}
|
807
|
-
|
808
|
-
/**
|
809
|
-
* Index for matches for usage in preg_*() functions.
|
810
|
-
*
|
811
|
-
* The format of the string is, with empty matches property value, '$NUM'.
|
812
|
-
* The 'NUM' will be replaced with the value in the $number parameter. With
|
813
|
-
* the matches property not empty, the value of the returned string will
|
814
|
-
* contain that value of the matches property. The format then will be
|
815
|
-
* '$MATCHES[NUM]', with MATCHES as the value in the property and NUM the
|
816
|
-
* value of the $number parameter.
|
817
|
-
*
|
818
|
-
* @since 1.5.0
|
819
|
-
* @access public
|
820
|
-
*
|
821
|
-
* @param int $number Index number.
|
822
|
-
* @return string
|
823
|
-
*/
|
824
|
-
public function preg_index($number) {
|
825
|
-
$match_prefix = '$';
|
826
|
-
$match_suffix = '';
|
827
|
-
|
828
|
-
if ( ! empty($this->matches) ) {
|
829
|
-
$match_prefix = '$' . $this->matches . '[';
|
830
|
-
$match_suffix = ']';
|
831
|
-
}
|
832
|
-
|
833
|
-
return "$match_prefix$number$match_suffix";
|
834
|
-
}
|
835
|
-
|
836
|
-
/**
|
837
|
-
* Retrieve all page and attachments for pages URIs.
|
838
|
-
*
|
839
|
-
* The attachments are for those that have pages as parents and will be
|
840
|
-
* retrieved.
|
841
|
-
*
|
842
|
-
* @since 2.5.0
|
843
|
-
* @access public
|
844
|
-
*
|
845
|
-
* @return array Array of page URIs as first element and attachment URIs as second element.
|
846
|
-
*/
|
847
|
-
public function page_uri_index() {
|
848
|
-
global $wpdb;
|
849
|
-
|
850
|
-
//get pages in order of hierarchy, i.e. children after parents
|
851
|
-
$pages = $wpdb->get_results("SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE post_type = 'page' AND post_status != 'auto-draft'");
|
852
|
-
$posts = get_page_hierarchy( $pages );
|
853
|
-
|
854
|
-
// If we have no pages get out quick
|
855
|
-
if ( !$posts )
|
856
|
-
return array( array(), array() );
|
857
|
-
|
858
|
-
//now reverse it, because we need parents after children for rewrite rules to work properly
|
859
|
-
$posts = array_reverse($posts, true);
|
860
|
-
|
861
|
-
$page_uris = array();
|
862
|
-
$page_attachment_uris = array();
|
863
|
-
|
864
|
-
foreach ( $posts as $id => $post ) {
|
865
|
-
// URL => page name
|
866
|
-
$uri = get_page_uri($id);
|
867
|
-
$attachments = $wpdb->get_results( $wpdb->prepare( "SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE post_type = 'attachment' AND post_parent = %d", $id ));
|
868
|
-
if ( !empty($attachments) ) {
|
869
|
-
foreach ( $attachments as $attachment ) {
|
870
|
-
$attach_uri = get_page_uri($attachment->ID);
|
871
|
-
$page_attachment_uris[$attach_uri] = $attachment->ID;
|
872
|
-
}
|
873
|
-
}
|
874
|
-
|
875
|
-
$page_uris[$uri] = $id;
|
876
|
-
}
|
877
|
-
|
878
|
-
return array( $page_uris, $page_attachment_uris );
|
879
|
-
}
|
880
|
-
|
881
|
-
/**
|
882
|
-
* Retrieve all of the rewrite rules for pages.
|
883
|
-
*
|
884
|
-
* @since 1.5.0
|
885
|
-
* @access public
|
886
|
-
*
|
887
|
-
* @return array
|
888
|
-
*/
|
889
|
-
public function page_rewrite_rules() {
|
890
|
-
// the extra .? at the beginning prevents clashes with other regular expressions in the rules array
|
891
|
-
$this->add_rewrite_tag( '%pagename%', '(.?.+?)', 'pagename=' );
|
892
|
-
|
893
|
-
return $this->generate_rewrite_rules( $this->get_page_permastruct(), EP_PAGES, true, true, false, false );
|
894
|
-
}
|
895
|
-
|
896
|
-
/**
|
897
|
-
* Retrieve date permalink structure, with year, month, and day.
|
898
|
-
*
|
899
|
-
* The permalink structure for the date, if not set already depends on the
|
900
|
-
* permalink structure. It can be one of three formats. The first is year,
|
901
|
-
* month, day; the second is day, month, year; and the last format is month,
|
902
|
-
* day, year. These are matched against the permalink structure for which
|
903
|
-
* one is used. If none matches, then the default will be used, which is
|
904
|
-
* year, month, day.
|
905
|
-
*
|
906
|
-
* Prevents post ID and date permalinks from overlapping. In the case of
|
907
|
-
* post_id, the date permalink will be prepended with front permalink with
|
908
|
-
* 'date/' before the actual permalink to form the complete date permalink
|
909
|
-
* structure.
|
910
|
-
*
|
911
|
-
* @since 1.5.0
|
912
|
-
* @access public
|
913
|
-
*
|
914
|
-
* @return bool|string False on no permalink structure. Date permalink structure.
|
915
|
-
*/
|
916
|
-
public function get_date_permastruct() {
|
917
|
-
if ( isset($this->date_structure) )
|
918
|
-
return $this->date_structure;
|
919
|
-
|
920
|
-
if ( empty($this->permalink_structure) ) {
|
921
|
-
$this->date_structure = '';
|
922
|
-
return false;
|
923
|
-
}
|
924
|
-
|
925
|
-
// The date permalink must have year, month, and day separated by slashes.
|
926
|
-
$endians = array('%year%/%monthnum%/%day%', '%day%/%monthnum%/%year%', '%monthnum%/%day%/%year%');
|
927
|
-
|
928
|
-
$this->date_structure = '';
|
929
|
-
$date_endian = '';
|
930
|
-
|
931
|
-
foreach ( $endians as $endian ) {
|
932
|
-
if ( false !== strpos($this->permalink_structure, $endian) ) {
|
933
|
-
$date_endian= $endian;
|
934
|
-
break;
|
935
|
-
}
|
936
|
-
}
|
937
|
-
|
938
|
-
if ( empty($date_endian) )
|
939
|
-
$date_endian = '%year%/%monthnum%/%day%';
|
940
|
-
|
941
|
-
// Do not allow the date tags and %post_id% to overlap in the permalink
|
942
|
-
// structure. If they do, move the date tags to $front/date/.
|
943
|
-
$front = $this->front;
|
944
|
-
preg_match_all('/%.+?%/', $this->permalink_structure, $tokens);
|
945
|
-
$tok_index = 1;
|
946
|
-
foreach ( (array) $tokens[0] as $token) {
|
947
|
-
if ( '%post_id%' == $token && ($tok_index <= 3) ) {
|
948
|
-
$front = $front . 'date/';
|
949
|
-
break;
|
950
|
-
}
|
951
|
-
$tok_index++;
|
952
|
-
}
|
953
|
-
|
954
|
-
$this->date_structure = $front . $date_endian;
|
955
|
-
|
956
|
-
return $this->date_structure;
|
957
|
-
}
|
958
|
-
|
959
|
-
/**
|
960
|
-
* Retrieve the year permalink structure without month and day.
|
961
|
-
*
|
962
|
-
* Gets the date permalink structure and strips out the month and day
|
963
|
-
* permalink structures.
|
964
|
-
*
|
965
|
-
* @since 1.5.0
|
966
|
-
* @access public
|
967
|
-
*
|
968
|
-
* @return bool|string False on failure. Year structure on success.
|
969
|
-
*/
|
970
|
-
public function get_year_permastruct() {
|
971
|
-
$structure = $this->get_date_permastruct();
|
972
|
-
|
973
|
-
if ( empty($structure) )
|
974
|
-
return false;
|
975
|
-
|
976
|
-
$structure = str_replace('%monthnum%', '', $structure);
|
977
|
-
$structure = str_replace('%day%', '', $structure);
|
978
|
-
|
979
|
-
$structure = preg_replace('#/+#', '/', $structure);
|
980
|
-
|
981
|
-
return $structure;
|
982
|
-
}
|
983
|
-
|
984
|
-
/**
|
985
|
-
* Retrieve the month permalink structure without day and with year.
|
986
|
-
*
|
987
|
-
* Gets the date permalink structure and strips out the day permalink
|
988
|
-
* structures. Keeps the year permalink structure.
|
989
|
-
*
|
990
|
-
* @since 1.5.0
|
991
|
-
* @access public
|
992
|
-
*
|
993
|
-
* @return bool|string False on failure. Year/Month structure on success.
|
994
|
-
*/
|
995
|
-
public function get_month_permastruct() {
|
996
|
-
$structure = $this->get_date_permastruct();
|
997
|
-
|
998
|
-
if ( empty($structure) )
|
999
|
-
return false;
|
1000
|
-
|
1001
|
-
$structure = str_replace('%day%', '', $structure);
|
1002
|
-
|
1003
|
-
$structure = preg_replace('#/+#', '/', $structure);
|
1004
|
-
|
1005
|
-
return $structure;
|
1006
|
-
}
|
1007
|
-
|
1008
|
-
/**
|
1009
|
-
* Retrieve the day permalink structure with month and year.
|
1010
|
-
*
|
1011
|
-
* Keeps date permalink structure with all year, month, and day.
|
1012
|
-
*
|
1013
|
-
* @since 1.5.0
|
1014
|
-
* @access public
|
1015
|
-
*
|
1016
|
-
* @return bool|string False on failure. Year/Month/Day structure on success.
|
1017
|
-
*/
|
1018
|
-
public function get_day_permastruct() {
|
1019
|
-
return $this->get_date_permastruct();
|
1020
|
-
}
|
1021
|
-
|
1022
|
-
/**
|
1023
|
-
* Retrieve the permalink structure for categories.
|
1024
|
-
*
|
1025
|
-
* If the category_base property has no value, then the category structure
|
1026
|
-
* will have the front property value, followed by 'category', and finally
|
1027
|
-
* '%category%'. If it does, then the root property will be used, along with
|
1028
|
-
* the category_base property value.
|
1029
|
-
*
|
1030
|
-
* @since 1.5.0
|
1031
|
-
* @access public
|
1032
|
-
*
|
1033
|
-
* @return bool|string False on failure. Category permalink structure.
|
1034
|
-
*/
|
1035
|
-
public function get_category_permastruct() {
|
1036
|
-
return $this->get_extra_permastruct('category');
|
1037
|
-
}
|
1038
|
-
|
1039
|
-
/**
|
1040
|
-
* Retrieve the permalink structure for tags.
|
1041
|
-
*
|
1042
|
-
* If the tag_base property has no value, then the tag structure will have
|
1043
|
-
* the front property value, followed by 'tag', and finally '%tag%'. If it
|
1044
|
-
* does, then the root property will be used, along with the tag_base
|
1045
|
-
* property value.
|
1046
|
-
*
|
1047
|
-
* @since 2.3.0
|
1048
|
-
* @access public
|
1049
|
-
*
|
1050
|
-
* @return bool|string False on failure. Tag permalink structure.
|
1051
|
-
*/
|
1052
|
-
public function get_tag_permastruct() {
|
1053
|
-
return $this->get_extra_permastruct('post_tag');
|
1054
|
-
}
|
1055
|
-
|
1056
|
-
/**
|
1057
|
-
* Retrieve extra permalink structure by name.
|
1058
|
-
*
|
1059
|
-
* @since 2.5.0
|
1060
|
-
* @access public
|
1061
|
-
*
|
1062
|
-
* @param string $name Permalink structure name.
|
1063
|
-
* @return string|bool False if not found. Permalink structure string.
|
1064
|
-
*/
|
1065
|
-
public function get_extra_permastruct($name) {
|
1066
|
-
if ( empty($this->permalink_structure) )
|
1067
|
-
return false;
|
1068
|
-
|
1069
|
-
if ( isset($this->extra_permastructs[$name]) )
|
1070
|
-
return $this->extra_permastructs[$name]['struct'];
|
1071
|
-
|
1072
|
-
return false;
|
1073
|
-
}
|
1074
|
-
|
1075
|
-
/**
|
1076
|
-
* Retrieve the author permalink structure.
|
1077
|
-
*
|
1078
|
-
* The permalink structure is front property, author base, and finally
|
1079
|
-
* '/%author%'. Will set the author_structure property and then return it
|
1080
|
-
* without attempting to set the value again.
|
1081
|
-
*
|
1082
|
-
* @since 1.5.0
|
1083
|
-
* @access public
|
1084
|
-
*
|
1085
|
-
* @return string|bool False if not found. Permalink structure string.
|
1086
|
-
*/
|
1087
|
-
public function get_author_permastruct() {
|
1088
|
-
if ( isset($this->author_structure) )
|
1089
|
-
return $this->author_structure;
|
1090
|
-
|
1091
|
-
if ( empty($this->permalink_structure) ) {
|
1092
|
-
$this->author_structure = '';
|
1093
|
-
return false;
|
1094
|
-
}
|
1095
|
-
|
1096
|
-
$this->author_structure = $this->front . $this->author_base . '/%author%';
|
1097
|
-
|
1098
|
-
return $this->author_structure;
|
1099
|
-
}
|
1100
|
-
|
1101
|
-
/**
|
1102
|
-
* Retrieve the search permalink structure.
|
1103
|
-
*
|
1104
|
-
* The permalink structure is root property, search base, and finally
|
1105
|
-
* '/%search%'. Will set the search_structure property and then return it
|
1106
|
-
* without attempting to set the value again.
|
1107
|
-
*
|
1108
|
-
* @since 1.5.0
|
1109
|
-
* @access public
|
1110
|
-
*
|
1111
|
-
* @return string|bool False if not found. Permalink structure string.
|
1112
|
-
*/
|
1113
|
-
public function get_search_permastruct() {
|
1114
|
-
if ( isset($this->search_structure) )
|
1115
|
-
return $this->search_structure;
|
1116
|
-
|
1117
|
-
if ( empty($this->permalink_structure) ) {
|
1118
|
-
$this->search_structure = '';
|
1119
|
-
return false;
|
1120
|
-
}
|
1121
|
-
|
1122
|
-
$this->search_structure = $this->root . $this->search_base . '/%search%';
|
1123
|
-
|
1124
|
-
return $this->search_structure;
|
1125
|
-
}
|
1126
|
-
|
1127
|
-
/**
|
1128
|
-
* Retrieve the page permalink structure.
|
1129
|
-
*
|
1130
|
-
* The permalink structure is root property, and '%pagename%'. Will set the
|
1131
|
-
* page_structure property and then return it without attempting to set the
|
1132
|
-
* value again.
|
1133
|
-
*
|
1134
|
-
* @since 1.5.0
|
1135
|
-
* @access public
|
1136
|
-
*
|
1137
|
-
* @return string|bool False if not found. Permalink structure string.
|
1138
|
-
*/
|
1139
|
-
public function get_page_permastruct() {
|
1140
|
-
if ( isset($this->page_structure) )
|
1141
|
-
return $this->page_structure;
|
1142
|
-
|
1143
|
-
if (empty($this->permalink_structure)) {
|
1144
|
-
$this->page_structure = '';
|
1145
|
-
return false;
|
1146
|
-
}
|
1147
|
-
|
1148
|
-
$this->page_structure = $this->root . '%pagename%';
|
1149
|
-
|
1150
|
-
return $this->page_structure;
|
1151
|
-
}
|
1152
|
-
|
1153
|
-
/**
|
1154
|
-
* Retrieve the feed permalink structure.
|
1155
|
-
*
|
1156
|
-
* The permalink structure is root property, feed base, and finally
|
1157
|
-
* '/%feed%'. Will set the feed_structure property and then return it
|
1158
|
-
* without attempting to set the value again.
|
1159
|
-
*
|
1160
|
-
* @since 1.5.0
|
1161
|
-
* @access public
|
1162
|
-
*
|
1163
|
-
* @return string|bool False if not found. Permalink structure string.
|
1164
|
-
*/
|
1165
|
-
public function get_feed_permastruct() {
|
1166
|
-
if ( isset($this->feed_structure) )
|
1167
|
-
return $this->feed_structure;
|
1168
|
-
|
1169
|
-
if ( empty($this->permalink_structure) ) {
|
1170
|
-
$this->feed_structure = '';
|
1171
|
-
return false;
|
1172
|
-
}
|
1173
|
-
|
1174
|
-
$this->feed_structure = $this->root . $this->feed_base . '/%feed%';
|
1175
|
-
|
1176
|
-
return $this->feed_structure;
|
1177
|
-
}
|
1178
|
-
|
1179
|
-
/**
|
1180
|
-
* Retrieve the comment feed permalink structure.
|
1181
|
-
*
|
1182
|
-
* The permalink structure is root property, comment base property, feed
|
1183
|
-
* base and finally '/%feed%'. Will set the comment_feed_structure property
|
1184
|
-
* and then return it without attempting to set the value again.
|
1185
|
-
*
|
1186
|
-
* @since 1.5.0
|
1187
|
-
* @access public
|
1188
|
-
*
|
1189
|
-
* @return string|bool False if not found. Permalink structure string.
|
1190
|
-
*/
|
1191
|
-
public function get_comment_feed_permastruct() {
|
1192
|
-
if ( isset($this->comment_feed_structure) )
|
1193
|
-
return $this->comment_feed_structure;
|
1194
|
-
|
1195
|
-
if (empty($this->permalink_structure)) {
|
1196
|
-
$this->comment_feed_structure = '';
|
1197
|
-
return false;
|
1198
|
-
}
|
1199
|
-
|
1200
|
-
$this->comment_feed_structure = $this->root . $this->comments_base . '/' . $this->feed_base . '/%feed%';
|
1201
|
-
|
1202
|
-
return $this->comment_feed_structure;
|
1203
|
-
}
|
1204
|
-
|
1205
|
-
/**
|
1206
|
-
* Add or update existing rewrite tags (e.g. %postname%).
|
1207
|
-
*
|
1208
|
-
* If the tag already exists, replace the existing pattern and query for
|
1209
|
-
* that tag, otherwise add the new tag.
|
1210
|
-
*
|
1211
|
-
* @see WP_Rewrite::$rewritecode
|
1212
|
-
* @see WP_Rewrite::$rewritereplace
|
1213
|
-
* @see WP_Rewrite::$queryreplace
|
1214
|
-
* @since 1.5.0
|
1215
|
-
* @access public
|
1216
|
-
*
|
1217
|
-
* @param string $tag Name of the rewrite tag to add or update.
|
1218
|
-
* @param string $regex Regular expression to substitute the tag for in rewrite rules.
|
1219
|
-
* @param string $query String to append to the rewritten query. Must end in '='.
|
1220
|
-
*/
|
1221
|
-
public function add_rewrite_tag( $tag, $regex, $query ) {
|
1222
|
-
$position = array_search( $tag, $this->rewritecode );
|
1223
|
-
if ( false !== $position && null !== $position ) {
|
1224
|
-
$this->rewritereplace[ $position ] = $regex;
|
1225
|
-
$this->queryreplace[ $position ] = $query;
|
1226
|
-
} else {
|
1227
|
-
$this->rewritecode[] = $tag;
|
1228
|
-
$this->rewritereplace[] = $regex;
|
1229
|
-
$this->queryreplace[] = $query;
|
1230
|
-
}
|
1231
|
-
}
|
1232
|
-
|
1233
|
-
/**
|
1234
|
-
* Generate rewrite rules from a permalink structure.
|
1235
|
-
*
|
1236
|
-
* The main WP_Rewrite function for building the rewrite rule list. The
|
1237
|
-
* contents of the function is a mix of black magic and regular expressions,
|
1238
|
-
* so best just ignore the contents and move to the parameters.
|
1239
|
-
*
|
1240
|
-
* @since 1.5.0
|
1241
|
-
* @access public
|
1242
|
-
*
|
1243
|
-
* @param string $permalink_structure The permalink structure.
|
1244
|
-
* @param int $ep_mask Endpoint mask defining what endpoints are added to the structure. Default is EP_NONE.
|
1245
|
-
* @param bool $paged Should archive pagination rules be added for the structure? Default is true.
|
1246
|
-
* @param bool $feed Should feed rewrite rules be added for the structure? Default is true.
|
1247
|
-
* @param bool $forcomments Should the feed rules be a query for a comments feed? Default is false.
|
1248
|
-
* @param bool $walk_dirs Should the 'directories' making up the structure be walked over and rewrite rules
|
1249
|
-
* built for each in turn? Default is true.
|
1250
|
-
* @param bool $endpoints Should endpoints be applied to the generated rewrite rules? Default is true.
|
1251
|
-
* @return array Rewrite rule list.
|
1252
|
-
*/
|
1253
|
-
public function generate_rewrite_rules($permalink_structure, $ep_mask = EP_NONE, $paged = true, $feed = true, $forcomments = false, $walk_dirs = true, $endpoints = true) {
|
1254
|
-
//build a regex to match the feed section of URLs, something like (feed|atom|rss|rss2)/?
|
1255
|
-
$feedregex2 = '';
|
1256
|
-
foreach ( (array) $this->feeds as $feed_name)
|
1257
|
-
$feedregex2 .= $feed_name . '|';
|
1258
|
-
$feedregex2 = '(' . trim($feedregex2, '|') . ')/?$';
|
1259
|
-
|
1260
|
-
//$feedregex is identical but with /feed/ added on as well, so URLs like <permalink>/feed/atom
|
1261
|
-
//and <permalink>/atom are both possible
|
1262
|
-
$feedregex = $this->feed_base . '/' . $feedregex2;
|
1263
|
-
|
1264
|
-
//build a regex to match the trackback and page/xx parts of URLs
|
1265
|
-
$trackbackregex = 'trackback/?$';
|
1266
|
-
$pageregex = $this->pagination_base . '/?([0-9]{1,})/?$';
|
1267
|
-
$commentregex = 'comment-page-([0-9]{1,})/?$';
|
1268
|
-
|
1269
|
-
//build up an array of endpoint regexes to append => queries to append
|
1270
|
-
if ( $endpoints ) {
|
1271
|
-
$ep_query_append = array ();
|
1272
|
-
foreach ( (array) $this->endpoints as $endpoint) {
|
1273
|
-
//match everything after the endpoint name, but allow for nothing to appear there
|
1274
|
-
$epmatch = $endpoint[1] . '(/(.*))?/?$';
|
1275
|
-
//this will be appended on to the rest of the query for each dir
|
1276
|
-
$epquery = '&' . $endpoint[2] . '=';
|
1277
|
-
$ep_query_append[$epmatch] = array ( $endpoint[0], $epquery );
|
1278
|
-
}
|
1279
|
-
}
|
1280
|
-
|
1281
|
-
//get everything up to the first rewrite tag
|
1282
|
-
$front = substr($permalink_structure, 0, strpos($permalink_structure, '%'));
|
1283
|
-
//build an array of the tags (note that said array ends up being in $tokens[0])
|
1284
|
-
preg_match_all('/%.+?%/', $permalink_structure, $tokens);
|
1285
|
-
|
1286
|
-
$num_tokens = count($tokens[0]);
|
1287
|
-
|
1288
|
-
$index = $this->index; //probably 'index.php'
|
1289
|
-
$feedindex = $index;
|
1290
|
-
$trackbackindex = $index;
|
1291
|
-
//build a list from the rewritecode and queryreplace arrays, that will look something like
|
1292
|
-
//tagname=$matches[i] where i is the current $i
|
1293
|
-
for ( $i = 0; $i < $num_tokens; ++$i ) {
|
1294
|
-
if ( 0 < $i )
|
1295
|
-
$queries[$i] = $queries[$i - 1] . '&';
|
1296
|
-
else
|
1297
|
-
$queries[$i] = '';
|
1298
|
-
|
1299
|
-
$query_token = str_replace($this->rewritecode, $this->queryreplace, $tokens[0][$i]) . $this->preg_index($i+1);
|
1300
|
-
$queries[$i] .= $query_token;
|
1301
|
-
}
|
1302
|
-
|
1303
|
-
//get the structure, minus any cruft (stuff that isn't tags) at the front
|
1304
|
-
$structure = $permalink_structure;
|
1305
|
-
if ( $front != '/' )
|
1306
|
-
$structure = str_replace($front, '', $structure);
|
1307
|
-
|
1308
|
-
//create a list of dirs to walk over, making rewrite rules for each level
|
1309
|
-
//so for example, a $structure of /%year%/%monthnum%/%postname% would create
|
1310
|
-
//rewrite rules for /%year%/, /%year%/%monthnum%/ and /%year%/%monthnum%/%postname%
|
1311
|
-
$structure = trim($structure, '/');
|
1312
|
-
$dirs = $walk_dirs ? explode('/', $structure) : array( $structure );
|
1313
|
-
$num_dirs = count($dirs);
|
1314
|
-
|
1315
|
-
//strip slashes from the front of $front
|
1316
|
-
$front = preg_replace('|^/+|', '', $front);
|
1317
|
-
|
1318
|
-
//the main workhorse loop
|
1319
|
-
$post_rewrite = array();
|
1320
|
-
$struct = $front;
|
1321
|
-
for ( $j = 0; $j < $num_dirs; ++$j ) {
|
1322
|
-
//get the struct for this dir, and trim slashes off the front
|
1323
|
-
$struct .= $dirs[$j] . '/'; //accumulate. see comment near explode('/', $structure) above
|
1324
|
-
$struct = ltrim($struct, '/');
|
1325
|
-
|
1326
|
-
//replace tags with regexes
|
1327
|
-
$match = str_replace($this->rewritecode, $this->rewritereplace, $struct);
|
1328
|
-
|
1329
|
-
//make a list of tags, and store how many there are in $num_toks
|
1330
|
-
$num_toks = preg_match_all('/%.+?%/', $struct, $toks);
|
1331
|
-
|
1332
|
-
//get the 'tagname=$matches[i]'
|
1333
|
-
$query = ( isset($queries) && is_array($queries) && !empty($num_toks) ) ? $queries[$num_toks - 1] : '';
|
1334
|
-
|
1335
|
-
//set up $ep_mask_specific which is used to match more specific URL types
|
1336
|
-
switch ( $dirs[$j] ) {
|
1337
|
-
case '%year%':
|
1338
|
-
$ep_mask_specific = EP_YEAR;
|
1339
|
-
break;
|
1340
|
-
case '%monthnum%':
|
1341
|
-
$ep_mask_specific = EP_MONTH;
|
1342
|
-
break;
|
1343
|
-
case '%day%':
|
1344
|
-
$ep_mask_specific = EP_DAY;
|
1345
|
-
break;
|
1346
|
-
default:
|
1347
|
-
$ep_mask_specific = EP_NONE;
|
1348
|
-
}
|
1349
|
-
|
1350
|
-
//create query for /page/xx
|
1351
|
-
$pagematch = $match . $pageregex;
|
1352
|
-
$pagequery = $index . '?' . $query . '&paged=' . $this->preg_index($num_toks + 1);
|
1353
|
-
|
1354
|
-
//create query for /comment-page-xx
|
1355
|
-
$commentmatch = $match . $commentregex;
|
1356
|
-
$commentquery = $index . '?' . $query . '&cpage=' . $this->preg_index($num_toks + 1);
|
1357
|
-
|
1358
|
-
if ( get_option('page_on_front') ) {
|
1359
|
-
//create query for Root /comment-page-xx
|
1360
|
-
$rootcommentmatch = $match . $commentregex;
|
1361
|
-
$rootcommentquery = $index . '?' . $query . '&page_id=' . get_option('page_on_front') . '&cpage=' . $this->preg_index($num_toks + 1);
|
1362
|
-
}
|
1363
|
-
|
1364
|
-
//create query for /feed/(feed|atom|rss|rss2|rdf)
|
1365
|
-
$feedmatch = $match . $feedregex;
|
1366
|
-
$feedquery = $feedindex . '?' . $query . '&feed=' . $this->preg_index($num_toks + 1);
|
1367
|
-
|
1368
|
-
//create query for /(feed|atom|rss|rss2|rdf) (see comment near creation of $feedregex)
|
1369
|
-
$feedmatch2 = $match . $feedregex2;
|
1370
|
-
$feedquery2 = $feedindex . '?' . $query . '&feed=' . $this->preg_index($num_toks + 1);
|
1371
|
-
|
1372
|
-
//if asked to, turn the feed queries into comment feed ones
|
1373
|
-
if ( $forcomments ) {
|
1374
|
-
$feedquery .= '&withcomments=1';
|
1375
|
-
$feedquery2 .= '&withcomments=1';
|
1376
|
-
}
|
1377
|
-
|
1378
|
-
//start creating the array of rewrites for this dir
|
1379
|
-
$rewrite = array();
|
1380
|
-
if ( $feed ) //...adding on /feed/ regexes => queries
|
1381
|
-
$rewrite = array($feedmatch => $feedquery, $feedmatch2 => $feedquery2);
|
1382
|
-
if ( $paged ) //...and /page/xx ones
|
1383
|
-
$rewrite = array_merge($rewrite, array($pagematch => $pagequery));
|
1384
|
-
|
1385
|
-
//only on pages with comments add ../comment-page-xx/
|
1386
|
-
if ( EP_PAGES & $ep_mask || EP_PERMALINK & $ep_mask )
|
1387
|
-
$rewrite = array_merge($rewrite, array($commentmatch => $commentquery));
|
1388
|
-
else if ( EP_ROOT & $ep_mask && get_option('page_on_front') )
|
1389
|
-
$rewrite = array_merge($rewrite, array($rootcommentmatch => $rootcommentquery));
|
1390
|
-
|
1391
|
-
//do endpoints
|
1392
|
-
if ( $endpoints ) {
|
1393
|
-
foreach ( (array) $ep_query_append as $regex => $ep) {
|
1394
|
-
//add the endpoints on if the mask fits
|
1395
|
-
if ( $ep[0] & $ep_mask || $ep[0] & $ep_mask_specific )
|
1396
|
-
$rewrite[$match . $regex] = $index . '?' . $query . $ep[1] . $this->preg_index($num_toks + 2);
|
1397
|
-
}
|
1398
|
-
}
|
1399
|
-
|
1400
|
-
//if we've got some tags in this dir
|
1401
|
-
if ( $num_toks ) {
|
1402
|
-
$post = false;
|
1403
|
-
$page = false;
|
1404
|
-
|
1405
|
-
//check to see if this dir is permalink-level: i.e. the structure specifies an
|
1406
|
-
//individual post. Do this by checking it contains at least one of 1) post name,
|
1407
|
-
//2) post ID, 3) page name, 4) timestamp (year, month, day, hour, second and
|
1408
|
-
//minute all present). Set these flags now as we need them for the endpoints.
|
1409
|
-
if ( strpos($struct, '%postname%') !== false
|
1410
|
-
|| strpos($struct, '%post_id%') !== false
|
1411
|
-
|| strpos($struct, '%pagename%') !== false
|
1412
|
-
|| (strpos($struct, '%year%') !== false && strpos($struct, '%monthnum%') !== false && strpos($struct, '%day%') !== false && strpos($struct, '%hour%') !== false && strpos($struct, '%minute%') !== false && strpos($struct, '%second%') !== false)
|
1413
|
-
) {
|
1414
|
-
$post = true;
|
1415
|
-
if ( strpos($struct, '%pagename%') !== false )
|
1416
|
-
$page = true;
|
1417
|
-
}
|
1418
|
-
|
1419
|
-
if ( ! $post ) {
|
1420
|
-
// For custom post types, we need to add on endpoints as well.
|
1421
|
-
foreach ( get_post_types( array('_builtin' => false ) ) as $ptype ) {
|
1422
|
-
if ( strpos($struct, "%$ptype%") !== false ) {
|
1423
|
-
$post = true;
|
1424
|
-
$page = is_post_type_hierarchical( $ptype ); // This is for page style attachment url's
|
1425
|
-
break;
|
1426
|
-
}
|
1427
|
-
}
|
1428
|
-
}
|
1429
|
-
|
1430
|
-
//if we're creating rules for a permalink, do all the endpoints like attachments etc
|
1431
|
-
if ( $post ) {
|
1432
|
-
//create query and regex for trackback
|
1433
|
-
$trackbackmatch = $match . $trackbackregex;
|
1434
|
-
$trackbackquery = $trackbackindex . '?' . $query . '&tb=1';
|
1435
|
-
//trim slashes from the end of the regex for this dir
|
1436
|
-
$match = rtrim($match, '/');
|
1437
|
-
//get rid of brackets
|
1438
|
-
$submatchbase = str_replace( array('(', ')'), '', $match);
|
1439
|
-
|
1440
|
-
//add a rule for at attachments, which take the form of <permalink>/some-text
|
1441
|
-
$sub1 = $submatchbase . '/([^/]+)/';
|
1442
|
-
$sub1tb = $sub1 . $trackbackregex; //add trackback regex <permalink>/trackback/...
|
1443
|
-
$sub1feed = $sub1 . $feedregex; //and <permalink>/feed/(atom|...)
|
1444
|
-
$sub1feed2 = $sub1 . $feedregex2; //and <permalink>/(feed|atom...)
|
1445
|
-
$sub1comment = $sub1 . $commentregex; //and <permalink>/comment-page-xx
|
1446
|
-
|
1447
|
-
//add another rule to match attachments in the explicit form:
|
1448
|
-
//<permalink>/attachment/some-text
|
1449
|
-
$sub2 = $submatchbase . '/attachment/([^/]+)/';
|
1450
|
-
$sub2tb = $sub2 . $trackbackregex; //and add trackbacks <permalink>/attachment/trackback
|
1451
|
-
$sub2feed = $sub2 . $feedregex; //feeds, <permalink>/attachment/feed/(atom|...)
|
1452
|
-
$sub2feed2 = $sub2 . $feedregex2; //and feeds again on to this <permalink>/attachment/(feed|atom...)
|
1453
|
-
$sub2comment = $sub2 . $commentregex; //and <permalink>/comment-page-xx
|
1454
|
-
|
1455
|
-
//create queries for these extra tag-ons we've just dealt with
|
1456
|
-
$subquery = $index . '?attachment=' . $this->preg_index(1);
|
1457
|
-
$subtbquery = $subquery . '&tb=1';
|
1458
|
-
$subfeedquery = $subquery . '&feed=' . $this->preg_index(2);
|
1459
|
-
$subcommentquery = $subquery . '&cpage=' . $this->preg_index(2);
|
1460
|
-
|
1461
|
-
//do endpoints for attachments
|
1462
|
-
if ( !empty($endpoints) ) {
|
1463
|
-
foreach ( (array) $ep_query_append as $regex => $ep ) {
|
1464
|
-
if ( $ep[0] & EP_ATTACHMENT ) {
|
1465
|
-
$rewrite[$sub1 . $regex] = $subquery . $ep[1] . $this->preg_index(3);
|
1466
|
-
$rewrite[$sub2 . $regex] = $subquery . $ep[1] . $this->preg_index(3);
|
1467
|
-
}
|
1468
|
-
}
|
1469
|
-
}
|
1470
|
-
|
1471
|
-
//now we've finished with endpoints, finish off the $sub1 and $sub2 matches
|
1472
|
-
//add a ? as we don't have to match that last slash, and finally a $ so we
|
1473
|
-
//match to the end of the URL
|
1474
|
-
$sub1 .= '?$';
|
1475
|
-
$sub2 .= '?$';
|
1476
|
-
|
1477
|
-
//post pagination, e.g. <permalink>/2/
|
1478
|
-
$match = $match . '(/[0-9]+)?/?$';
|
1479
|
-
$query = $index . '?' . $query . '&page=' . $this->preg_index($num_toks + 1);
|
1480
|
-
} else { //not matching a permalink so this is a lot simpler
|
1481
|
-
//close the match and finalise the query
|
1482
|
-
$match .= '?$';
|
1483
|
-
$query = $index . '?' . $query;
|
1484
|
-
}
|
1485
|
-
|
1486
|
-
//create the final array for this dir by joining the $rewrite array (which currently
|
1487
|
-
//only contains rules/queries for trackback, pages etc) to the main regex/query for
|
1488
|
-
//this dir
|
1489
|
-
$rewrite = array_merge($rewrite, array($match => $query));
|
1490
|
-
|
1491
|
-
//if we're matching a permalink, add those extras (attachments etc) on
|
1492
|
-
if ( $post ) {
|
1493
|
-
//add trackback
|
1494
|
-
$rewrite = array_merge(array($trackbackmatch => $trackbackquery), $rewrite);
|
1495
|
-
|
1496
|
-
//add regexes/queries for attachments, attachment trackbacks and so on
|
1497
|
-
if ( ! $page ) //require <permalink>/attachment/stuff form for pages because of confusion with subpages
|
1498
|
-
$rewrite = array_merge($rewrite, array($sub1 => $subquery, $sub1tb => $subtbquery, $sub1feed => $subfeedquery, $sub1feed2 => $subfeedquery, $sub1comment => $subcommentquery));
|
1499
|
-
$rewrite = array_merge(array($sub2 => $subquery, $sub2tb => $subtbquery, $sub2feed => $subfeedquery, $sub2feed2 => $subfeedquery, $sub2comment => $subcommentquery), $rewrite);
|
1500
|
-
}
|
1501
|
-
} //if($num_toks)
|
1502
|
-
//add the rules for this dir to the accumulating $post_rewrite
|
1503
|
-
$post_rewrite = array_merge($rewrite, $post_rewrite);
|
1504
|
-
} //foreach ($dir)
|
1505
|
-
return $post_rewrite; //the finished rules. phew!
|
1506
|
-
}
|
1507
|
-
|
1508
|
-
/**
|
1509
|
-
* Generate Rewrite rules with permalink structure and walking directory only.
|
1510
|
-
*
|
1511
|
-
* Shorten version of {@link WP_Rewrite::generate_rewrite_rules()} that
|
1512
|
-
* allows for shorter list of parameters. See the method for longer
|
1513
|
-
* description of what generating rewrite rules does.
|
1514
|
-
*
|
1515
|
-
* @uses WP_Rewrite::generate_rewrite_rules() See for long description and rest of parameters.
|
1516
|
-
* @since 1.5.0
|
1517
|
-
* @access public
|
1518
|
-
*
|
1519
|
-
* @param string $permalink_structure The permalink structure to generate rules.
|
1520
|
-
* @param bool $walk_dirs Optional, default is false. Whether to create list of directories to walk over.
|
1521
|
-
* @return array
|
1522
|
-
*/
|
1523
|
-
public function generate_rewrite_rule($permalink_structure, $walk_dirs = false) {
|
1524
|
-
return $this->generate_rewrite_rules($permalink_structure, EP_NONE, false, false, false, $walk_dirs);
|
1525
|
-
}
|
1526
|
-
|
1527
|
-
/**
|
1528
|
-
* Construct rewrite matches and queries from permalink structure.
|
1529
|
-
*
|
1530
|
-
* Runs the action 'generate_rewrite_rules' with the parameter that is an
|
1531
|
-
* reference to the current WP_Rewrite instance to further manipulate the
|
1532
|
-
* permalink structures and rewrite rules. Runs the 'rewrite_rules_array'
|
1533
|
-
* filter on the full rewrite rule array.
|
1534
|
-
*
|
1535
|
-
* There are two ways to manipulate the rewrite rules, one by hooking into
|
1536
|
-
* the 'generate_rewrite_rules' action and gaining full control of the
|
1537
|
-
* object or just manipulating the rewrite rule array before it is passed
|
1538
|
-
* from the function.
|
1539
|
-
*
|
1540
|
-
* @since 1.5.0
|
1541
|
-
* @access public
|
1542
|
-
*
|
1543
|
-
* @return array An associate array of matches and queries.
|
1544
|
-
*/
|
1545
|
-
public function rewrite_rules() {
|
1546
|
-
$rewrite = array();
|
1547
|
-
|
1548
|
-
if ( empty($this->permalink_structure) )
|
1549
|
-
return $rewrite;
|
1550
|
-
|
1551
|
-
// robots.txt -only if installed at the root
|
1552
|
-
$home_path = parse_url( home_url() );
|
1553
|
-
$robots_rewrite = ( empty( $home_path['path'] ) || '/' == $home_path['path'] ) ? array( 'robots\.txt$' => $this->index . '?robots=1' ) : array();
|
1554
|
-
|
1555
|
-
// Old feed and service files
|
1556
|
-
$deprecated_files = array(
|
1557
|
-
'.*wp-(atom|rdf|rss|rss2|feed|commentsrss2)\.php$' => $this->index . '?feed=old',
|
1558
|
-
'.*wp-app\.php(/.*)?$' => $this->index . '?error=403',
|
1559
|
-
);
|
1560
|
-
|
1561
|
-
// Registration rules
|
1562
|
-
$registration_pages = array();
|
1563
|
-
if ( is_multisite() && is_main_site() ) {
|
1564
|
-
$registration_pages['.*wp-signup.php$'] = $this->index . '?signup=true';
|
1565
|
-
$registration_pages['.*wp-activate.php$'] = $this->index . '?activate=true';
|
1566
|
-
}
|
1567
|
-
$registration_pages['.*wp-register.php$'] = $this->index . '?register=true'; // Deprecated
|
1568
|
-
|
1569
|
-
// Post rewrite rules.
|
1570
|
-
$post_rewrite = $this->generate_rewrite_rules( $this->permalink_structure, EP_PERMALINK );
|
1571
|
-
|
1572
|
-
/**
|
1573
|
-
* Filter rewrite rules used for "post" archives.
|
1574
|
-
*
|
1575
|
-
* @since 1.5.0
|
1576
|
-
*
|
1577
|
-
* @param array $post_rewrite The rewrite rules for posts.
|
1578
|
-
*/
|
1579
|
-
$post_rewrite = apply_filters( 'post_rewrite_rules', $post_rewrite );
|
1580
|
-
|
1581
|
-
// Date rewrite rules.
|
1582
|
-
$date_rewrite = $this->generate_rewrite_rules($this->get_date_permastruct(), EP_DATE);
|
1583
|
-
|
1584
|
-
/**
|
1585
|
-
* Filter rewrite rules used for date archives.
|
1586
|
-
*
|
1587
|
-
* Likely date archives would include /yyyy/, /yyyy/mm/, and /yyyy/mm/dd/.
|
1588
|
-
*
|
1589
|
-
* @since 1.5.0
|
1590
|
-
*
|
1591
|
-
* @param array $date_rewrite The rewrite rules for date archives.
|
1592
|
-
*/
|
1593
|
-
$date_rewrite = apply_filters( 'date_rewrite_rules', $date_rewrite );
|
1594
|
-
|
1595
|
-
// Root-level rewrite rules.
|
1596
|
-
$root_rewrite = $this->generate_rewrite_rules($this->root . '/', EP_ROOT);
|
1597
|
-
|
1598
|
-
/**
|
1599
|
-
* Filter rewrite rules used for root-level archives.
|
1600
|
-
*
|
1601
|
-
* Likely root-level archives would include pagination rules for the homepage
|
1602
|
-
* as well as site-wide post feeds (e.g. /feed/, and /feed/atom/).
|
1603
|
-
*
|
1604
|
-
* @since 1.5.0
|
1605
|
-
*
|
1606
|
-
* @param array $root_rewrite The root-level rewrite rules.
|
1607
|
-
*/
|
1608
|
-
$root_rewrite = apply_filters( 'root_rewrite_rules', $root_rewrite );
|
1609
|
-
|
1610
|
-
// Comments rewrite rules.
|
1611
|
-
$comments_rewrite = $this->generate_rewrite_rules($this->root . $this->comments_base, EP_COMMENTS, false, true, true, false);
|
1612
|
-
|
1613
|
-
/**
|
1614
|
-
* Filter rewrite rules used for comment feed archives.
|
1615
|
-
*
|
1616
|
-
* Likely comments feed archives include /comments/feed/, and /comments/feed/atom/.
|
1617
|
-
*
|
1618
|
-
* @since 1.5.0
|
1619
|
-
*
|
1620
|
-
* @param array $comments_rewrite The rewrite rules for the site-wide comments feeds.
|
1621
|
-
*/
|
1622
|
-
$comments_rewrite = apply_filters( 'comments_rewrite_rules', $comments_rewrite );
|
1623
|
-
|
1624
|
-
// Search rewrite rules.
|
1625
|
-
$search_structure = $this->get_search_permastruct();
|
1626
|
-
$search_rewrite = $this->generate_rewrite_rules($search_structure, EP_SEARCH);
|
1627
|
-
|
1628
|
-
/**
|
1629
|
-
* Filter rewrite rules used for search archives.
|
1630
|
-
*
|
1631
|
-
* Likely search-related archives include /search/search+query/ as well as
|
1632
|
-
* pagination and feed paths for a search.
|
1633
|
-
*
|
1634
|
-
* @since 1.5.0
|
1635
|
-
*
|
1636
|
-
* @param array $search_rewrite The rewrite rules for search queries.
|
1637
|
-
*/
|
1638
|
-
$search_rewrite = apply_filters( 'search_rewrite_rules', $search_rewrite );
|
1639
|
-
|
1640
|
-
// Author rewrite rules.
|
1641
|
-
$author_rewrite = $this->generate_rewrite_rules($this->get_author_permastruct(), EP_AUTHORS);
|
1642
|
-
|
1643
|
-
/**
|
1644
|
-
* Filter rewrite rules used for author archives.
|
1645
|
-
*
|
1646
|
-
* Likely author archives would include /author/author-name/, as well as
|
1647
|
-
* pagination and feed paths for author archives.
|
1648
|
-
*
|
1649
|
-
* @since 1.5.0
|
1650
|
-
*
|
1651
|
-
* @param array $author_rewrite The rewrite rules for author archives.
|
1652
|
-
*/
|
1653
|
-
$author_rewrite = apply_filters( 'author_rewrite_rules', $author_rewrite );
|
1654
|
-
|
1655
|
-
// Pages rewrite rules.
|
1656
|
-
$page_rewrite = $this->page_rewrite_rules();
|
1657
|
-
|
1658
|
-
/**
|
1659
|
-
* Filter rewrite rules used for "page" post type archives.
|
1660
|
-
*
|
1661
|
-
* @since 1.5.0
|
1662
|
-
*
|
1663
|
-
* @param array $page_rewrite The rewrite rules for the "page" post type.
|
1664
|
-
*/
|
1665
|
-
$page_rewrite = apply_filters( 'page_rewrite_rules', $page_rewrite );
|
1666
|
-
|
1667
|
-
// Extra permastructs.
|
1668
|
-
foreach ( $this->extra_permastructs as $permastructname => $struct ) {
|
1669
|
-
if ( is_array( $struct ) ) {
|
1670
|
-
if ( count( $struct ) == 2 )
|
1671
|
-
$rules = $this->generate_rewrite_rules( $struct[0], $struct[1] );
|
1672
|
-
else
|
1673
|
-
$rules = $this->generate_rewrite_rules( $struct['struct'], $struct['ep_mask'], $struct['paged'], $struct['feed'], $struct['forcomments'], $struct['walk_dirs'], $struct['endpoints'] );
|
1674
|
-
} else {
|
1675
|
-
$rules = $this->generate_rewrite_rules( $struct );
|
1676
|
-
}
|
1677
|
-
|
1678
|
-
/**
|
1679
|
-
* Filter rewrite rules used for individual permastructs.
|
1680
|
-
*
|
1681
|
-
* The dynamic portion of the hook name, $permastructname, refers
|
1682
|
-
* to the name of the registered permastruct, e.g. 'post_tag' (tags),
|
1683
|
-
* 'category' (categories), etc.
|
1684
|
-
*
|
1685
|
-
* @since 3.1.0
|
1686
|
-
*
|
1687
|
-
* @param array $rules The rewrite rules generated for the current permastruct.
|
1688
|
-
*/
|
1689
|
-
$rules = apply_filters( $permastructname . '_rewrite_rules', $rules );
|
1690
|
-
if ( 'post_tag' == $permastructname ) {
|
1691
|
-
|
1692
|
-
/**
|
1693
|
-
* Filter rewrite rules used specifically for Tags.
|
1694
|
-
*
|
1695
|
-
* @since 2.3.0
|
1696
|
-
* @deprecated 3.1.0 Use 'post_tag_rewrite_rules' instead
|
1697
|
-
*
|
1698
|
-
* @param array $rules The rewrite rules generated for tags.
|
1699
|
-
*/
|
1700
|
-
$rules = apply_filters( 'tag_rewrite_rules', $rules );
|
1701
|
-
}
|
1702
|
-
|
1703
|
-
$this->extra_rules_top = array_merge($this->extra_rules_top, $rules);
|
1704
|
-
}
|
1705
|
-
|
1706
|
-
// Put them together.
|
1707
|
-
if ( $this->use_verbose_page_rules )
|
1708
|
-
$this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $deprecated_files, $registration_pages, $root_rewrite, $comments_rewrite, $search_rewrite, $author_rewrite, $date_rewrite, $page_rewrite, $post_rewrite, $this->extra_rules);
|
1709
|
-
else
|
1710
|
-
$this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $deprecated_files, $registration_pages, $root_rewrite, $comments_rewrite, $search_rewrite, $author_rewrite, $date_rewrite, $post_rewrite, $page_rewrite, $this->extra_rules);
|
1711
|
-
|
1712
|
-
/**
|
1713
|
-
* Fires after the rewrite rules are generated.
|
1714
|
-
*
|
1715
|
-
* @since 1.5.0
|
1716
|
-
*
|
1717
|
-
* @param WP_Rewrite $this Current WP_Rewrite instance, passed by reference.
|
1718
|
-
*/
|
1719
|
-
do_action_ref_array( 'generate_rewrite_rules', array( &$this ) );
|
1720
|
-
|
1721
|
-
/**
|
1722
|
-
* Filter the full set of generated rewrite rules.
|
1723
|
-
*
|
1724
|
-
* @since 1.5.0
|
1725
|
-
*
|
1726
|
-
* @param array $this->rules The compiled array of rewrite rules.
|
1727
|
-
*/
|
1728
|
-
$this->rules = apply_filters( 'rewrite_rules_array', $this->rules );
|
1729
|
-
|
1730
|
-
return $this->rules;
|
1731
|
-
}
|
1732
|
-
|
1733
|
-
/**
|
1734
|
-
* Retrieve the rewrite rules.
|
1735
|
-
*
|
1736
|
-
* The difference between this method and {@link
|
1737
|
-
* WP_Rewrite::rewrite_rules()} is that this method stores the rewrite rules
|
1738
|
-
* in the 'rewrite_rules' option and retrieves it. This prevents having to
|
1739
|
-
* process all of the permalinks to get the rewrite rules in the form of
|
1740
|
-
* caching.
|
1741
|
-
*
|
1742
|
-
* @since 1.5.0
|
1743
|
-
* @access public
|
1744
|
-
*
|
1745
|
-
* @return array Rewrite rules.
|
1746
|
-
*/
|
1747
|
-
public function wp_rewrite_rules() {
|
1748
|
-
$this->rules = get_option('rewrite_rules');
|
1749
|
-
if ( empty($this->rules) ) {
|
1750
|
-
$this->matches = 'matches';
|
1751
|
-
$this->rewrite_rules();
|
1752
|
-
update_option('rewrite_rules', $this->rules);
|
1753
|
-
}
|
1754
|
-
|
1755
|
-
return $this->rules;
|
1756
|
-
}
|
1757
|
-
|
1758
|
-
/**
|
1759
|
-
* Retrieve mod_rewrite formatted rewrite rules to write to .htaccess.
|
1760
|
-
*
|
1761
|
-
* Does not actually write to the .htaccess file, but creates the rules for
|
1762
|
-
* the process that will.
|
1763
|
-
*
|
1764
|
-
* Will add the non_wp_rules property rules to the .htaccess file before
|
1765
|
-
* the WordPress rewrite rules one.
|
1766
|
-
*
|
1767
|
-
* @since 1.5.0
|
1768
|
-
* @access public
|
1769
|
-
*
|
1770
|
-
* @return string
|
1771
|
-
*/
|
1772
|
-
public function mod_rewrite_rules() {
|
1773
|
-
if ( ! $this->using_permalinks() )
|
1774
|
-
return '';
|
1775
|
-
|
1776
|
-
$site_root = parse_url( site_url() );
|
1777
|
-
if ( isset( $site_root['path'] ) )
|
1778
|
-
$site_root = trailingslashit($site_root['path']);
|
1779
|
-
|
1780
|
-
$home_root = parse_url(home_url());
|
1781
|
-
if ( isset( $home_root['path'] ) )
|
1782
|
-
$home_root = trailingslashit($home_root['path']);
|
1783
|
-
else
|
1784
|
-
$home_root = '/';
|
1785
|
-
|
1786
|
-
$rules = "<IfModule mod_rewrite.c>\n";
|
1787
|
-
$rules .= "RewriteEngine On\n";
|
1788
|
-
$rules .= "RewriteBase $home_root\n";
|
1789
|
-
$rules .= "RewriteRule ^index\.php$ - [L]\n"; // Prevent -f checks on index.php.
|
1790
|
-
|
1791
|
-
//add in the rules that don't redirect to WP's index.php (and thus shouldn't be handled by WP at all)
|
1792
|
-
foreach ( (array) $this->non_wp_rules as $match => $query) {
|
1793
|
-
// Apache 1.3 does not support the reluctant (non-greedy) modifier.
|
1794
|
-
$match = str_replace('.+?', '.+', $match);
|
1795
|
-
|
1796
|
-
// If the match is unanchored and greedy, prepend rewrite conditions
|
1797
|
-
// to avoid infinite redirects and eclipsing of real files.
|
1798
|
-
//if ($match == '(.+)/?$' || $match == '([^/]+)/?$' ) {
|
1799
|
-
//nada.
|
1800
|
-
//}
|
1801
|
-
|
1802
|
-
$rules .= 'RewriteRule ^' . $match . ' ' . $home_root . $query . " [QSA,L]\n";
|
1803
|
-
}
|
1804
|
-
|
1805
|
-
if ( $this->use_verbose_rules ) {
|
1806
|
-
$this->matches = '';
|
1807
|
-
$rewrite = $this->rewrite_rules();
|
1808
|
-
$num_rules = count($rewrite);
|
1809
|
-
$rules .= "RewriteCond %{REQUEST_FILENAME} -f [OR]\n" .
|
1810
|
-
"RewriteCond %{REQUEST_FILENAME} -d\n" .
|
1811
|
-
"RewriteRule ^.*$ - [S=$num_rules]\n";
|
1812
|
-
|
1813
|
-
foreach ( (array) $rewrite as $match => $query) {
|
1814
|
-
// Apache 1.3 does not support the reluctant (non-greedy) modifier.
|
1815
|
-
$match = str_replace('.+?', '.+', $match);
|
1816
|
-
|
1817
|
-
// If the match is unanchored and greedy, prepend rewrite conditions
|
1818
|
-
// to avoid infinite redirects and eclipsing of real files.
|
1819
|
-
//if ($match == '(.+)/?$' || $match == '([^/]+)/?$' ) {
|
1820
|
-
//nada.
|
1821
|
-
//}
|
1822
|
-
|
1823
|
-
if ( strpos($query, $this->index) !== false )
|
1824
|
-
$rules .= 'RewriteRule ^' . $match . ' ' . $home_root . $query . " [QSA,L]\n";
|
1825
|
-
else
|
1826
|
-
$rules .= 'RewriteRule ^' . $match . ' ' . $site_root . $query . " [QSA,L]\n";
|
1827
|
-
}
|
1828
|
-
} else {
|
1829
|
-
$rules .= "RewriteCond %{REQUEST_FILENAME} !-f\n" .
|
1830
|
-
"RewriteCond %{REQUEST_FILENAME} !-d\n" .
|
1831
|
-
"RewriteRule . {$home_root}{$this->index} [L]\n";
|
1832
|
-
}
|
1833
|
-
|
1834
|
-
$rules .= "</IfModule>\n";
|
1835
|
-
|
1836
|
-
/**
|
1837
|
-
*
|
1838
|
-
* Filter the list of rewrite rules formatted for output to an .htaccess file.
|
1839
|
-
*
|
1840
|
-
* @since 1.5.0
|
1841
|
-
*
|
1842
|
-
* @param string $rules mod_rewrite Rewrite rules formatted for .htaccess.
|
1843
|
-
*/
|
1844
|
-
$rules = apply_filters( 'mod_rewrite_rules', $rules );
|
1845
|
-
|
1846
|
-
/**
|
1847
|
-
* Filter the list of rewrite rules formatted for output to an .htaccess file.
|
1848
|
-
*
|
1849
|
-
* @since 1.5.0
|
1850
|
-
* @deprecated 1.5.0 Use the mod_rewrite_rules filter instead.
|
1851
|
-
*
|
1852
|
-
* @param string $rules mod_rewrite Rewrite rules formatted for .htaccess.
|
1853
|
-
*/
|
1854
|
-
$rules = apply_filters( 'rewrite_rules', $rules ); // Deprecated
|
1855
|
-
|
1856
|
-
return $rules;
|
1857
|
-
}
|
1858
|
-
|
1859
|
-
/**
|
1860
|
-
* Retrieve IIS7 URL Rewrite formatted rewrite rules to write to web.config file.
|
1861
|
-
*
|
1862
|
-
* Does not actually write to the web.config file, but creates the rules for
|
1863
|
-
* the process that will.
|
1864
|
-
*
|
1865
|
-
* @since 2.8.0
|
1866
|
-
* @access public
|
1867
|
-
*
|
1868
|
-
* @return string
|
1869
|
-
*/
|
1870
|
-
public function iis7_url_rewrite_rules( $add_parent_tags = false ) {
|
1871
|
-
|
1872
|
-
if ( ! $this->using_permalinks() )
|
1873
|
-
return '';
|
1874
|
-
$rules = '';
|
1875
|
-
if ( $add_parent_tags ) {
|
1876
|
-
$rules .= '<configuration>
|
1877
|
-
<system.webServer>
|
1878
|
-
<rewrite>
|
1879
|
-
<rules>';
|
1880
|
-
}
|
1881
|
-
|
1882
|
-
$rules .= '
|
1883
|
-
<rule name="wordpress" patternSyntax="Wildcard">
|
1884
|
-
<match url="*" />
|
1885
|
-
<conditions>
|
1886
|
-
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
|
1887
|
-
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
|
1888
|
-
</conditions>
|
1889
|
-
<action type="Rewrite" url="index.php" />
|
1890
|
-
</rule>';
|
1891
|
-
|
1892
|
-
if ( $add_parent_tags ) {
|
1893
|
-
$rules .= '
|
1894
|
-
</rules>
|
1895
|
-
</rewrite>
|
1896
|
-
</system.webServer>
|
1897
|
-
</configuration>';
|
1898
|
-
}
|
1899
|
-
|
1900
|
-
/**
|
1901
|
-
* Filter the list of rewrite rules formatted for output to a web.config.
|
1902
|
-
*
|
1903
|
-
* @since 2.8.0
|
1904
|
-
*
|
1905
|
-
* @param string $rules Rewrite rules formatted for IIS web.config.
|
1906
|
-
*/
|
1907
|
-
$rules = apply_filters( 'iis7_url_rewrite_rules', $rules );
|
1908
|
-
|
1909
|
-
return $rules;
|
1910
|
-
}
|
1911
|
-
|
1912
|
-
/**
|
1913
|
-
* Add a straight rewrite rule.
|
1914
|
-
*
|
1915
|
-
* Any value in the $after parameter that isn't 'bottom' will be placed at
|
1916
|
-
* the top of the rules.
|
1917
|
-
*
|
1918
|
-
* @since 2.1.0
|
1919
|
-
* @access public
|
1920
|
-
*
|
1921
|
-
* @param string $regex Regular expression to match against request.
|
1922
|
-
* @param string $redirect URL regex redirects to when regex matches request.
|
1923
|
-
* @param string $after Optional, default is bottom. Location to place rule.
|
1924
|
-
*/
|
1925
|
-
public function add_rule($regex, $redirect, $after = 'bottom') {
|
1926
|
-
//get everything up to the first ?
|
1927
|
-
$index = (strpos($redirect, '?') == false ? strlen($redirect) : strpos($redirect, '?'));
|
1928
|
-
$front = substr($redirect, 0, $index);
|
1929
|
-
if ( $front != $this->index ) { //it doesn't redirect to WP's index.php
|
1930
|
-
$this->add_external_rule($regex, $redirect);
|
1931
|
-
} else {
|
1932
|
-
if ( 'bottom' == $after)
|
1933
|
-
$this->extra_rules = array_merge($this->extra_rules, array($regex => $redirect));
|
1934
|
-
else
|
1935
|
-
$this->extra_rules_top = array_merge($this->extra_rules_top, array($regex => $redirect));
|
1936
|
-
//$this->extra_rules[$regex] = $redirect;
|
1937
|
-
}
|
1938
|
-
}
|
1939
|
-
|
1940
|
-
/**
|
1941
|
-
* Add a rule that doesn't redirect to index.php.
|
1942
|
-
*
|
1943
|
-
* Can redirect to any place.
|
1944
|
-
*
|
1945
|
-
* @since 2.1.0
|
1946
|
-
* @access public
|
1947
|
-
*
|
1948
|
-
* @param string $regex Regular expression to match against request.
|
1949
|
-
* @param string $redirect URL regex redirects to when regex matches request.
|
1950
|
-
*/
|
1951
|
-
public function add_external_rule($regex, $redirect) {
|
1952
|
-
$this->non_wp_rules[$regex] = $redirect;
|
1953
|
-
}
|
1954
|
-
|
1955
|
-
/**
|
1956
|
-
* Add an endpoint, like /trackback/.
|
1957
|
-
*
|
1958
|
-
* @since 2.1.0
|
1959
|
-
* @since 3.9.0 $query_var parameter added.
|
1960
|
-
* @access public
|
1961
|
-
*
|
1962
|
-
* @see add_rewrite_endpoint() for full documentation.
|
1963
|
-
* @uses WP::add_query_var()
|
1964
|
-
*
|
1965
|
-
* @param string $name Name of the endpoint.
|
1966
|
-
* @param int $places Endpoint mask describing the places the endpoint should be added.
|
1967
|
-
* @param string $query_var Name of the corresponding query variable. Default is value of $name.
|
1968
|
-
*/
|
1969
|
-
public function add_endpoint( $name, $places, $query_var = null ) {
|
1970
|
-
global $wp;
|
1971
|
-
if ( null === $query_var ) {
|
1972
|
-
$query_var = $name;
|
1973
|
-
}
|
1974
|
-
$this->endpoints[] = array( $places, $name, $query_var );
|
1975
|
-
$wp->add_query_var( $query_var );
|
1976
|
-
}
|
1977
|
-
|
1978
|
-
/**
|
1979
|
-
* Add a new permalink structure.
|
1980
|
-
*
|
1981
|
-
* A permalink structure (permastruct) is an abstract definition of a set of rewrite rules; it
|
1982
|
-
* is an easy way of expressing a set of regular expressions that rewrite to a set of query strings.
|
1983
|
-
* The new permastruct is added to the {@link WP_Rewrite::$extra_permastructs} array. When the
|
1984
|
-
* rewrite rules are built by {@link WP_Rewrite::rewrite_rules()} all of these extra permastructs
|
1985
|
-
* are passed to {@link WP_Rewrite::generate_rewrite_rules()} which transforms them into the
|
1986
|
-
* regular expressions that many love to hate.
|
1987
|
-
*
|
1988
|
-
* The $args parameter gives you control over how {@link WP_Rewrite::generate_rewrite_rules()}
|
1989
|
-
* works on the new permastruct.
|
1990
|
-
*
|
1991
|
-
* @since 2.5.0
|
1992
|
-
* @access public
|
1993
|
-
*
|
1994
|
-
* @param string $name Name for permalink structure.
|
1995
|
-
* @param string $struct Permalink structure (e.g. category/%category%)
|
1996
|
-
* @param array $args Optional configuration for building the rules from the permalink structure:
|
1997
|
-
* - with_front (bool) - Should the structure be prepended with WP_Rewrite::$front? Default is true.
|
1998
|
-
* - ep_mask (int) - Endpoint mask defining what endpoints are added to the structure. Default is EP_NONE.
|
1999
|
-
* - paged (bool) - Should archive pagination rules be added for the structure? Default is true.
|
2000
|
-
* - feed (bool) - Should feed rewrite rules be added for the structure? Default is true.
|
2001
|
-
* - forcomments (bool) - Should the feed rules be a query for a comments feed? Default is false.
|
2002
|
-
* - walk_dirs (bool) - Should the 'directories' making up the structure be walked over and rewrite
|
2003
|
-
* rules built for each in turn? Default is true.
|
2004
|
-
* - endpoints (bool) - Should endpoints be applied to the generated rewrite rules? Default is true.
|
2005
|
-
*/
|
2006
|
-
public function add_permastruct( $name, $struct, $args = array() ) {
|
2007
|
-
// backwards compatibility for the old parameters: $with_front and $ep_mask
|
2008
|
-
if ( ! is_array( $args ) )
|
2009
|
-
$args = array( 'with_front' => $args );
|
2010
|
-
if ( func_num_args() == 4 )
|
2011
|
-
$args['ep_mask'] = func_get_arg( 3 );
|
2012
|
-
|
2013
|
-
$defaults = array(
|
2014
|
-
'with_front' => true,
|
2015
|
-
'ep_mask' => EP_NONE,
|
2016
|
-
'paged' => true,
|
2017
|
-
'feed' => true,
|
2018
|
-
'forcomments' => false,
|
2019
|
-
'walk_dirs' => true,
|
2020
|
-
'endpoints' => true,
|
2021
|
-
);
|
2022
|
-
$args = array_intersect_key( $args, $defaults );
|
2023
|
-
$args = wp_parse_args( $args, $defaults );
|
2024
|
-
|
2025
|
-
if ( $args['with_front'] )
|
2026
|
-
$struct = $this->front . $struct;
|
2027
|
-
else
|
2028
|
-
$struct = $this->root . $struct;
|
2029
|
-
$args['struct'] = $struct;
|
2030
|
-
|
2031
|
-
$this->extra_permastructs[ $name ] = $args;
|
2032
|
-
}
|
2033
|
-
|
2034
|
-
/**
|
2035
|
-
* Remove rewrite rules and then recreate rewrite rules.
|
2036
|
-
*
|
2037
|
-
* Calls {@link WP_Rewrite::wp_rewrite_rules()} after removing the
|
2038
|
-
* 'rewrite_rules' option. If the function named 'save_mod_rewrite_rules'
|
2039
|
-
* exists, it will be called.
|
2040
|
-
*
|
2041
|
-
* @since 2.0.1
|
2042
|
-
* @access public
|
2043
|
-
* @param bool $hard Whether to update .htaccess (hard flush) or just update rewrite_rules option (soft flush). Default is true (hard).
|
2044
|
-
*/
|
2045
|
-
public function flush_rules($hard = true) {
|
2046
|
-
delete_option('rewrite_rules');
|
2047
|
-
$this->wp_rewrite_rules();
|
2048
|
-
/**
|
2049
|
-
* Filter whether a "hard" rewrite rule flush should be performed when requested.
|
2050
|
-
*
|
2051
|
-
* A "hard" flush updates .htaccess (Apache) or web.config (IIS).
|
2052
|
-
*
|
2053
|
-
* @since 3.7.0
|
2054
|
-
*
|
2055
|
-
* @param bool $hard Whether to flush rewrite rules "hard". Default true.
|
2056
|
-
*/
|
2057
|
-
if ( ! $hard || ! apply_filters( 'flush_rewrite_rules_hard', true ) ) {
|
2058
|
-
return;
|
2059
|
-
}
|
2060
|
-
if ( function_exists( 'save_mod_rewrite_rules' ) )
|
2061
|
-
save_mod_rewrite_rules();
|
2062
|
-
if ( function_exists( 'iis7_save_url_rewrite_rules' ) )
|
2063
|
-
iis7_save_url_rewrite_rules();
|
2064
|
-
}
|
2065
|
-
|
2066
|
-
/**
|
2067
|
-
* Sets up the object's properties.
|
2068
|
-
*
|
2069
|
-
* The 'use_verbose_page_rules' object property will be set to true if the
|
2070
|
-
* permalink structure begins with one of the following: '%postname%', '%category%',
|
2071
|
-
* '%tag%', or '%author%'.
|
2072
|
-
*
|
2073
|
-
* @since 1.5.0
|
2074
|
-
* @access public
|
2075
|
-
*/
|
2076
|
-
public function init() {
|
2077
|
-
$this->extra_rules = $this->non_wp_rules = $this->endpoints = array();
|
2078
|
-
$this->permalink_structure = get_option('permalink_structure');
|
2079
|
-
$this->front = substr($this->permalink_structure, 0, strpos($this->permalink_structure, '%'));
|
2080
|
-
$this->root = '';
|
2081
|
-
if ( $this->using_index_permalinks() )
|
2082
|
-
$this->root = $this->index . '/';
|
2083
|
-
unset($this->author_structure);
|
2084
|
-
unset($this->date_structure);
|
2085
|
-
unset($this->page_structure);
|
2086
|
-
unset($this->search_structure);
|
2087
|
-
unset($this->feed_structure);
|
2088
|
-
unset($this->comment_feed_structure);
|
2089
|
-
$this->use_trailing_slashes = ( '/' == substr($this->permalink_structure, -1, 1) );
|
2090
|
-
|
2091
|
-
// Enable generic rules for pages if permalink structure doesn't begin with a wildcard.
|
2092
|
-
if ( preg_match("/^[^%]*%(?:postname|category|tag|author)%/", $this->permalink_structure) )
|
2093
|
-
$this->use_verbose_page_rules = true;
|
2094
|
-
else
|
2095
|
-
$this->use_verbose_page_rules = false;
|
2096
|
-
}
|
2097
|
-
|
2098
|
-
/**
|
2099
|
-
* Set the main permalink structure for the blog.
|
2100
|
-
*
|
2101
|
-
* Will update the 'permalink_structure' option, if there is a difference
|
2102
|
-
* between the current permalink structure and the parameter value. Calls
|
2103
|
-
* {@link WP_Rewrite::init()} after the option is updated.
|
2104
|
-
*
|
2105
|
-
* Fires the 'permalink_structure_changed' action once the init call has
|
2106
|
-
* processed passing the old and new values
|
2107
|
-
*
|
2108
|
-
* @since 1.5.0
|
2109
|
-
* @access public
|
2110
|
-
*
|
2111
|
-
* @param string $permalink_structure Permalink structure.
|
2112
|
-
*/
|
2113
|
-
public function set_permalink_structure($permalink_structure) {
|
2114
|
-
if ( $permalink_structure != $this->permalink_structure ) {
|
2115
|
-
$old_permalink_structure = $this->permalink_structure;
|
2116
|
-
update_option('permalink_structure', $permalink_structure);
|
2117
|
-
$this->init();
|
2118
|
-
|
2119
|
-
/**
|
2120
|
-
* Fires after the permalink structure is updated.
|
2121
|
-
*
|
2122
|
-
* @since 2.8.0
|
2123
|
-
*
|
2124
|
-
* @param string $old_permalink_structure The previous permalink structure.
|
2125
|
-
* @param string $permalink_structure The new permalink structure.
|
2126
|
-
*/
|
2127
|
-
do_action( 'permalink_structure_changed', $old_permalink_structure, $permalink_structure );
|
2128
|
-
}
|
2129
|
-
}
|
2130
|
-
|
2131
|
-
/**
|
2132
|
-
* Set the category base for the category permalink.
|
2133
|
-
*
|
2134
|
-
* Will update the 'category_base' option, if there is a difference between
|
2135
|
-
* the current category base and the parameter value. Calls
|
2136
|
-
* {@link WP_Rewrite::init()} after the option is updated.
|
2137
|
-
*
|
2138
|
-
* @since 1.5.0
|
2139
|
-
* @access public
|
2140
|
-
*
|
2141
|
-
* @param string $category_base Category permalink structure base.
|
2142
|
-
*/
|
2143
|
-
public function set_category_base($category_base) {
|
2144
|
-
if ( $category_base != get_option('category_base') ) {
|
2145
|
-
update_option('category_base', $category_base);
|
2146
|
-
$this->init();
|
2147
|
-
}
|
2148
|
-
}
|
2149
|
-
|
2150
|
-
/**
|
2151
|
-
* Set the tag base for the tag permalink.
|
2152
|
-
*
|
2153
|
-
* Will update the 'tag_base' option, if there is a difference between the
|
2154
|
-
* current tag base and the parameter value. Calls
|
2155
|
-
* {@link WP_Rewrite::init()} after the option is updated.
|
2156
|
-
*
|
2157
|
-
* @since 2.3.0
|
2158
|
-
* @access public
|
2159
|
-
*
|
2160
|
-
* @param string $tag_base Tag permalink structure base.
|
2161
|
-
*/
|
2162
|
-
public function set_tag_base( $tag_base ) {
|
2163
|
-
if ( $tag_base != get_option( 'tag_base') ) {
|
2164
|
-
update_option( 'tag_base', $tag_base );
|
2165
|
-
$this->init();
|
2166
|
-
}
|
2167
|
-
}
|
2168
|
-
|
2169
|
-
/**
|
2170
|
-
* Constructor - Calls init(), which runs setup.
|
2171
|
-
*
|
2172
|
-
* @since 1.5.0
|
2173
|
-
* @access public
|
2174
|
-
*
|
2175
|
-
* @return WP_Rewrite
|
2176
|
-
*/
|
2177
|
-
public function __construct() {
|
2178
|
-
$this->init();
|
2179
|
-
}
|
2180
|
-
}
|