Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Enqueue.php #45

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Conversation

tuhin18003
Copy link

Filter SubPanel, Add wp_localize_script,

Example:
Subpanel:
$enqueue->admin([
'filter' => [ 'panel' => ['main_panel'],
'subPanel' => [
'Subpanel'
]
]
]);

Localize:

$enqueue->admin([
'as' => 'ID',
'src' => 'src',
'deps' => [ 'jquery-form' ],
'filter' => [ 'panel' => ['mainpanel'],
'subPanel' => [
'subpanel'
]
]
]);

$enqueue->admin([
'as' => 'ID',
'lc' => true,
'name' => 'AIOS',
'data' => [
'error_msg' => __( 'Sorry, unable to do that. Please try refreshing the page.' ),
],
'filter' => [ 'panel' => ['main-panel'],
'subPanel' => [
'subpanle'
]
]
]);

admin page segment can be : admin.php?page=mainpanel&tab=subpanel

Filter SubPanel, Add wp_localize_script, 

Example: 
Subpanel:
$enqueue->admin([
        'filter'   => [ 'panel' => ['main_panel'],
        'subPanel' => [ 
            'Subpanel'
        ]
    ]
]);

Localize:

$enqueue->admin([
    'as'     => 'ID',
    'src'    => 'src',
    'deps'   => [ 'jquery-form' ],
    'filter'   => [ 'panel' => ['mainpanel'],
        'subPanel' => [ 
            'subpanel'
        ]
    ]
]);

$enqueue->admin([
    'as'       => 'ID',
    'lc'       => true,
    'name'     => 'AIOS',
    'data'     => [ 
            'error_msg' => __( 'Sorry, unable to do that. Please try refreshing the page.' ), 
           ],
    'filter'   => [ 'panel' => ['main-panel'],
        'subPanel' => [ 
            'subpanle'
        ]
    ]
]);

admin page segment can be : admin.php?page=mainpanel&tab=subpanel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant