Skip to content

Commit

Permalink
remove wp-specific stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
sepiariver committed Oct 14, 2016
1 parent 013d3ae commit afc0b0b
Show file tree
Hide file tree
Showing 15 changed files with 10 additions and 1,042 deletions.
13 changes: 0 additions & 13 deletions core/components/ampify/model/modx-amp/amp-frontend-actions.php

This file was deleted.

41 changes: 0 additions & 41 deletions core/components/ampify/model/modx-amp/amp-helper-functions.php

This file was deleted.

This file was deleted.

11 changes: 7 additions & 4 deletions core/components/ampify/model/modx-amp/class-amp-content.php
Expand Up @@ -2,7 +2,8 @@

require_once( AMP__DIR__ . '/includes/utils/class-amp-dom-utils.php' );
require_once( AMP__DIR__ . '/includes/sanitizers/class-amp-base-sanitizer.php' );
require_once( AMP__DIR__ . '/includes/embeds/class-amp-base-embed-handler.php' );
// Embed handlers are full of WP-specific stuff we can't use
//require_once( AMP__DIR__ . '/includes/embeds/class-amp-base-embed-handler.php' );

class AMP_Content {
private $content;
Expand Down Expand Up @@ -32,10 +33,12 @@ public function get_amp_scripts() {
private function transform() {
$content = $this->content;

/*
// First, embeds + the_content filter
$embed_handlers = $this->register_embed_handlers();
$this->unregister_embed_handlers( $embed_handlers );

*/

// Then, sanitize to strip and/or convert non-amp content
$content = $this->sanitize( $content );

Expand All @@ -45,7 +48,7 @@ private function transform() {
private function add_scripts( $scripts ) {
$this->amp_scripts = array_merge( $this->amp_scripts, $scripts );
}

/*
private function register_embed_handlers() {
$embed_handlers = array();
Expand All @@ -70,7 +73,7 @@ private function unregister_embed_handlers( $embed_handlers ) {
$embed_handler->unregister_embed();
}
}

*/
private function sanitize( $content ) {
$dom = AMP_DOM_Utils::get_dom_from_content( $content );

Expand Down

0 comments on commit afc0b0b

Please sign in to comment.