Code Monkey home page Code Monkey logo

axe's Introduction

Hi there ๐Ÿ‘‹

My name is Adam Patterson,

I'm a divergent thinker and a maker focusing my time on Development, Lead Generation, Product Analytics, and Customer Journey tracking.

I take extreme pride and ownership in the work that I do and over the past decade I have worked with Creative Agencies, Established Brands, Startups, Government, and the Auto Industry.

My passion is in connecting the dots, using new, existing, or creating integrations that bridge the gap. Testing and then making changes, Continually learning and making improvements.

Find me around the internet:

axe's People

Contributors

adampatterson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

axe's Issues

Update Handle to work with OOP and allow it to extend its parent theme

WordPress parent theme usually defines an action that calls a function. You wrap that function in function_exists() so that you can overwrite it in a child theme.

add_filter('the_title', 'markdown_title');
if ( ! function_exists('markdown_title')) {
    function markdown_title($post_title) {}
}

The Child theme simply sets a new function markdown_title()

Alternatively, you use OOP in the parent theme and then namespace everything nicely but are now you are using composer autoload in your parent theme and as well as your child theme creating another namespace for that theme and extending parent classes to adjust parent method functionality.

I have not tried this yet, and not many โ€œdeveloperโ€ themes cover this. But because it is namespaced and the scope of the actions and filters are typical $this or the namespace of another class. I would have to use __construct to register the actions which then presumably extend, call parent::__construct(); and hopefully the WordPress actions do their job and use the new method from the child theme.

namespace ParentTheme;
class myClass
{

    public function __construct()
    {
        add_filter('the_title', [$this, 'markdown_title']);
    }

    public function markdown_title($post_title)
    {
        // Make Markdown
    }
}

namespace ChildTheme;
class anotherClass extends myClass {
    public function __construct()
    {
        parent::__construct();
    }
    
    public function markdown_title($post_title)
    {
        // Make Awesome Markdown
    }
}

Actually, now that I look at this, I have no idea if it would work.

Need to add an Archive

Test Archives for custom post types

$post_type = get_post_type();
if ($post_type) {
    $post_type_data = get_post_type_object($post_type);
    $post_type_slug = $post_type_data->rewrite['slug'];
}

Import ACF Data from Child OR Parent

If using Axe as a core theme for a WordPress multisite it is likely that there will be ACF Data in the core that the child theme will need to leverage and synchronize.

At the moment, and updates done to the Core theme require the parent theme to be activated, ACF sync, then reactivates the child theme.

*note: edits to the parent theme data have to happen on the parent theme. If done through the child theme then that data ends up under the child theme.

Library structure changes

Axe is not meant to be used on its own but contains code that is required in child themes from some functionality to work.

Look at creating traits in the Axe theme that a child theme would use.

An example of this would be helper functions from ACF options pages or Multisite caching.

Gulp

Allow for SCSS

OOP the Lib code

Need to look at Handle and how some of the methods can be overwritten.

Support for Customizer

  • Background
  • #35 Header Graphics
  • #34 Enable or Disable a Sidebar
  • #44 Side bar on page, post, home
  • #42 Custom Fav Icon
  • #43 Custom Logo

Sidebars and Menus should be moved to the child theme, for demonstration, the built-up child theme.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.