Giter Club home page Giter Club logo

wordpressplugin101's People

Contributors

alecaddd avatar bahiirwa avatar

Stargazers

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

Watchers

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

wordpressplugin101's Issues

Register Shortcode

Hey Alecad,
I somehow couldn't figure out in what exact file I have to register my own shortcode. I want to create one for front end purposes, but I don't want to change the functions.php of the theme.

Can you tell me in which file I need to do this?

King regards,
Kenneth

Lesson 11 get a syntax error.

try to active the plugin Lesson 11, i get a syntax error.

Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /test2/wp-content/plugins/Lesson11/inc/Init.php on line 16

wordpress version 5.1.1

Please ignore

`<?php
/**

  • @Package SiamDev
    */
    namespace Inc\Base;

class SettingsLinks

{
protected $plugin;

public function __construct()
{
	$this->plugin = PLUGIN;
}

public function register() 
{
	add_filter( "plugin_action_links_$this->plugin", array( $this, 'settings_link' ) );
}

public function settings_link( $links ) 
{
	$settings_link = '<a href="admin.php?page=alecaddd_plugin">Settings</a>';
	array_push( $links, $settings_link );
	return $links;
}

}`

Changes in Gulp notation from version 3 to 4

Gulp is introduced in episode 19. However, gulp recently went from version 3 to 4 and with that, a new notation is used.
function arguments are now supposed to be used with gulp.task( 'default', gulp.series('styles', 'js'), function() { instead of an ordinary array gulp.task( 'default', ['styles', 'js'], function() {.
Converting tasks are easy, however, when I run Gulp Watch, I get this error:

[13:41:35] Starting 'watch'...
[13:41:35] Starting 'default'...
[13:41:35] Starting 'styles'...
[13:41:35] The following tasks did not complete: watch, default, styles
[13:41:35] Did you forget to signal async completion?

I tried setting the required gulp version to 3.9.1 but that gave me 9 high severity vulnerabilities when running npm install.
When fixing them using npm audit fix (and then the recommended npm audit fix --force), npm sets Gulp's decency back to 4.0.2 as of today (Marts. 4th, 2021).

Lesson58 - Fatal Error

Hello
I have installed the lesson58 on a fresh WP installation. Received the following error on activate:

Fatal error: Uncaught Error: Class 'Inc\Base\Activate' not found in D:\xampp\htdocs\wordpress\wp-content\plugins\alecaddd-plugin\alecaddd-plugin.php:46 Stack trace: #0 D:\xampp\htdocs\wordpress\wp-includes\class-wp-hook.php(286): activate_alecaddd_plugin('') #1 D:\xampp\htdocs\wordpress\wp-includes\class-wp-hook.php(310): WP_Hook->apply_filters('', Array) #2 D:\xampp\htdocs\wordpress\wp-includes\plugin.php(465): WP_Hook->do_action(Array) #3 D:\xampp\htdocs\wordpress\wp-admin\plugins.php(177): do_action('activate_alecad...') #4 {main} thrown in D:\xampp\htdocs\wordpress\wp-content\plugins\alecaddd-plugin\alecaddd-plugin.php on line 46

Thanks

Some Love

Man (or guys) i just wanted to say that your tutorials are amazing. Thank you for the great effort.
<3

Fatal error: Uncaught Error: Class "Inc\Base\Activate" not found in

Hi! Sir
When i activate this plugin. I found this error. Please tell me solution.

Fatal error: Uncaught Error: Class "Inc\Base\Activate" not found in C:\xampp\htdocs\wpschool\wp-content\plugins\alecaddd-plugin\alecaddd-plugin.php:46 Stack trace: #0 C:\xampp\htdocs\wpschool\wp-includes\class-wp-hook.php(292): activate_alecaddd_plugin('') #1 C:\xampp\htdocs\wpschool\wp-includes\class-wp-hook.php(316): WP_Hook->apply_filters('', Array) #2 C:\xampp\htdocs\wpschool\wp-includes\plugin.php(484): WP_Hook->do_action(Array) #3 C:\xampp\htdocs\wpschool\wp-admin\plugins.php(193): do_action('activate_alecad...') #4 {main} thrown in C:\xampp\htdocs\wpschool\wp-content\plugins\alecaddd-plugin\alecaddd-plugin.php on line 46

Two Plugin with same namespace

Hi there,
Thanks for your awesome youtube series.

The issue is,
In your plugin, you used "Inc" namespace. What if another plugin uses same "Inc" namespace through composer?

I faced the issue. it loads files from one of the repositories src for both plugins. So one plugin gets broken.

A possible solution could be using a unique identifier for the namespace. But it's not the appropriate solution, is it?
Any solution?

issue1

Error when passing submenu title

$this->settings->addPages( $this->pages )->withSubPage( 'Dashboard' )->addSubPages( $this->subpages )->register();

Hi Alex, with wordpress 5.22 there is an error that arises from this line of code.

It works if we remove the title ('Dashboard') and pass nothing .

Catchable fatal error: Argument 1 passed to includes\API\SettingsApi::withSubPage() must be an instance of includes\API\string, string given, called in /home/admin/web/[xxx]/public_html/wp-content/plugins/nello-plugin/includes/Pages/Admin.php on line 37 and defined in /home/admin/web/[xxx]/public_html/wp-content/plugins/nello-plugin/includes/API/SettingsApi.php on line 43

with line 43 being

public function withSubPage( string $title = null )

gulpfile browsersync issue

Hi,
Thanks for a mega great wonderfull special tutorialseries!

Just thougt to softly mention the https certificate settings in your later gulpfile.js (gulp 4). Not sure if intended.

Thanks again!

Cannot load alecaddd_cpt error

I've got an issue On lesson 31 - How to Edit a Custom Post Type.
I created the form with the edit button as shown:

echo test:

<?php settings_errors(); if(isset($_POST['edit'])) { echo $_POST['post_type']; } ?>

The edit form:

                            <form action="" method="post" class="inline-block">
                                
                                <input type="hidden" name="post_type" value="<?= $option['post_type'] ?>">

                                <?php
                                    submit_button( 'Edit', 'primary small edit', 'edit', false); 
                                ?>
                            </form>

When I click on the edit button, I get this error:
alecaddd-plugin-error

Role Restriction / Capability / Permission

Hey Alecad,
how is it possible to add user role capability to the plugin?
I want only specific roles to have access to my plugin. How can Ido this? I've read about the add_cap() method, but how and where do I have to implement it?

King regards,
Kenneth

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.