The document discusses how to sell premium WordPress plugins while still complying with the GPL license. It proposes using authentication against a "mothership" server using XML-RPC to verify that users purchasing premium plugins are authorized. This allows charging for plugin updates and support while keeping the core plugin code open source under GPL. Code examples are provided of submitting authentication credentials from the plugin to the mothership server and validating them.
WordPress Admin UI - Future Proofing Your Admin PagesBrandon Dove
The document provides instructions for future-proofing WordPress admin pages by following best practices for creating, styling, and extending them. It demonstrates how to create an admin menu item and page callback function, add basic HTML markup and form elements, display tabular data using list tables, and customize the page icon. The document recommends using the Settings API to build settings pages and enqueueing custom styles to add styling and high-DPI icons.
Secure WordPress Development PracticesBrandon Dove
Keep user data secure by sanitizing all input and output, using nonces to verify requests, and whitelisting/blacklisting known safe data formats. Common attacks like XSS, CSRF and viruses can be prevented by escaping output, validating referrers, and using antivirus software. The document provides links to WordPress resources on data validation and security best practices.
This document is the HTML code for the homepage of the MAKE website. It includes metadata tags with descriptions of the site, scripts for analytics and advertisements, and links to other pages on the site like the blog, magazine, and Maker Faire events. The navigation bar at the top includes links to these key sections of the MAKE online presence.
jQuery is a JavaScript library that simplifies HTML document traversal, event handling, animating, and Ajax interactions. It allows you to write less code that does more. jQuery selects DOM elements using CSS-style selectors and provides methods for traversing, manipulating, and animating elements. Some key benefits of jQuery include writing concise code, cross-browser compatibility, and a large ecosystem of plugins.
This document discusses Devise, a flexible authentication solution for Rails applications. Devise allows authentication through username/password, OAuth, and other mechanisms. It follows the MVC pattern and integrates fully with Rails. Devise provides modules for common authentication needs like confirmable, recoverable, and lockable users. The document also provides instructions for installing Devise and generating Devise views and models. It demonstrates configuring Devise authentication in controllers and adding Devise authentication to tests.
This document provides an overview of using WordPress and AJAX. It discusses loading scripts and styles properly, using JavaScript localization to capture dynamic PHP content, page detection techniques, the wp_ajax action for handling AJAX requests, and the WP_Ajax_Response class for returning XML responses from AJAX callbacks. It also provides an example of building an AJAX registration form plugin with classes for handling the form, scripts, and styles.
FITC events. For digital creators.
Save 10% off ANY FITC event with discount code 'slideshare'
See our upcoming events at www.fitc.ca
A Journey with React
with Tasveer Singh
OVERVIEW
React has been receiving a lot of buzz lately but does it live up to it? Taz was curious about this exact question and decided to embark on a journey to find out more. Since then he has fallen in love with React, its simple paradigm, and what it has enabled him to do. From modelling large front-end applications with Flux and WebPack code splitting to search engine optimized isomorphic rendering, he really has explored React from one end to the other and will share his experience and insights with you along with tips and tricks along the way.
OBJECTIVE
To provide the audience with enough information to understand how React is different and to explore further.
TARGET AUDIENCE
Intermediate to Advanced JavaScript developers.
ASSUMED AUDIENCE KNOWLEDGE
Basic knowledge of client side JavaScript frameworks, JavaScript modules, ES6, asset management, SEO, and isomorphic JavaScript.
FIVE THINGS AUDIENCE MEMBERS WILL LEARN
What is React
How React is different
Pros and Cons of a Flux architecture
Pros and Cons of WebPack
Pros and Cons of Isomorphic JavaScript
WordPress Admin UI - Future Proofing Your Admin PagesBrandon Dove
The document provides instructions for future-proofing WordPress admin pages by following best practices for creating, styling, and extending them. It demonstrates how to create an admin menu item and page callback function, add basic HTML markup and form elements, display tabular data using list tables, and customize the page icon. The document recommends using the Settings API to build settings pages and enqueueing custom styles to add styling and high-DPI icons.
Secure WordPress Development PracticesBrandon Dove
Keep user data secure by sanitizing all input and output, using nonces to verify requests, and whitelisting/blacklisting known safe data formats. Common attacks like XSS, CSRF and viruses can be prevented by escaping output, validating referrers, and using antivirus software. The document provides links to WordPress resources on data validation and security best practices.
This document is the HTML code for the homepage of the MAKE website. It includes metadata tags with descriptions of the site, scripts for analytics and advertisements, and links to other pages on the site like the blog, magazine, and Maker Faire events. The navigation bar at the top includes links to these key sections of the MAKE online presence.
jQuery is a JavaScript library that simplifies HTML document traversal, event handling, animating, and Ajax interactions. It allows you to write less code that does more. jQuery selects DOM elements using CSS-style selectors and provides methods for traversing, manipulating, and animating elements. Some key benefits of jQuery include writing concise code, cross-browser compatibility, and a large ecosystem of plugins.
This document discusses Devise, a flexible authentication solution for Rails applications. Devise allows authentication through username/password, OAuth, and other mechanisms. It follows the MVC pattern and integrates fully with Rails. Devise provides modules for common authentication needs like confirmable, recoverable, and lockable users. The document also provides instructions for installing Devise and generating Devise views and models. It demonstrates configuring Devise authentication in controllers and adding Devise authentication to tests.
This document provides an overview of using WordPress and AJAX. It discusses loading scripts and styles properly, using JavaScript localization to capture dynamic PHP content, page detection techniques, the wp_ajax action for handling AJAX requests, and the WP_Ajax_Response class for returning XML responses from AJAX callbacks. It also provides an example of building an AJAX registration form plugin with classes for handling the form, scripts, and styles.
FITC events. For digital creators.
Save 10% off ANY FITC event with discount code 'slideshare'
See our upcoming events at www.fitc.ca
A Journey with React
with Tasveer Singh
OVERVIEW
React has been receiving a lot of buzz lately but does it live up to it? Taz was curious about this exact question and decided to embark on a journey to find out more. Since then he has fallen in love with React, its simple paradigm, and what it has enabled him to do. From modelling large front-end applications with Flux and WebPack code splitting to search engine optimized isomorphic rendering, he really has explored React from one end to the other and will share his experience and insights with you along with tips and tricks along the way.
OBJECTIVE
To provide the audience with enough information to understand how React is different and to explore further.
TARGET AUDIENCE
Intermediate to Advanced JavaScript developers.
ASSUMED AUDIENCE KNOWLEDGE
Basic knowledge of client side JavaScript frameworks, JavaScript modules, ES6, asset management, SEO, and isomorphic JavaScript.
FIVE THINGS AUDIENCE MEMBERS WILL LEARN
What is React
How React is different
Pros and Cons of a Flux architecture
Pros and Cons of WebPack
Pros and Cons of Isomorphic JavaScript
This document provides an overview of a 2-day course on developing plugins for Movable Type. Day 1 covers the basics of plugin structure, the Movable Type registry, configuration directives, template tags, objects, and callbacks. Day 2 focuses on building user interfaces through menus, application screens, dialogs, and listing screens. The document provides examples and explanations of YAML syntax, configuration directives, template tags, and other concepts needed to develop Movable Type plugins.
Reviews the basis of using JavaScript within WordPress. How to load in scripts correctly and move PHP data into JavaScripts for later use. Presented at WordCamp LA 2012
There's always a gap between theoretical knowledge and practice. Particularly, how to start you first web project when you are familiar with HTML, JS, and CSS. This presentation covers such aspects as project functionality, modeling, file organization, building initial layout with HTML, insights of CSS, and jQuery.
This document summarizes various features and APIs available for mobile web development. It discusses viewport meta tags, touch events, gesture events, media queries, and device features like the device pixel ratio and connection type. It also lists some popular mobile JavaScript libraries. The document provides code examples for touch, gesture, and device motion events.
This document discusses various Rails concepts and tools including MVC, ActiveRecord, templates/helpers, libraries/plugins, deployment, and internationalization. It provides code examples for features like validations, callbacks, counter caches, named scopes, STI, polymorphic associations, pagination, Ajax forms, and exception handling. Various plugins are described like attachment_fu, acts_as_taggable, will_paginate, and facebox_render for adding functionality. Deployment topics covered include mailers, exception tracking, and Capistrano.
Checkout Customizations in Magento 2 - MageTitansMCR 2017Max Pronko
Checkout is probably one of the complex implementations in Magento 2. It is a crucial part of the eCommerce platform and importance of high-quality customizations cannot be underestimated. We will go through code examples on how to extend checkout functionality in the way that complies with the Magento 2 best practices.
This document discusses various approaches to integrating third-party authentication with WordPress. It outlines single-factor and two-factor authentication options like username/password, LDAP, Active Directory, and OAuth. It recommends using the authenticate filter hook to add custom authentication handlers. Examples are provided to authenticate via OpenID and replace the default wp_authenticate function. Resources for further information on authentication in WordPress are also listed.
jQuery Presentation to Rails DevelopersYehuda Katz
This document summarizes jQuery, an open-source JavaScript library that simplifies HTML and JavaScript interactions. It discusses jQuery's features like DOM manipulation, events, effects, and AJAX capabilities. It also covers how to use jQuery with Ruby on Rails, including responding to Ajax requests and placing JavaScript code. The document advocates separating JavaScript behavior from HTML/CSS for maintainability.
The document discusses different approaches to handling JavaScript and AJAX functionality in Rails applications. It begins by showing how to use Rails' remote_form_for helper to generate JavaScript and AJAX code inline. It then demonstrates how to handle AJAX requests by binding JavaScript directly. The document also explores using JSON to return data from the server and the RJS format for generating JavaScript responses. Overall it provides examples of incrementally moving away from Rails' default JavaScript handling towards binding JavaScript directly.
Create a mobile web app with Sencha TouchJames Pearce
Sencha Touch is a JavaScript framework for building rich mobile web apps using HTML5 standards. It provides various UI components like lists, forms, charts and tools for building common app patterns. The framework allows developers to structure their app, lay out the user interface with panels, toolbars and lists, model and load data to populate the UI, and customize the visual theme. Sencha Touch apps can be built to work across multiple mobile devices using only web technologies.
Web Components are a set of four specifications that allow developers to create reusable custom elements. They include HTML Imports for including HTML in other pages, Shadow DOM for encapsulation, Template for reusable DOM templates, and Custom Elements for defining new HTML elements. While browser support is still limited, libraries like Polymer, X-Tag, and Bosonic provide polyfills to bring Web Components to all browsers.
Creating the interfaces of the future with the APIs of todaygerbille
The document discusses creating futuristic interfaces using web technologies like WebSockets, WebGL, and device APIs. It provides examples of syncing device orientation over WebSockets between clients, accessing the device camera with getUserMedia, and using head tracking with headtrackr.js to control the camera in a 3D scene rendered with three.js. Links are included for related projects on Wiimote control, head tracking examples, and touch tracking demos.
This document provides instructions on converting a Photoshop (PSD) design into a WordPress theme. It explains that you should visualize how the PSD design will translate to HTML elements like headers, menus, content areas, etc. before beginning to code. Key areas covered include using an existing framework versus coding from scratch, including necessary WordPress functions and files, and organizing code into templates, functions.php, and other standard WordPress theme files. The goal is to understand the technical structure of the design and properly structure the theme code.
The important parts of the front end development sphere including CSS3, advanced JavaScript, libraries such as jQuery, RequireJS and Promises. And finally, chrome developer tools for successful debugging and editing.
You're Doing it Wrong - WordCamp OrlandoChris Scott
The document discusses various ways that developers commonly do things wrong when working with WordPress. It provides examples of wrong code patterns and anti-patterns compared to better right ways of doing things, such as properly validating and escaping user input, using WordPress helper functions and classes instead of globals, enqueueing scripts and styles rather than directly echoing them, and contributing back to the WordPress community.
Why and when you need end-to-end tests, a spooky story with a 15 years software beast, and how to develop concise, maintainable functional tests using Groovy, Spock and Geb.
Single Page Web Applications with CoffeeScript, Backbone and JasminePaulo Ragonha
This document discusses using CoffeeScript, Backbone.js, and Jasmine BDD to build single page web applications. It begins by explaining why CoffeeScript is useful for cleaning up JavaScript code and avoiding errors. It then discusses how Backbone.js provides structure for single page apps by defining models, collections, views and routers. It notes that Backbone works well with CoffeeScript. Finally, it mentions that Jasmine BDD can be used for writing professional tests.
This document provides an overview of Mozilla Web Apps including:
- Web Apps can run on platforms like Windows, Mac, Android and more.
- They are built with open web technologies like HTML5, CSS, and JavaScript.
- A manifest file is needed to define the app and install it using the Mozilla Labs App Runtime extension.
- Web Apps can use features like offline storage, IndexedDB, and fullscreen mode.
The document discusses various topics related to building components in Vue.js, including:
1. Organizing components in a tree structure and building single-file components with templates, scripts, and styles.
2. Using props to pass data between components and define prop types and default values.
3. Rendering lists of components with v-for and emitting and listening for events with v-on.
4. Adding two-way data binding with v-model and using slots to allow content in child components.
5. Integrating Vue components with Blade templates by including Blade views in Vue components and rendering Vue components conditionally.
Keeping the frontend under control with Symfony and WebpackIgnacio Martín
Webpack tutorial with tips for Symfony users. Topics covered include: current frontend trends, setup, loaders, dev tools, optimization in production, bundle splitting and tips and tricks for using webpack with existing projects.
Symfony Munich Meetup 2016.
The document discusses how iThemes improved their workflow and saved hundreds of hours by automating processes like version control, zip file creation, and uploading using tools like Git. They found that automating tasks like checking for changes from other developers, creating consistent zip files, and uploading releases saved significant time and reduced errors. The automation system has now been in place for three years, handling over 7,000 version updates and allowing the small team to be more productive while expanding.
This document provides an overview of a 2-day course on developing plugins for Movable Type. Day 1 covers the basics of plugin structure, the Movable Type registry, configuration directives, template tags, objects, and callbacks. Day 2 focuses on building user interfaces through menus, application screens, dialogs, and listing screens. The document provides examples and explanations of YAML syntax, configuration directives, template tags, and other concepts needed to develop Movable Type plugins.
Reviews the basis of using JavaScript within WordPress. How to load in scripts correctly and move PHP data into JavaScripts for later use. Presented at WordCamp LA 2012
There's always a gap between theoretical knowledge and practice. Particularly, how to start you first web project when you are familiar with HTML, JS, and CSS. This presentation covers such aspects as project functionality, modeling, file organization, building initial layout with HTML, insights of CSS, and jQuery.
This document summarizes various features and APIs available for mobile web development. It discusses viewport meta tags, touch events, gesture events, media queries, and device features like the device pixel ratio and connection type. It also lists some popular mobile JavaScript libraries. The document provides code examples for touch, gesture, and device motion events.
This document discusses various Rails concepts and tools including MVC, ActiveRecord, templates/helpers, libraries/plugins, deployment, and internationalization. It provides code examples for features like validations, callbacks, counter caches, named scopes, STI, polymorphic associations, pagination, Ajax forms, and exception handling. Various plugins are described like attachment_fu, acts_as_taggable, will_paginate, and facebox_render for adding functionality. Deployment topics covered include mailers, exception tracking, and Capistrano.
Checkout Customizations in Magento 2 - MageTitansMCR 2017Max Pronko
Checkout is probably one of the complex implementations in Magento 2. It is a crucial part of the eCommerce platform and importance of high-quality customizations cannot be underestimated. We will go through code examples on how to extend checkout functionality in the way that complies with the Magento 2 best practices.
This document discusses various approaches to integrating third-party authentication with WordPress. It outlines single-factor and two-factor authentication options like username/password, LDAP, Active Directory, and OAuth. It recommends using the authenticate filter hook to add custom authentication handlers. Examples are provided to authenticate via OpenID and replace the default wp_authenticate function. Resources for further information on authentication in WordPress are also listed.
jQuery Presentation to Rails DevelopersYehuda Katz
This document summarizes jQuery, an open-source JavaScript library that simplifies HTML and JavaScript interactions. It discusses jQuery's features like DOM manipulation, events, effects, and AJAX capabilities. It also covers how to use jQuery with Ruby on Rails, including responding to Ajax requests and placing JavaScript code. The document advocates separating JavaScript behavior from HTML/CSS for maintainability.
The document discusses different approaches to handling JavaScript and AJAX functionality in Rails applications. It begins by showing how to use Rails' remote_form_for helper to generate JavaScript and AJAX code inline. It then demonstrates how to handle AJAX requests by binding JavaScript directly. The document also explores using JSON to return data from the server and the RJS format for generating JavaScript responses. Overall it provides examples of incrementally moving away from Rails' default JavaScript handling towards binding JavaScript directly.
Create a mobile web app with Sencha TouchJames Pearce
Sencha Touch is a JavaScript framework for building rich mobile web apps using HTML5 standards. It provides various UI components like lists, forms, charts and tools for building common app patterns. The framework allows developers to structure their app, lay out the user interface with panels, toolbars and lists, model and load data to populate the UI, and customize the visual theme. Sencha Touch apps can be built to work across multiple mobile devices using only web technologies.
Web Components are a set of four specifications that allow developers to create reusable custom elements. They include HTML Imports for including HTML in other pages, Shadow DOM for encapsulation, Template for reusable DOM templates, and Custom Elements for defining new HTML elements. While browser support is still limited, libraries like Polymer, X-Tag, and Bosonic provide polyfills to bring Web Components to all browsers.
Creating the interfaces of the future with the APIs of todaygerbille
The document discusses creating futuristic interfaces using web technologies like WebSockets, WebGL, and device APIs. It provides examples of syncing device orientation over WebSockets between clients, accessing the device camera with getUserMedia, and using head tracking with headtrackr.js to control the camera in a 3D scene rendered with three.js. Links are included for related projects on Wiimote control, head tracking examples, and touch tracking demos.
This document provides instructions on converting a Photoshop (PSD) design into a WordPress theme. It explains that you should visualize how the PSD design will translate to HTML elements like headers, menus, content areas, etc. before beginning to code. Key areas covered include using an existing framework versus coding from scratch, including necessary WordPress functions and files, and organizing code into templates, functions.php, and other standard WordPress theme files. The goal is to understand the technical structure of the design and properly structure the theme code.
The important parts of the front end development sphere including CSS3, advanced JavaScript, libraries such as jQuery, RequireJS and Promises. And finally, chrome developer tools for successful debugging and editing.
You're Doing it Wrong - WordCamp OrlandoChris Scott
The document discusses various ways that developers commonly do things wrong when working with WordPress. It provides examples of wrong code patterns and anti-patterns compared to better right ways of doing things, such as properly validating and escaping user input, using WordPress helper functions and classes instead of globals, enqueueing scripts and styles rather than directly echoing them, and contributing back to the WordPress community.
Why and when you need end-to-end tests, a spooky story with a 15 years software beast, and how to develop concise, maintainable functional tests using Groovy, Spock and Geb.
Single Page Web Applications with CoffeeScript, Backbone and JasminePaulo Ragonha
This document discusses using CoffeeScript, Backbone.js, and Jasmine BDD to build single page web applications. It begins by explaining why CoffeeScript is useful for cleaning up JavaScript code and avoiding errors. It then discusses how Backbone.js provides structure for single page apps by defining models, collections, views and routers. It notes that Backbone works well with CoffeeScript. Finally, it mentions that Jasmine BDD can be used for writing professional tests.
This document provides an overview of Mozilla Web Apps including:
- Web Apps can run on platforms like Windows, Mac, Android and more.
- They are built with open web technologies like HTML5, CSS, and JavaScript.
- A manifest file is needed to define the app and install it using the Mozilla Labs App Runtime extension.
- Web Apps can use features like offline storage, IndexedDB, and fullscreen mode.
The document discusses various topics related to building components in Vue.js, including:
1. Organizing components in a tree structure and building single-file components with templates, scripts, and styles.
2. Using props to pass data between components and define prop types and default values.
3. Rendering lists of components with v-for and emitting and listening for events with v-on.
4. Adding two-way data binding with v-model and using slots to allow content in child components.
5. Integrating Vue components with Blade templates by including Blade views in Vue components and rendering Vue components conditionally.
Keeping the frontend under control with Symfony and WebpackIgnacio Martín
Webpack tutorial with tips for Symfony users. Topics covered include: current frontend trends, setup, loaders, dev tools, optimization in production, bundle splitting and tips and tricks for using webpack with existing projects.
Symfony Munich Meetup 2016.
The document discusses how iThemes improved their workflow and saved hundreds of hours by automating processes like version control, zip file creation, and uploading using tools like Git. They found that automating tasks like checking for changes from other developers, creating consistent zip files, and uploading releases saved significant time and reduced errors. The automation system has now been in place for three years, handling over 7,000 version updates and allowing the small team to be more productive while expanding.
This document provides an overview of common poor coding practices in WordPress development that can negatively impact compatibility and user experience. It discusses examples like directly modifying core WordPress scripts, directly printing scripts and stylesheets rather than using the enqueue system, and encourages developers to avoid these practices to prevent breaking other plugins, themes or WordPress itself. The presentation aims to make developers aware of these issues and how to develop code that is more considerate of other code on the site.
The document discusses the history and features of plugins in WordPress. It defines what a plugin is and explains that plugins can enhance WordPress functionality by adding features like SEO, spam filtering, backups, and more. The document notes there are over 18,000 plugins available and provides tips for installing, troubleshooting, and removing plugins. It recommends several popular plugins including Akismet, Jetpack, backup plugins, caching plugins, SEO plugins, and others.
Using a Private Git Server for Packaging SoftwareChris Jean
This document discusses using a private Git server and hooks to enable automated software packaging, deployment, testing, and more for a team developing WordPress plugins and themes. It describes problems with previous collaboration and hosting solutions, and how using Git and a self-hosted Git server like Gitosis along with post-receive hooks solves these problems by enabling features like automated packaging into zip files, deployment to servers and S3, unit testing, and more without manual steps.
The document provides guidelines for technical requirements and formatting best practices for websites to be included and rank well in Google News search results. It discusses requirements for article URLs, domains, languages, and formats. It also covers submitting a News Sitemap to Google and how frequently sites should be updated. Following these guidelines will help websites optimize their content for inclusion in Google News aggregation.
The document proposes creating a standardized loop API for WordPress that allows plugins to replace a theme's default loop content, similar to how widgets can replace sidebar content, in order to make it easier for themes and plugins to interact and style each other's content without extensive custom coding. It outlines registering callback functions, calling dynamic loop handlers, and establishing common HTML and class structures to provide styling foundations for replacement loop content from plugins.
Using PHP Functions! (Not those functions, Google Cloud Functions)Chris Tankersley
Serverless computing has taken web development by storm, and Google has recently updated their Google Cloud Functions to support PHP 7.4! We'll walk through setting up a function and how it all works.
This document provides an introduction to HTML enhanced for web apps using AngularJS. It discusses key AngularJS concepts like templates (directives), controllers, dependency injection, services, filters, models, configuration, routing, resources and testing. Directives allow HTML to be extended with new attributes and elements. Controllers contain business logic. Dependency injection provides dependencies to controllers and services. Filters transform displayed data. Models represent application data. Configuration sets up modules. Routing maps URLs to templates. Resources interact with RESTful APIs. Testing ensures code works as expected.
This document summarizes a presentation about deploying millions of emails per hour using cloud-based CI/CD practices. It discusses using App Engine and SendGrid for email delivery infrastructure, integrating CI (continuous integration) and CD (continuous delivery) with tools like Gitlab, Cloud Source Repositories, and Stackdriver Debugger. It also provides a demo of these practices and learning resources for email deliverability best practices, SendGrid documentation, and GCP services like Cloud Source Repositories and Stackdriver Debugger.
The document discusses hexagonal architecture and its advantages for building maintainable software. It explains that hexagonal architecture divides a system into loosely coupled components like the application core and interfaces. This decouples the code and allows changes in one part to affect few other places. Ports act as contracts between components, with input and output ports. Adapters provide implementations for the ports. Benefits include increased testability, ability to update frameworks without impacting the domain, and postponing technical decisions. The document provides an example of applying hexagonal architecture with Symfony. It recommends starting with decoupling legacy code using interfaces, dependency injection, and other best practices when refactoring.
Using Geeklog as a Web Application FrameworkDirk Haun
Slides for the workshop "Using Geeklog as a Web Application Framework", as held at
- LinuxTag 2006, Wiesbaden, Germany, 2006-05-06
- PHP user group meeting, Stuttgart, Germany, 2006-05-10
- FrOSCon, Bonn, Germany, 2006-06-24
Optimizing AngularJS Application, that include with some useful best practices to in AngularJS. The best practices defined here is well stablished in Angular team itself and developers in community.
This document introduces and summarizes Django, an open-source web framework written in Python. It highlights key features of Django, including its automated administration interface, object-relational mapper (ORM), generic views, forms, URL configuration, templates, internationalization support, and built-in user authentication. The document also discusses how Django aims to minimize the time it takes to develop software through automation, reusable apps, and other features. Examples are provided of large sites built with Django to demonstrate its performance and scalability.
The document discusses approaches to designing REST APIs, including CRUD and Commanding patterns. CRUD uses standard HTTP verbs like GET, POST, PUT, DELETE on resource URLs to perform basic operations. Commanding adds verbs as endpoints to initiate actions on resources. For example, POST /barns/11/reroof to trigger roof repair. It recommends separating commands from queries using CQRS and following DDD principles to model the domain accurately in the API.
Presented at #PHPLX 11 September 2013
The 2013 edition of OWASP (Open Web Application Security Project) top 10 has just been released and unfortunately Injections (not only SQL injection) is still the most common security problem. In this talk we will review the top 10 list of security problems looking at possible attack scenarios and ways to protect against them mostly from a PHP programmer perspective.
Marko Heijnen discussed creating native mobile apps with WordPress. He explained that mobile is growing and developers may want to create native apps. The API currently uses XML-RPC but JSON is an alternative. Developers need to communicate with mobile developers to build an API and additional fields. Methods like getRecentPosts retrieve post data. Plugins like JSON API can be used to support JSON. Developers should return minimal data and cache responses. Special post types and admin pages can manage mobile content and push notifications. WordPress is flexible and can power mobile apps.
This document contains a presentation on dependency injection and dependency injection containers in PHP. It discusses why dependency injection is important for writing testable code and decoupling application components. It provides an example of how to refactor code to use dependency injection by passing dependencies through the constructor. It also demonstrates how to implement a basic dependency injection container and how modern PHP frameworks like Symfony use containers to manage dependencies. The presentation emphasizes that dependency injection containers should be used wisely and not overused.
This talk is about how my company took a broken e-commerce and LMS site written in an older style MVC framework and re-wrote a significant portion of it in Symfony and related tools (Doctrine, FOS Bundles, Sonata) over 6 months and created a stable, well-tested application.
There are a lot of tools available that can make developers life easier. Zend Server is one of them. The Zend products have come from a long way, but since the introduction of Zend Server the focus is more on a developers perspective than ever. The integrated tools make debugging, performance tuning, process offloading and deployment really accessible. Even extending it with your own needs is possible nowadays. The current PHP ecosystem gives every developer enormous amounts of power in creating applications without writing a lot of code.
In this talk I will show you how Zend Server can help you understand your own PHP application better, by using its tools to open the blackbox that your PHP application really is. This talk is not about selling Zend Server, but helping developers understand why reconsidering your development stack is always an option. Because in the end every developer likes to be a lazy developer.
This document summarizes Barry Kooij's presentation on plugin development. It discusses Barry's setup for plugin development using a MacBook Air, PhpStorm IDE, and Git version control. It also covers debugging, code templates, leveraging WordPress core APIs and hooks, database usage, unit testing, documentation, object-oriented patterns, internationalization, and taking questions.
Like many others, WordPress has been my personal blogging tool for a long time. A powerful tool for easy publishing! That is what everyone wants.
Large sites like TechCrunch and TheNextWeb use it exactly for that reason. And more enterprises seem to discover it as good solution to their too-expensive publication tools. But keeping those WordPress instances running requires skills and knowledge.
Because of WordPress extendibility and its very active community, you can do this too. This tutorial will teach you how use Ansible, Composer, WP-CLI, WP REST API, and Elasticsearch can push WordPress from a personal blogging tool into an enterprise-worthy level application. Out with FTP based SCM ... in with automated deployment, dependency management, and utterly fast search.
Security and Performance - Italian WordPress ConferenceMaurizio Pelizzone
The document is about an Italian WordPress conference in 2012. It discusses various topics around WordPress security and performance. Some of the key topics covered include protecting wp-login.php with .htaccess rules, changing the WordPress directory structure for security, using blackholing to block bots, monitoring files for changes, avoiding FTP, using caching and transients, reducing plugins, minifying files, and using a CDN and server tuning.
This document provides an overview of AngularJS including that it is 100% JavaScript and client-side, uses an MVC pattern, and key concepts like data binding, templating, routing, and dependency injection. It also describes components like directives, controllers, services, and filters and includes code samples to demonstrate concepts like scopes, bindings, and organizing an Angular application.
The document discusses API design in PHP, focusing on Ning's PHP API. Some key points:
- Ning's PHP API provides a REST interface to its social networking platform and has been in use since 2005.
- The API is used for content storage, user profile management, tagging, search, and other functions.
- Good API design principles include making things predictable, modular, stable, and prioritizing human performance over computer performance.
- API design should be use case driven and additions should be easy while removals are hard. Names, versioning, and documentation are important.
1) DrupalGap allows developers to create mobile applications that connect to Drupal websites via web services using HTML, CSS and JavaScript.
2) It inherits Drupal concepts like modules, blocks, menus and entities to build mobile apps.
3) Additional functionality can be added through custom modules that integrate services, forms, and views to retrieve and display content from Drupal.
In the rapidly evolving landscape of technologies, XML continues to play a vital role in structuring, storing, and transporting data across diverse systems. The recent advancements in artificial intelligence (AI) present new methodologies for enhancing XML development workflows, introducing efficiency, automation, and intelligent capabilities. This presentation will outline the scope and perspective of utilizing AI in XML development. The potential benefits and the possible pitfalls will be highlighted, providing a balanced view of the subject.
We will explore the capabilities of AI in understanding XML markup languages and autonomously creating structured XML content. Additionally, we will examine the capacity of AI to enrich plain text with appropriate XML markup. Practical examples and methodological guidelines will be provided to elucidate how AI can be effectively prompted to interpret and generate accurate XML markup.
Further emphasis will be placed on the role of AI in developing XSLT, or schemas such as XSD and Schematron. We will address the techniques and strategies adopted to create prompts for generating code, explaining code, or refactoring the code, and the results achieved.
The discussion will extend to how AI can be used to transform XML content. In particular, the focus will be on the use of AI XPath extension functions in XSLT, Schematron, Schematron Quick Fixes, or for XML content refactoring.
The presentation aims to deliver a comprehensive overview of AI usage in XML development, providing attendees with the necessary knowledge to make informed decisions. Whether you’re at the early stages of adopting AI or considering integrating it in advanced XML development, this presentation will cover all levels of expertise.
By highlighting the potential advantages and challenges of integrating AI with XML development tools and languages, the presentation seeks to inspire thoughtful conversation around the future of XML development. We’ll not only delve into the technical aspects of AI-powered XML development but also discuss practical implications and possible future directions.
How to Get CNIC Information System with Paksim Ga.pptxdanishmna97
Pakdata Cf is a groundbreaking system designed to streamline and facilitate access to CNIC information. This innovative platform leverages advanced technology to provide users with efficient and secure access to their CNIC details.
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Infrastructure Challenges in Scaling RAG with Custom AI modelsZilliz
Building Retrieval-Augmented Generation (RAG) systems with open-source and custom AI models is a complex task. This talk explores the challenges in productionizing RAG systems, including retrieval performance, response synthesis, and evaluation. We’ll discuss how to leverage open-source models like text embeddings, language models, and custom fine-tuned models to enhance RAG performance. Additionally, we’ll cover how BentoML can help orchestrate and scale these AI components efficiently, ensuring seamless deployment and management of RAG systems in the cloud.
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
HCL Notes and Domino License Cost Reduction in the World of DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-and-domino-license-cost-reduction-in-the-world-of-dlau/
The introduction of DLAU and the CCB & CCX licensing model caused quite a stir in the HCL community. As a Notes and Domino customer, you may have faced challenges with unexpected user counts and license costs. You probably have questions on how this new licensing approach works and how to benefit from it. Most importantly, you likely have budget constraints and want to save money where possible. Don’t worry, we can help with all of this!
We’ll show you how to fix common misconfigurations that cause higher-than-expected user counts, and how to identify accounts which you can deactivate to save money. There are also frequent patterns that can cause unnecessary cost, like using a person document instead of a mail-in for shared mailboxes. We’ll provide examples and solutions for those as well. And naturally we’ll explain the new licensing model.
Join HCL Ambassador Marc Thomas in this webinar with a special guest appearance from Franz Walder. It will give you the tools and know-how to stay on top of what is going on with Domino licensing. You will be able lower your cost through an optimized configuration and keep it low going forward.
These topics will be covered
- Reducing license cost by finding and fixing misconfigurations and superfluous accounts
- How do CCB and CCX licenses really work?
- Understanding the DLAU tool and how to best utilize it
- Tips for common problem areas, like team mailboxes, functional/test users, etc
- Practical examples and best practices to implement right away
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
Building Production Ready Search Pipelines with Spark and MilvusZilliz
Spark is the widely used ETL tool for processing, indexing and ingesting data to serving stack for search. Milvus is the production-ready open-source vector database. In this talk we will show how to use Spark to process unstructured data to extract vector representations, and push the vectors to Milvus vector database for search serving.
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2024/06/building-and-scaling-ai-applications-with-the-nx-ai-manager-a-presentation-from-network-optix/
Robin van Emden, Senior Director of Data Science at Network Optix, presents the “Building and Scaling AI Applications with the Nx AI Manager,” tutorial at the May 2024 Embedded Vision Summit.
In this presentation, van Emden covers the basics of scaling edge AI solutions using the Nx tool kit. He emphasizes the process of developing AI models and deploying them globally. He also showcases the conversion of AI models and the creation of effective edge AI pipelines, with a focus on pre-processing, model conversion, selecting the appropriate inference engine for the target hardware and post-processing.
van Emden shows how Nx can simplify the developer’s life and facilitate a rapid transition from concept to production-ready applications.He provides valuable insights into developing scalable and efficient edge AI solutions, with a strong focus on practical implementation.
Programming Foundation Models with DSPy - Meetup SlidesZilliz
Prompting language models is hard, while programming language models is easy. In this talk, I will discuss the state-of-the-art framework DSPy for programming foundation models with its powerful optimizers and runtime constraint system.
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-und-domino-lizenzkostenreduzierung-in-der-welt-von-dlau/
DLAU und die Lizenzen nach dem CCB- und CCX-Modell sind für viele in der HCL-Community seit letztem Jahr ein heißes Thema. Als Notes- oder Domino-Kunde haben Sie vielleicht mit unerwartet hohen Benutzerzahlen und Lizenzgebühren zu kämpfen. Sie fragen sich vielleicht, wie diese neue Art der Lizenzierung funktioniert und welchen Nutzen sie Ihnen bringt. Vor allem wollen Sie sicherlich Ihr Budget einhalten und Kosten sparen, wo immer möglich. Das verstehen wir und wir möchten Ihnen dabei helfen!
Wir erklären Ihnen, wie Sie häufige Konfigurationsprobleme lösen können, die dazu führen können, dass mehr Benutzer gezählt werden als nötig, und wie Sie überflüssige oder ungenutzte Konten identifizieren und entfernen können, um Geld zu sparen. Es gibt auch einige Ansätze, die zu unnötigen Ausgaben führen können, z. B. wenn ein Personendokument anstelle eines Mail-Ins für geteilte Mailboxen verwendet wird. Wir zeigen Ihnen solche Fälle und deren Lösungen. Und natürlich erklären wir Ihnen das neue Lizenzmodell.
Nehmen Sie an diesem Webinar teil, bei dem HCL-Ambassador Marc Thomas und Gastredner Franz Walder Ihnen diese neue Welt näherbringen. Es vermittelt Ihnen die Tools und das Know-how, um den Überblick zu bewahren. Sie werden in der Lage sein, Ihre Kosten durch eine optimierte Domino-Konfiguration zu reduzieren und auch in Zukunft gering zu halten.
Diese Themen werden behandelt
- Reduzierung der Lizenzkosten durch Auffinden und Beheben von Fehlkonfigurationen und überflüssigen Konten
- Wie funktionieren CCB- und CCX-Lizenzen wirklich?
- Verstehen des DLAU-Tools und wie man es am besten nutzt
- Tipps für häufige Problembereiche, wie z. B. Team-Postfächer, Funktions-/Testbenutzer usw.
- Praxisbeispiele und Best Practices zum sofortigen Umsetzen
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc
How does your privacy program stack up against your peers? What challenges are privacy teams tackling and prioritizing in 2024?
In the fifth annual Global Privacy Benchmarks Survey, we asked over 1,800 global privacy professionals and business executives to share their perspectives on the current state of privacy inside and outside of their organizations. This year’s report focused on emerging areas of importance for privacy and compliance professionals, including considerations and implications of Artificial Intelligence (AI) technologies, building brand trust, and different approaches for achieving higher privacy competence scores.
See how organizational priorities and strategic approaches to data security and privacy are evolving around the globe.
This webinar will review:
- The top 10 privacy insights from the fifth annual Global Privacy Benchmarks Survey
- The top challenges for privacy leaders, practitioners, and organizations in 2024
- Key themes to consider in developing and maintaining your privacy program
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceIndexBug
Imagine a world where machines not only perform tasks but also learn, adapt, and make decisions. This is the promise of Artificial Intelligence (AI), a technology that's not just enhancing our lives but revolutionizing entire industries.
3. INTRO
‣ WORDPRESS PLUGIN & THEME DEVELOPER FOR PIXEL JAR
‣ WORDCAMP ORANGE COUNTY ORGANIZER
‣ LEAD DEVELOPER OF THE PREMIUM PLUGIN ADSANITY
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
4. WHAT WE’RE GOING TO COVER
‣ ONE DEVELOPER'S SOLUTION TO THIS PROBLEM (MINE)
‣ AUTHENTICATION AGAINST A “MOTHERSHIP” USING XML-RPC
‣ REAL, ACTUAL CODE – YOU'VE BEEN WARNED
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
5. SO, WHAT IS A PREMIUM PLUGIN?
A PLUGIN THAT
REQUIRES YOU TO PAY
FOR ACCESS TO CODE OR
THE DEVELOPER
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
6. JUST CAUSE YOU PAY FOR SOMETHING...
PREMIUM DOES NOT
ALWAYS MEAN BETTER
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
7. BUT WHAT ABOUT THE GPL?
DON’T ALL WORDPRESS
PLUGINS HAVE TO BE
OPEN SOURCE?
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
8. BUT WHAT ABOUT THE GPL?
< INSERT PHILOSOPHICAL
DEBATE HERE >
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
9. BUT WHAT ABOUT THE GPL?
YES*
*UNLESS YOU’RE A DIRTBAG
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
10. BUT WHAT ABOUT THE GPL?
UNDER THE GPL, CODE
CAN BE REDISTRIBUTED
AND/OR MODIFIED BY
ANYONE. END OF STORY.
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
11. MORE THAN ONE WAY TO SKIN A KITTEH
‣ DONATIONWARE
‣ FREEMIUM
‣ PAY ONCE FOR CODE
‣ SUBSCRIBE TO UPDATES & SUPPORT
‣ PROBABLY OTHERS...
HTTP://WHYEVOLUTIONISTRUE.WORDPRESS.COM/2010/05/29/CATURDAY-FELIDS-COOL-CATS/SHAVED-CAT-2/
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
12. SOME ASSUMPTIONS ON MY PART
‣ ENCODING = BAD
‣ YOU RESPECT THE GPL
‣ SUPPORTING USERS IS A FULL TIME JOB
‣ YOU NEED TO MAKE A LIVING
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
13. PREMIUM PLUGINS SHOULDN’T TAKE AWAY YOUR RIGHTS
ENCODING MAKES IT
HARD FOR USERS TO
CUSTOMIZE YOUR CODE
YOU ARE USING ACTIONS & FILTERS, RIGHT?
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
14. STOPPING PIRACY IS HARD
SOPA & PIPA SUCK
HTTP://WWW.MEMBERGUIDE.GPOACCESS.GOV/112/RP/SMITHLAMAR
JUST ASK LAMAR SMITH
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
15. AUTHENTICATION IS EASY
WITH AUTHENTICATION, WE CAN:
‣ CHARGE FOR SUPPORT & ACCESS TO UPDATES
‣ CHARGE FOR ADD-ONS
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
16. STANDARD PLUGIN WORKFLOW
‣ USER DOWNLOADS THE PLUGIN FROM THE WORDPRESS REPO
‣ USER INSTALLS/ACTIVATES THE PLUGIN
‣ DEVELOPER RELEASES AN UPDATE
‣ USER IS NOTIFIED OF THE UPDATE IN THE WORDPRESS DASHBOARD
‣ USER UPDATES THE PLUGIN
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
17. THE WORKFLOW
‣ CUSTOMER PURCHASES THE PLUGIN
‣ CUSTOMER DOWNLOADS THE PLUGIN FROM DEVELOPER’S SITE
‣ CUSTOMER INSTALLS/ACTIVATES THE PLUGIN
‣ DEVELOPER RELEASES AN UPDATE
‣ CUSTOMER IS NOTIFIED OF THE UPDATE IN THE WORDPRESS DASHBOARD
‣ IF CUSTOMER IS AUTHENTICATED
‣ CUSTOMER IS ALLOWED TO UPDATE THE PLUGIN
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
18. IN PRACTICAL TERMS,
HOW DO WE DO THAT?
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
19. STEP 1: MAKE A SWEET LOOKIN’ CHART
Plugin Authentication
2A
email Mothership
XMLRPC POST
password
Submit
auth
Success! 2B Oh Noes!
API Key IXR_Error
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
20. XML-RPC
COMMUNICATION
CHANNEL TO A REMOTE
SERVER USING XML
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
21. STEP 2A: SUBMIT CREDENTIALS TO THE MOTHERSHIP
gist.github.com/f3e2a1cbd7a3a7c693f2
// check against remote server
if( !class_exists( 'IXR_Client' ) )
require_once( ABSPATH.WPINC.'/class-IXR.php' );
$client = new IXR_Client( 'http://mothership.com/xmlrpc.php' );
$client_request_args = array(
'username' => $_POST['U'],
'password' => $_POST['P'],
'plugin' => 'plugin-slug.php',
'url' => site_url()
);
if ( !$client->query( 'pue.is_user_authorized', $client_request_args ) ) :
add_action( 'admin_notices', 'oh_noes' );
else :
// store the unique api key, and enable auto-updates
endif;
// handle the error
function oh_noes() {
global $client;
echo '<div class="error"><p>' . esc_html( $client->message->faultString ) . '</p></div>';
}
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
22. XML-RPC (PLUGIN)
if( !class_exists( 'IXR_Client' ) )
require_once( ABSPATH . WPINC . '/class-IXR.php' );
$client = new IXR_Client( 'http://mothership.com/xmlrpc.php' );
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
23. XML-RPC (PLUGIN)
$client_request_args = array(
'username' => $_POST['u'],
'password' => $_POST['p'],
'plugin' => 'plugin-slug.php',
'url' => site_url()
);
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
24. XML-RPC (PLUGIN)
$client->query(
'pue.is_user_authorized',
$client_request_args
);
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
25. STEP 2B: HAVE MOTHERSHIP VALIDATE CREDENTIALS
github.com/brandondove/plugin-update-engine
/*
* Adding XMLRPC methods for the client plugin to call
/**/
add_filter( 'xmlrpc_methods', 'custom_xmlrpc_methods' );
function custom_xmlrpc_methods( $api_methods ) {
$api_methods['pue.is_user_authorized'] = 'custom_auth';
return $api_methods;
}
function custom_auth( $args = array() ) {
extract( $args ), EXTR_OVERWRITE );
if( !$username || !$password || !$plugin || !$url ) :
return new IXR_Error( 401, "OH NOES! You're doin' it wrong!" );
endif;
if( !user_pass_ok( $username, $password ) ) :
return new IXR_Error( 401, 'Sorry, Username and/or Password is Incorrect' );
endif;
require_once( PUENGINE_CORE.'models/pue-authenticated-user.php' );
$user = new pue_authenticated_user( $username );
if( !$user->is_authorized( $plugin ) )
return new IXR_Error( 401, __( "You don't have an active license for this plugin." ) );
if( !$user->has_available_licenses( $plugin, $url ) )
return new IXR_Error( 401, __( 'NOT AUTHORIZED! You have used up all of your licenses.' ) );
return md5( $username.$password.$plugin.$url.PUENGINE_SALT );
}
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
26. XML-RPC (MOTHERSHIP)
add_filter( 'xmlrpc_methods', 'custom_xmlrpc_methods' );
function custom_xmlrpc_methods( $api ) {
$api['pue.is_user_authorized'] = 'custom_auth';
return $api;
}
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
27. XML-RPC (MOTHERSHIP)
extract( $args ), EXTR_OVERWRITE );
// ensure the correct data was submitted
if( !$username || !$password || !$plugin || !$url ) :
return new IXR_Error( 401, "OH NOES! You're doin' it wrong!" );
endif;
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
28. XML-RPC (MOTHERSHIP)
// ensure the user/pass combo is real
if( !user_pass_ok( $username, $password ) ) :
return new IXR_Error( 401, 'Username/Password is Incorrect' );
endif;
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
30. XML-RPC (MOTHERSHIP)
if( !$user->is_authorized( $plugin ) )
return new IXR_Error( 401, __( "No license for this plugin." ) );
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
31. XML-RPC (MOTHERSHIP)
if( !$user->has_available_licenses( $plugin, $url ) )
return new IXR_Error( 401, __( 'No more your licenses.' ) );
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
32. XML-RPC (MOTHERSHIP)
return md5(
$username . $password .
$plugin . $url .
PUENGINE_SALT
);
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
33. THE PLUGIN IS
AUTHENTICATED.
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
34. NEXT STEPS...
REPO HOSTING
“PROFESSIONAL WORDPRESS PLUGIN DEVELOPMENT”
PAGES 263-269
WRITTEN BY THE AWESOME
BRAD WILLIAMS, OZH RICHARD & JUSTIN TADLOCK
HTTP://BDOVE.ME/PWPPD
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP
35. TWITTER WEB
BRANDONDOVE@PIXELJAR.NET
EMAIL
@BRANDONDOVE OF @PIXEL_JAR #PREMIUMGPL 2012 · SAN DIEGO · WORDCAMP